diff options
181 files changed, 10660 insertions, 4789 deletions
@@ -4,6 +4,149 @@ Changes between 0.9.7 and 0.9.8 [xx XXX 2002] + *) Add support for ECC-based ciphersuites from draft-ietf-tls-ecc-01.txt. + As these are not official, they are not included in "ALL"; + the "ECCdraft" ciphersuite group alias can be used to select them. + [Vipul Gupta and Sumit Gupta (Sun Microsystems Laboratories)] + +TODO: COMPLEMENTOFALL and COMPLEMENTOFDEFAULT do not handle ECCdraft +cipher suites correctly. + + *) Add ECDH engine support. + [Nils Gura and Douglas Stebila (Sun Microsystems Laboratories)] + + *) Add ECDH in new directory crypto/ecdh/. + [Douglas Stebila (Sun Microsystems Laboratories)] + + *) Let BN_rand_range() abort with an error after 100 iterations + without success (which indicates a broken PRNG). + [Bodo Moeller] + + *) Change BN_mod_sqrt() so that it verifies that the input value + is really the square of the return value. (Previously, + BN_mod_sqrt would show GIGO behaviour.) + [Bodo Moeller] + + *) Add named elliptic curves over binary fields from X9.62, SECG, + and WAP/WTLS; add OIDs that were still missing. + + [Sheueling Chang Shantz and Douglas Stebila + (Sun Microsystems Laboratories)] + + *) Extend the EC library for elliptic curves over binary fields + (new files ec2_smpl.c, ec2_smpt.c, ec2_mult.c in crypto/ec/). + New EC_METHOD: + + EC_GF2m_simple_method + + New API functions: + + EC_GROUP_new_curve_GF2m + EC_GROUP_set_curve_GF2m + EC_GROUP_get_curve_GF2m + EC_POINT_set_affine_coordinates_GF2m + EC_POINT_get_affine_coordinates_GF2m + EC_POINT_set_compressed_coordinates_GF2m + + Point compression for binary fields is disabled by default for + patent reasons (compile with OPENSSL_EC_BIN_PT_COMP defined to + enable it). + + As binary polynomials are represented as BIGNUMs, various members + of the EC_GROUP and EC_POINT data structures can be shared + between the implementations for prime fields and binary fields; + the above ..._GF2m functions (except for EX_GROUP_new_curve_GF2m) + are essentially identical to their ..._GFp counterparts. + (For simplicity, the '..._GFp' prefix has been dropped from + various internal method names.) + + An internal 'field_div' method (similar to 'field_mul' and + 'field_sqr') has been added; this is used only for binary fields. + + [Sheueling Chang Shantz and Douglas Stebila + (Sun Microsystems Laboratories)] + + *) Optionally dispatch EC_POINT_mul(), EC_POINT_precompute_mult() + through methods ('mul', 'precompute_mult'). + + The generic implementations (now internally called 'ec_wNAF_mul' + and 'ec_wNAF_precomputed_mult') remain the default if these + methods are undefined. + + [Sheueling Chang Shantz and Douglas Stebila + (Sun Microsystems Laboratories)] + + *) New function EC_GROUP_get_degree, which is defined through + EC_METHOD. For curves over prime fields, this returns the bit + length of the modulus. + + [Sheueling Chang Shantz and Douglas Stebila + (Sun Microsystems Laboratories)] + + *) New functions EC_GROUP_dup, EC_POINT_dup. + (These simply call ..._new and ..._copy). + + [Sheueling Chang Shantz and Douglas Stebila + (Sun Microsystems Laboratories)] + + *) Add binary polynomial arithmetic software in crypto/bn/bn_gf2m.c. + Polynomials are represented as BIGNUMs (where the sign bit is not + used) in the following functions [macros]: + + BN_GF2m_add + BN_GF2m_sub [= BN_GF2m_add] + BN_GF2m_mod [wrapper for BN_GF2m_mod_arr] + BN_GF2m_mod_mul [wrapper for BN_GF2m_mod_mul_arr] + BN_GF2m_mod_sqr [wrapper for BN_GF2m_mod_sqr_arr] + BN_GF2m_mod_inv + BN_GF2m_mod_exp [wrapper for BN_GF2m_mod_exp_arr] + BN_GF2m_mod_sqrt [wrapper for BN_GF2m_mod_sqrt_arr] + BN_GF2m_mod_solve_quad [wrapper for BN_GF2m_mod_solve_quad_arr] + BN_GF2m_cmp [= BN_ucmp] + + (Note that only the 'mod' functions are actually for fields GF(2^m). + BN_GF2m_add() is misnomer, but this is for the sake of consistency.) + + For some functions, an the irreducible polynomial defining a + field can be given as an 'unsigned int[]' with strictly + decreasing elements giving the indices of those bits that are set; + i.e., p[] represents the polynomial + f(t) = t^p[0] + t^p[1] + ... + t^p[k] + where + p[0] > p[1] > ... > p[k] = 0. + This applies to the following functions: + + BN_GF2m_mod_arr + BN_GF2m_mod_mul_arr + BN_GF2m_mod_sqr_arr + BN_GF2m_mod_inv_arr [wrapper for BN_GF2m_mod_inv] + BN_GF2m_mod_div_arr [wrapper for BN_GF2m_mod_div] + BN_GF2m_mod_exp_arr + BN_GF2m_mod_sqrt_arr + BN_GF2m_mod_solve_quad_arr + BN_GF2m_poly2arr + BN_GF2m_arr2poly + + Conversion can be performed by the following functions: + + BN_GF2m_poly2arr + BN_GF2m_arr2poly + + bntest.c has additional tests for binary polynomial arithmetic. + + Two implementations for BN_GF2m_mod_div() are available. + The default algorithm simply uses BN_GF2m_mod_inv() and + BN_GF2m_mod_mul(). The alternative algorithm is compiled in only + if OPENSSL_SUN_GF2M_DIV is defined (patent pending; read the + copyright notice in crypto/bn/bn_gf2m.c before enabling it). + + [Sheueling Chang Shantz and Douglas Stebila + (Sun Microsystems Laboratories)] + + *) Add new error code 'ERR_R_DISABLED' that can be used when some + functionality is disabled at compile-time. + [Douglas Stebila <douglas.stebila@sun.com>] + *) Change default behaviour of 'openssl asn1parse' so that more information is visible when viewing, e.g., a certificate: @@ -85,7 +228,8 @@ - X509_PUBKEY_get (crypto/asn1/x_pubkey.c) and d2i_PublicKey (crypto/asn1/d2i_pu.c) have been modified to make them suitable for ECDSA where domain parameters must be - extracted before the specific public key. + extracted before the specific public key; + - ECDSA engine support has been added. [Nils Larsch <nla@trustcenter.de>] *) Include some named elliptic curves, and add OIDs from X9.62, @@ -99,7 +243,7 @@ EC_GROUP_get_nid() [Nils Larsch <nla@trustcenter.de, Bodo Moeller] - Changes between 0.9.6e and 0.9.7 [XX xxx 2002] + Changes between 0.9.6g and 0.9.7 [XX xxx 2002] *) Make sure tests can be performed even if the corresponding algorithms have been removed entirely. This was also the last step to make @@ -1764,7 +1908,32 @@ des-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k *) Clean old EAY MD5 hack from e_os.h. [Richard Levitte] - Changes between 0.9.6d and 0.9.6e [XX xxx XXXX] + Changes between 0.9.6f and 0.9.6g [9 Aug 2002] + + *) [In 0.9.6g-engine release:] + Fix crypto/engine/vendor_defns/cswift.h for WIN32 (use '_stdcall'). + [Lynn Gazis <lgazis@rainbow.com>] + + Changes between 0.9.6e and 0.9.6f [8 Aug 2002] + + *) Fix ASN1 checks. Check for overflow by comparing with LONG_MAX + and get fix the header length calculation. + [Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>, + Alon Kantor <alonk@checkpoint.com> (and others), + Steve Henson] + + *) Use proper error handling instead of 'assertions' in buffer + overflow checks added in 0.9.6e. This prevents DoS (the + assertions could call abort()). + [Arne Ansper <arne@ats.cyber.ee>, Bodo Moeller] + + Changes between 0.9.6d and 0.9.6e [30 Jul 2002] + + *) Add various sanity checks to asn1_get_length() to reject + the ASN1 length bytes if they exceed sizeof(long), will appear + negative or the content length exceeds the length of the + supplied buffer. + [Steve Henson, Adi Stav <stav@mercury.co.il>, James Yonan <jim@ntlp.com>] *) Fix cipher selection routines: ciphers without encryption had no flags for the cipher strength set and where therefore not handled correctly @@ -1787,6 +1956,40 @@ des-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k applications. [Bodo Moeller] + *) Changes in security patch: + + Changes marked "(CHATS)" were sponsored by the Defense Advanced + Research Projects Agency (DARPA) and Air Force Research Laboratory, + Air Force Materiel Command, USAF, under agreement number + F30602-01-2-0537. + + *) Add various sanity checks to asn1_get_length() to reject + the ASN1 length bytes if they exceed sizeof(long), will appear + negative or the content length exceeds the length of the + supplied buffer. (CAN-2002-0659) + [Steve Henson, Adi Stav <stav@mercury.co.il>, James Yonan <jim@ntlp.com>] + + *) Assertions for various potential buffer overflows, not known to + happen in practice. + [Ben Laurie (CHATS)] + + *) Various temporary buffers to hold ASCII versions of integers were + too small for 64 bit platforms. (CAN-2002-0655) + [Matthew Byng-Maddick <mbm@aldigital.co.uk> and Ben Laurie (CHATS)> + + *) Remote buffer overflow in SSL3 protocol - an attacker could + supply an oversized master key in Kerberos-enabled versions. + (CAN-2002-0657) + [Ben Laurie (CHATS)] + + *) Remote buffer overflow in SSL3 protocol - an attacker could + supply an oversized session ID to a client. (CAN-2002-0656) + [Ben Laurie (CHATS)] + + *) Remote buffer overflow in SSL2 protocol - an attacker could + supply an oversized client master key. (CAN-2002-0656) + [Ben Laurie (CHATS)] + Changes between 0.9.6c and 0.9.6d [9 May 2002] *) Fix crypto/asn1/a_sign.c so that 'parameters' is omitted (not @@ -120,7 +120,7 @@ my $alpha_asm="::::::::"; # -DB_ENDIAN slows things down on a sparc for md5, but helps sha1. # So the md5_locl.h file has an undef B_ENDIAN if sun is defined -#config-string $cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib +#config-string $cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib : $arflags my %table=( # File 'TABLE' (created by 'make TABLE') contains the data from this list, @@ -387,8 +387,8 @@ my %table=( "linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown):::BN_LLONG:::", "linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::", -"linux-s390", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::", -"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG:::::::::::linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-s390", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -438,6 +438,7 @@ my %table=( "aix-gcc", "gcc:-O3 -DB_ENDIAN::(unknown):AIX::BN_LLONG RC4_CHAR:::", "aix43-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:", "aix43-gcc", "gcc:-O3 -DAIX -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:", +"aix64-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384 -q64::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHAR::::::::::dlfcn::::::-X 64", # # Cray T90 and similar (SDSC) @@ -586,6 +587,7 @@ my $idx_shared_cflag = $idx++; my $idx_shared_ldflag = $idx++; my $idx_shared_extension = $idx++; my $idx_ranlib = $idx++; +my $idx_arflags = $idx++; my $prefix=""; my $openssldir=""; @@ -745,7 +747,20 @@ PROCESS_ARGS: $depflags .= "-DOPENSSL_NO_MDC2 "; $openssl_algorithm_defines .= "#define OPENSSL_NO_MDC2\n"; } - if ($algo eq "EC" || $algo eq "SHA" || $algo eq "SHA1") + if ($algo eq "EC") + { + push @skip, "ecdsa"; + push @skip, "ecdh"; + $options .= " no-ecdsa"; + $options .= " no-ecdh"; + $flags .= "-DOPENSSL_NO_ECDSA "; + $flags .= "-DOPENSSL_NO_ECDH "; + $depflags .= "-DOPENSSL_NO_ECDSA "; + $depflags .= "-DOPENSSL_NO_ECDH "; + $openssl_algorithm_defines .= "#define OPENSSL_NO_ECDSA\n"; + $openssl_algorithm_defines .= "#define OPENSSL_NO_ECDH\n"; + } + if ($algo eq "SHA" || $algo eq "SHA1") { push @skip, "ecdsa"; $options .= " no-ecdsa"; @@ -948,6 +963,7 @@ my $shared_cflag = $fields[$idx_shared_cflag]; my $shared_ldflag = $fields[$idx_shared_ldflag]; my $shared_extension = $fields[$idx_shared_extension]; my $ranlib = $fields[$idx_ranlib]; +my $arflags = $fields[$idx_arflags]; $cflags="$flags$cflags" if ($flags ne ""); @@ -1216,6 +1232,7 @@ while (<IN>) s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/; s/^PROCESSOR=.*/PROCESSOR= $processor/; s/^RANLIB=.*/RANLIB= $ranlib/; + s/^ARFLAGS=.*/ARFLAGS= $arflags/; s/^PERL=.*/PERL= $perl/; s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/; s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/; @@ -1262,6 +1279,7 @@ print "SHA1_OBJ_ASM =$sha1_obj\n"; print "RMD160_OBJ_ASM=$rmd160_obj\n"; print "PROCESSOR =$processor\n"; print "RANLIB =$ranlib\n"; +print "ARFLAGS =$arflags\n"; print "PERL =$perl\n"; print "KRB5_INCLUDES =",$withargs{"krb5-include"},"\n" if $withargs{"krb5-include"} ne ""; @@ -1569,7 +1587,7 @@ sub print_table_entry my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj, my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj, my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag, - my $shared_ldflag,my $shared_extension,my $ranlib)= + my $shared_ldflag,my $shared_extension,my $ranlib,my $arflags)= split(/\s*:\s*/,$table{$target} . ":" x 30 , -1); print <<EOF @@ -1597,6 +1615,7 @@ sub print_table_entry \$shared_ldflag = $shared_ldflag \$shared_extension = $shared_extension \$ranlib = $ranlib +\$arflags = $arflags EOF } @@ -64,7 +64,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from <URL: http://www.openssl.org>. -OpenSSL 0.9.6d was released on May 9, 2002. +OpenSSL 0.9.6g was released on August 9, 2002. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at <URL: diff --git a/Makefile.org b/Makefile.org index eb3f5370d0..1db864b27c 100644 --- a/Makefile.org +++ b/Makefile.org @@ -59,7 +59,8 @@ DEPFLAG= PEX_LIBS= EX_LIBS= EXE_EXT= -AR=ar r +ARFLAGS= +AR=ar $(ARFLAGS) r RANLIB= ranlib PERL= perl TAR= tar @@ -166,7 +167,7 @@ SHLIBDIRS= crypto ssl SDIRS= \ md2 md4 md5 sha mdc2 hmac ripemd \ des rc2 rc4 rc5 idea bf cast \ - bn ec rsa dsa ecdsa dh dso engine aes \ + bn ec rsa dsa ecdsa dh ecdh dso engine aes \ buffer bio stack lhash rand err objects \ evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 @@ -251,7 +252,8 @@ link-shared: for i in $(SHLIBDIRS); do \ prev=lib$$i$(SHLIB_EXT); \ for j in $${tmp:-x}; do \ - ( set -x; ln -f -s $$prev lib$$i$$j ); \ + ( set -x; \ + rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \ prev=lib$$i$$j; \ done; \ done; \ @@ -731,7 +733,8 @@ install: all install_docs done; \ ( here="`pwd`"; \ cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \ - make -f $$here/Makefile link-shared ); \ + set $(MAKE); \ + $$1 -f $$here/Makefile link-shared ); \ fi install_docs: @@ -740,22 +743,23 @@ install_docs: $(INSTALL_PREFIX)$(MANDIR)/man3 \ $(INSTALL_PREFIX)$(MANDIR)/man5 \ $(INSTALL_PREFIX)$(MANDIR)/man7 - @for i in doc/apps/*.pod; do \ + @pod2man=`cd util; ./pod2mantest ignore`; \ + for i in doc/apps/*.pod; do \ fn=`basename $$i .pod`; \ if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \ echo "installing man$$sec/`basename $$i .pod`.$$sec"; \ (cd `$(PERL) util/dirname.pl $$i`; \ - sh -c "$(PERL) `cd ../../util; ./pod2mantest ignore` \ + sh -c "$(PERL) $$pod2man \ --section=$$sec --center=OpenSSL \ --release=$(VERSION) `basename $$i`") \ > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \ - done - @for i in doc/crypto/*.pod doc/ssl/*.pod; do \ + done; \ + for i in doc/crypto/*.pod doc/ssl/*.pod; do \ fn=`basename $$i .pod`; \ if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \ echo "installing man$$sec/`basename $$i .pod`.$$sec"; \ (cd `$(PERL) util/dirname.pl $$i`; \ - sh -c "$(PERL) `cd ../../util; ./pod2mantest ignore` \ + sh -c "$(PERL) $$pod2man \ --section=$$sec --center=OpenSSL \ --release=$(VERSION) `basename $$i`") \ > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \ @@ -40,6 +40,19 @@ o SSL/TLS: add callback to retrieve SSL/TLS messages. o SSL/TLS: support AES cipher suites (RFC3268). + Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g: + + o Important building fixes on Unix. + + Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f: + + o Various important bugfixes. + + Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e: + + o Important security related bugfixes. + o Various SSL/TLS library bugfixes. + Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d: o Various SSL/TLS library bugfixes. @@ -38,3 +38,11 @@ may differ on your machine. As long as Apple doesn't fix the problem with ld, this problem building OpenSSL will remain as is. + +* Parallell make leads to errors + +While running tests, running a parallell make is a bad idea. Many test +scripts use the same name for output and input files, which means different +will interfere with each other and lead to test failure. + +The solution is simple for now: don't run parallell make when testing. @@ -173,7 +173,9 @@ textual explanation of what your patch does. Note: For legal reasons, contributions from the US can be accepted only - if a copy of the patch is sent to crypt@bxa.doc.gov + if a TSA notification and a copy of the patch is sent to crypt@bis.doc.gov; + see http://www.bis.doc.gov/Encryption/PubAvailEncSourceCodeNofify.html [sic] + and http://w3.access.gpo.gov/bis/ear/pdf/740.pdf (EAR Section 740.13(e)). The preferred format for changes is "diff -u" output. You might generate it like this: @@ -1,12 +1,16 @@ OpenSSL STATUS Last modified at - ______________ $Date: 2002/06/25 11:37:12 $ + ______________ $Date: 2002/08/13 07:32:50 $ DEVELOPMENT STATE o OpenSSL 0.9.8: Under development... + o OpenSSL 0.9.7-beta3: Released on July 30th, 2002 o OpenSSL 0.9.7-beta2: Released on June 16th, 2002 o OpenSSL 0.9.7-beta1: Released on June 1st, 2002 + o OpenSSL 0.9.6g: Released on August 9th, 2002 + o OpenSSL 0.9.6f: Released on August 8th, 2002 + o OpenSSL 0.9.6e: Released on July 30th, 2002 o OpenSSL 0.9.6d: Released on May 9th, 2002 o OpenSSL 0.9.6c: Released on December 21st, 2001 o OpenSSL 0.9.6b: Released on July 9th, 2001 @@ -23,6 +23,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** BC-32 $cc = bcc32 @@ -47,6 +48,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** BS2000-OSD $cc = c89 @@ -71,6 +73,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** Cygwin $cc = gcc @@ -95,6 +98,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .dll $ranlib = +$arflags = *** Cygwin-pre1.3 $cc = gcc @@ -119,6 +123,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** DJGPP $cc = gcc @@ -143,6 +148,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** FreeBSD $cc = gcc @@ -167,6 +173,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** FreeBSD-alpha $cc = gcc @@ -191,6 +198,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** FreeBSD-elf $cc = gcc @@ -215,6 +223,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** MPE/iX-gcc $cc = gcc @@ -239,6 +248,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** Mingw32 $cc = gcc @@ -263,6 +273,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** NetBSD-m68 $cc = gcc @@ -287,6 +298,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** NetBSD-sparc $cc = gcc @@ -311,6 +323,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** NetBSD-x86 $cc = gcc @@ -335,6 +348,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OS2-EMX $cc = gcc @@ -359,6 +373,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** OS390-Unix $cc = c89.sh @@ -383,6 +398,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** OpenBSD $cc = gcc @@ -407,6 +423,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenBSD-alpha $cc = gcc @@ -431,6 +448,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenBSD-hppa $cc = gcc @@ -455,6 +473,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenBSD-i386 $cc = gcc @@ -479,6 +498,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenBSD-m68k $cc = gcc @@ -503,6 +523,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenBSD-m88k $cc = gcc @@ -527,6 +548,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenBSD-mips $cc = gcc @@ -551,6 +573,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenBSD-powerpc $cc = gcc @@ -575,6 +598,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenBSD-sparc $cc = gcc @@ -599,6 +623,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenBSD-sparc64 $cc = gcc @@ -623,6 +648,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenBSD-vax $cc = gcc @@ -647,6 +673,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenUNIX-8 $cc = cc @@ -671,6 +698,7 @@ $shared_cflag = -Kpic $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenUNIX-8-gcc $cc = gcc @@ -695,6 +723,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenUNIX-8-pentium $cc = cc @@ -719,6 +748,7 @@ $shared_cflag = -Kpic $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** OpenUNIX-8-pentium_pro $cc = cc @@ -743,6 +773,7 @@ $shared_cflag = -Kpic $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** ReliantUNIX $cc = cc @@ -767,6 +798,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** SINIX $cc = cc @@ -791,6 +823,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** SINIX-N $cc = /usr/ucb/cc @@ -815,6 +848,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** UWIN $cc = cc @@ -839,6 +873,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** VC-MSDOS $cc = cl @@ -863,6 +898,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** VC-NT $cc = cl @@ -887,6 +923,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** VC-W31-16 $cc = cl @@ -911,6 +948,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** VC-W31-32 $cc = cl @@ -935,6 +973,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** VC-WIN16 $cc = cl @@ -959,6 +998,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** VC-WIN32 $cc = cl @@ -983,6 +1023,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** aix-cc $cc = cc @@ -1007,6 +1048,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** aix-gcc $cc = gcc @@ -1031,6 +1073,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** aix43-cc $cc = cc @@ -1055,6 +1098,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** aix43-gcc $cc = gcc @@ -1079,6 +1123,32 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = + +*** aix64-cc +$cc = cc +$cflags = -O -DAIX -DB_ENDIAN -qmaxmem=16384 -q64 +$unistd = +$thread_cflag = (unknown) +$sys_id = +$lflags = +$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR +$bn_obj = +$des_obj = +$bf_obj = +$md5_obj = +$sha1_obj = +$cast_obj = +$rc4_obj = +$rmd160_obj = +$rc5_obj = +$dso_scheme = dlfcn +$shared_target= +$shared_cflag = +$shared_ldflag = +$shared_extension = +$ranlib = +$arflags = -X 64 *** alpha-cc $cc = cc @@ -1103,6 +1173,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .so $ranlib = +$arflags = *** alpha-cc-rpath $cc = cc @@ -1127,6 +1198,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .so $ranlib = +$arflags = *** alpha-gcc $cc = gcc @@ -1151,6 +1223,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .so $ranlib = +$arflags = *** alpha164-cc $cc = cc @@ -1175,6 +1248,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .so $ranlib = +$arflags = *** alphaold-cc $cc = cc @@ -1199,6 +1273,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .so $ranlib = +$arflags = *** bsdi-elf-gcc $cc = gcc @@ -1223,6 +1298,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** bsdi-gcc $cc = gcc @@ -1247,6 +1323,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** cc $cc = cc @@ -1271,6 +1348,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** cray-j90 $cc = cc @@ -1295,6 +1373,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** cray-t3e $cc = cc @@ -1319,6 +1398,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** darwin-i386-cc $cc = cc @@ -1343,6 +1423,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .$(SHLIB_MAJOR).$(SHLIB_MINOR).dylib $ranlib = +$arflags = *** darwin-ppc-cc $cc = cc @@ -1367,6 +1448,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .$(SHLIB_MAJOR).$(SHLIB_MINOR).dylib $ranlib = +$arflags = *** debug $cc = gcc @@ -1391,6 +1473,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-ben $cc = gcc @@ -1415,6 +1498,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-ben-debug $cc = gcc @@ -1439,6 +1523,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-ben-openbsd $cc = gcc @@ -1463,6 +1548,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-ben-openbsd-debug $cc = gcc @@ -1487,6 +1573,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-ben-strict $cc = gcc @@ -1511,6 +1598,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-bodo $cc = gcc @@ -1535,6 +1623,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-levitte-linux-elf $cc = gcc @@ -1559,6 +1648,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** debug-levitte-linux-noasm $cc = gcc @@ -1583,6 +1673,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** debug-linux-elf $cc = gcc @@ -1607,6 +1698,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** debug-linux-elf-noefence $cc = gcc @@ -1631,6 +1723,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-linux-pentium $cc = gcc @@ -1655,6 +1748,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-linux-ppro $cc = gcc @@ -1679,6 +1773,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-rse $cc = cc @@ -1703,6 +1798,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-solaris-sparcv8-cc $cc = cc @@ -1727,6 +1823,7 @@ $shared_cflag = -KPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** debug-solaris-sparcv8-gcc $cc = gcc @@ -1751,6 +1848,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** debug-solaris-sparcv9-cc $cc = cc @@ -1775,6 +1873,7 @@ $shared_cflag = -KPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** debug-solaris-sparcv9-gcc $cc = gcc @@ -1799,6 +1898,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** debug-steve $cc = gcc @@ -1823,6 +1923,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-steve-linux-pseudo64 $cc = gcc @@ -1847,6 +1948,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** debug-ulf $cc = gcc @@ -1871,6 +1973,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** dgux-R3-gcc $cc = gcc @@ -1895,6 +1998,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** dgux-R4-gcc $cc = gcc @@ -1919,6 +2023,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** dgux-R4-x86-gcc $cc = gcc @@ -1943,6 +2048,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** dist $cc = cc @@ -1967,6 +2073,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** gcc $cc = gcc @@ -1991,6 +2098,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** hpux-brokencc $cc = cc @@ -2015,6 +2123,7 @@ $shared_cflag = +Z $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux-brokengcc $cc = gcc @@ -2039,6 +2148,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux-cc $cc = cc @@ -2063,6 +2173,7 @@ $shared_cflag = +Z $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux-gcc $cc = gcc @@ -2087,6 +2198,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux-ia64-cc $cc = cc @@ -2111,6 +2223,7 @@ $shared_cflag = +Z $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux-m68k-gcc $cc = gcc @@ -2135,6 +2248,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** hpux-parisc-cc $cc = cc @@ -2159,6 +2273,7 @@ $shared_cflag = +Z $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux-parisc-cc-o4 $cc = cc @@ -2183,6 +2298,7 @@ $shared_cflag = +Z $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux-parisc-gcc $cc = gcc @@ -2207,6 +2323,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux-parisc1_1-cc $cc = cc @@ -2231,6 +2348,7 @@ $shared_cflag = +Z $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux-parisc2-cc $cc = cc @@ -2255,6 +2373,7 @@ $shared_cflag = +Z $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux10-brokencc $cc = cc @@ -2279,6 +2398,7 @@ $shared_cflag = +Z $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux10-brokengcc $cc = gcc @@ -2303,6 +2423,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux10-cc $cc = cc @@ -2327,6 +2448,7 @@ $shared_cflag = +Z $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux10-gcc $cc = gcc @@ -2351,6 +2473,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux64-ia64-cc $cc = cc @@ -2375,6 +2498,7 @@ $shared_cflag = +Z $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux64-parisc-cc $cc = cc @@ -2399,6 +2523,7 @@ $shared_cflag = +Z $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux64-parisc-gcc $cc = gcc @@ -2423,6 +2548,7 @@ $shared_cflag = -fpic $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hpux64-parisc2-cc $cc = cc @@ -2447,6 +2573,7 @@ $shared_cflag = +Z $shared_ldflag = $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** hurd-x86 $cc = gcc @@ -2471,6 +2598,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** irix-cc $cc = cc @@ -2495,6 +2623,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** irix-gcc $cc = gcc @@ -2519,6 +2648,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** irix-mips3-cc $cc = cc @@ -2543,6 +2673,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** irix-mips3-gcc $cc = gcc @@ -2567,6 +2698,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** irix64-mips4-cc $cc = cc @@ -2591,6 +2723,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** irix64-mips4-gcc $cc = gcc @@ -2615,6 +2748,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-alpha+bwx-ccc $cc = ccc @@ -2639,6 +2773,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** linux-alpha+bwx-gcc $cc = gcc @@ -2663,6 +2798,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-alpha-ccc $cc = ccc @@ -2687,6 +2823,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** linux-alpha-gcc $cc = gcc @@ -2711,6 +2848,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-aout $cc = gcc @@ -2735,6 +2873,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** linux-elf $cc = gcc @@ -2759,6 +2898,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-elf-arm $cc = gcc @@ -2783,6 +2923,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-ia64 $cc = gcc @@ -2807,6 +2948,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-k6 $cc = gcc @@ -2831,6 +2973,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-m68k $cc = gcc @@ -2855,6 +2998,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** linux-mips $cc = gcc @@ -2879,6 +3023,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** linux-mipsel $cc = gcc @@ -2903,6 +3048,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** linux-parisc $cc = gcc @@ -2927,6 +3073,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** linux-pentium $cc = gcc @@ -2951,6 +3098,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-ppc $cc = gcc @@ -2975,6 +3123,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-ppro $cc = gcc @@ -2999,14 +3148,15 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-s390 $cc = gcc -$cflags = -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall +$cflags = -DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall $unistd = $thread_cflag = -D_REENTRANT $sys_id = -$lflags = +$lflags = -ldl $bn_ops = BN_LLONG $bn_obj = $des_obj = @@ -3017,12 +3167,13 @@ $cast_obj = $rc4_obj = $rmd160_obj = $rc5_obj = -$dso_scheme = -$shared_target= -$shared_cflag = +$dso_scheme = dlfcn +$shared_target= linux-shared +$shared_cflag = -fPIC $shared_ldflag = -$shared_extension = +$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-s390x $cc = gcc @@ -3030,7 +3181,7 @@ $cflags = -DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall $unistd = $thread_cflag = -D_REENTRANT $sys_id = -$lflags = +$lflags = -ldl $bn_ops = SIXTY_FOUR_BIT_LONG $bn_obj = $des_obj = @@ -3041,12 +3192,13 @@ $cast_obj = $rc4_obj = $rmd160_obj = $rc5_obj = -$dso_scheme = +$dso_scheme = dlfcn $shared_target= linux-shared $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-sparcv7 $cc = gcc @@ -3071,6 +3223,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** linux-sparcv8 $cc = gcc @@ -3095,6 +3248,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** linux-sparcv9 $cc = gcc @@ -3119,6 +3273,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** ncr-scde $cc = cc @@ -3143,6 +3298,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** newsos4-gcc $cc = gcc @@ -3167,6 +3323,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** nextstep $cc = cc @@ -3191,6 +3348,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** nextstep3.3 $cc = cc @@ -3215,6 +3373,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** purify $cc = purify gcc @@ -3239,6 +3398,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** qnx4 $cc = cc @@ -3263,6 +3423,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** qnx6 $cc = cc @@ -3287,6 +3448,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** rhapsody-ppc-cc $cc = cc @@ -3311,6 +3473,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** sco3-gcc $cc = gcc @@ -3335,6 +3498,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** sco5-cc $cc = cc @@ -3359,6 +3523,7 @@ $shared_cflag = -Kpic $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** sco5-cc-pentium $cc = cc @@ -3383,6 +3548,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** sco5-gcc $cc = gcc @@ -3407,6 +3573,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** solaris-sparc-sc3 $cc = cc @@ -3431,6 +3598,7 @@ $shared_cflag = -KPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** solaris-sparcv7-cc $cc = cc @@ -3455,6 +3623,7 @@ $shared_cflag = -KPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** solaris-sparcv7-gcc $cc = gcc @@ -3479,6 +3648,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** solaris-sparcv8-cc $cc = cc @@ -3503,6 +3673,7 @@ $shared_cflag = -KPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** solaris-sparcv8-gcc $cc = gcc @@ -3527,6 +3698,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** solaris-sparcv9-cc $cc = cc @@ -3551,6 +3723,7 @@ $shared_cflag = -KPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** solaris-sparcv9-gcc $cc = gcc @@ -3575,6 +3748,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** solaris-sparcv9-gcc27 $cc = gcc @@ -3599,6 +3773,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** solaris-x86-cc $cc = cc @@ -3623,6 +3798,7 @@ $shared_cflag = -KPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** solaris-x86-gcc $cc = gcc @@ -3647,6 +3823,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** solaris64-sparcv9-cc $cc = cc @@ -3671,6 +3848,7 @@ $shared_cflag = -KPIC $shared_ldflag = -xarch=v9 $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = /usr/ccs/bin/ar rs +$arflags = *** solaris64-sparcv9-gcc $cc = gcc @@ -3695,6 +3873,7 @@ $shared_cflag = -fPIC $shared_ldflag = -m64 $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** solaris64-sparcv9-gcc31 $cc = gcc @@ -3719,6 +3898,7 @@ $shared_cflag = -fPIC $shared_ldflag = -m64 $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** sunos-gcc $cc = gcc @@ -3743,6 +3923,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** ultrix-cc $cc = cc @@ -3767,6 +3948,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** ultrix-gcc $cc = gcc @@ -3791,6 +3973,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** unixware-2.0 $cc = cc @@ -3815,6 +3998,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** unixware-2.0-pentium $cc = cc @@ -3839,6 +4023,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** unixware-2.1 $cc = cc @@ -3863,6 +4048,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** unixware-2.1-p6 $cc = cc @@ -3887,6 +4073,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** unixware-2.1-pentium $cc = cc @@ -3911,6 +4098,7 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = *** unixware-7 $cc = cc @@ -3935,6 +4123,7 @@ $shared_cflag = -Kpic $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** unixware-7-gcc $cc = gcc @@ -3959,6 +4148,7 @@ $shared_cflag = -fPIC $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** unixware-7-pentium $cc = cc @@ -3983,6 +4173,7 @@ $shared_cflag = -Kpic $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** unixware-7-pentium_pro $cc = cc @@ -4007,6 +4198,7 @@ $shared_cflag = -Kpic $shared_ldflag = $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $ranlib = +$arflags = *** vxworks-ppc405 $cc = ccppc @@ -4031,3 +4223,4 @@ $shared_cflag = $shared_ldflag = $shared_extension = $ranlib = +$arflags = diff --git a/apps/Makefile.ssl b/apps/Makefile.ssl index 0d47a08e1b..0272d551d5 100644 --- a/apps/Makefile.ssl +++ b/apps/Makefile.ssl @@ -158,13 +158,13 @@ progs.h: progs.pl # DO NOT DELETE THIS LINE -- make depend depends on it. app_rand.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -app_rand.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -app_rand.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -app_rand.o: ../include/openssl/buffer.h ../include/openssl/cast.h -app_rand.o: ../include/openssl/conf.h ../include/openssl/crypto.h -app_rand.o: ../include/openssl/des.h ../include/openssl/des_old.h -app_rand.o: ../include/openssl/dh.h ../include/openssl/dsa.h -app_rand.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +app_rand.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +app_rand.o: ../include/openssl/bn.h ../include/openssl/buffer.h +app_rand.o: ../include/openssl/cast.h ../include/openssl/conf.h +app_rand.o: ../include/openssl/crypto.h ../include/openssl/des.h +app_rand.o: ../include/openssl/des_old.h ../include/openssl/dh.h +app_rand.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h app_rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h app_rand.o: ../include/openssl/err.h ../include/openssl/evp.h app_rand.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -182,13 +182,13 @@ app_rand.o: ../include/openssl/txt_db.h ../include/openssl/ui.h app_rand.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h app_rand.o: ../include/openssl/x509_vfy.h app_rand.c apps.h apps.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -apps.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -apps.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -apps.o: ../include/openssl/buffer.h ../include/openssl/cast.h -apps.o: ../include/openssl/conf.h ../include/openssl/crypto.h -apps.o: ../include/openssl/des.h ../include/openssl/des_old.h -apps.o: ../include/openssl/dh.h ../include/openssl/dsa.h -apps.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +apps.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +apps.o: ../include/openssl/bn.h ../include/openssl/buffer.h +apps.o: ../include/openssl/cast.h ../include/openssl/conf.h +apps.o: ../include/openssl/crypto.h ../include/openssl/des.h +apps.o: ../include/openssl/des_old.h ../include/openssl/dh.h +apps.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +apps.o: ../include/openssl/ec.h ../include/openssl/ecdh.h apps.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h apps.o: ../include/openssl/err.h ../include/openssl/evp.h apps.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -208,13 +208,13 @@ apps.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h apps.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.o: ../include/openssl/x509v3.h apps.c apps.h asn1pars.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -asn1pars.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -asn1pars.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -asn1pars.o: ../include/openssl/buffer.h ../include/openssl/cast.h -asn1pars.o: ../include/openssl/conf.h ../include/openssl/crypto.h -asn1pars.o: ../include/openssl/des.h ../include/openssl/des_old.h -asn1pars.o: ../include/openssl/dh.h ../include/openssl/dsa.h -asn1pars.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +asn1pars.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +asn1pars.o: ../include/openssl/bn.h ../include/openssl/buffer.h +asn1pars.o: ../include/openssl/cast.h ../include/openssl/conf.h +asn1pars.o: ../include/openssl/crypto.h ../include/openssl/des.h +asn1pars.o: ../include/openssl/des_old.h ../include/openssl/dh.h +asn1pars.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdh.h asn1pars.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h asn1pars.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -233,13 +233,13 @@ asn1pars.o: ../include/openssl/txt_db.h ../include/openssl/ui.h asn1pars.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h asn1pars.o: ../include/openssl/x509_vfy.h apps.h asn1pars.c ca.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ca.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ca.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ca.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h -ca.o: ../include/openssl/des.h ../include/openssl/des_old.h -ca.o: ../include/openssl/dh.h ../include/openssl/dsa.h -ca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ca.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ca.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ca.o: ../include/openssl/cast.h ../include/openssl/conf.h +ca.o: ../include/openssl/crypto.h ../include/openssl/des.h +ca.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ca.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ca.o: ../include/openssl/ec.h ../include/openssl/ecdh.h ca.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h ca.o: ../include/openssl/err.h ../include/openssl/evp.h ca.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -259,14 +259,14 @@ ca.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h ca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ca.o: ../include/openssl/x509v3.h apps.h ca.c ciphers.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ciphers.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ciphers.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ciphers.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ciphers.o: ../include/openssl/comp.h ../include/openssl/conf.h -ciphers.o: ../include/openssl/crypto.h ../include/openssl/des.h -ciphers.o: ../include/openssl/des_old.h ../include/openssl/dh.h -ciphers.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -ciphers.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +ciphers.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ciphers.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ciphers.o: ../include/openssl/cast.h ../include/openssl/comp.h +ciphers.o: ../include/openssl/conf.h ../include/openssl/crypto.h +ciphers.o: ../include/openssl/des.h ../include/openssl/des_old.h +ciphers.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ciphers.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ciphers.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h ciphers.o: ../include/openssl/engine.h ../include/openssl/err.h ciphers.o: ../include/openssl/evp.h ../include/openssl/idea.h ciphers.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -288,13 +288,13 @@ ciphers.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h ciphers.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h ciphers.o: ciphers.c crl.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -crl.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -crl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -crl.o: ../include/openssl/buffer.h ../include/openssl/cast.h -crl.o: ../include/openssl/conf.h ../include/openssl/crypto.h -crl.o: ../include/openssl/des.h ../include/openssl/des_old.h -crl.o: ../include/openssl/dh.h ../include/openssl/dsa.h -crl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +crl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +crl.o: ../include/openssl/bn.h ../include/openssl/buffer.h +crl.o: ../include/openssl/cast.h ../include/openssl/conf.h +crl.o: ../include/openssl/crypto.h ../include/openssl/des.h +crl.o: ../include/openssl/des_old.h ../include/openssl/dh.h +crl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +crl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h crl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h crl.o: ../include/openssl/err.h ../include/openssl/evp.h crl.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -313,13 +313,13 @@ crl.o: ../include/openssl/txt_db.h ../include/openssl/ui.h crl.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h crl.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h crl.c crl2p7.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -crl2p7.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -crl2p7.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -crl2p7.o: ../include/openssl/buffer.h ../include/openssl/cast.h -crl2p7.o: ../include/openssl/conf.h ../include/openssl/crypto.h -crl2p7.o: ../include/openssl/des.h ../include/openssl/des_old.h -crl2p7.o: ../include/openssl/dh.h ../include/openssl/dsa.h -crl2p7.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +crl2p7.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +crl2p7.o: ../include/openssl/bn.h ../include/openssl/buffer.h +crl2p7.o: ../include/openssl/cast.h ../include/openssl/conf.h +crl2p7.o: ../include/openssl/crypto.h ../include/openssl/des.h +crl2p7.o: ../include/openssl/des_old.h ../include/openssl/dh.h +crl2p7.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h crl2p7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h crl2p7.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -338,13 +338,13 @@ crl2p7.o: ../include/openssl/txt_db.h ../include/openssl/ui.h crl2p7.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h crl2p7.o: ../include/openssl/x509_vfy.h apps.h crl2p7.c dgst.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -dgst.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -dgst.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -dgst.o: ../include/openssl/buffer.h ../include/openssl/cast.h -dgst.o: ../include/openssl/conf.h ../include/openssl/crypto.h -dgst.o: ../include/openssl/des.h ../include/openssl/des_old.h -dgst.o: ../include/openssl/dh.h ../include/openssl/dsa.h -dgst.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +dgst.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +dgst.o: ../include/openssl/bn.h ../include/openssl/buffer.h +dgst.o: ../include/openssl/cast.h ../include/openssl/conf.h +dgst.o: ../include/openssl/crypto.h ../include/openssl/des.h +dgst.o: ../include/openssl/des_old.h ../include/openssl/dh.h +dgst.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +dgst.o: ../include/openssl/ec.h ../include/openssl/ecdh.h dgst.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h dgst.o: ../include/openssl/err.h ../include/openssl/evp.h dgst.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -363,13 +363,13 @@ dgst.o: ../include/openssl/txt_db.h ../include/openssl/ui.h dgst.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h dgst.o: ../include/openssl/x509_vfy.h apps.h dgst.c dh.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -dh.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -dh.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -dh.o: ../include/openssl/buffer.h ../include/openssl/cast.h -dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h -dh.o: ../include/openssl/des.h ../include/openssl/des_old.h -dh.o: ../include/openssl/dh.h ../include/openssl/dsa.h -dh.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +dh.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h +dh.o: ../include/openssl/cast.h ../include/openssl/conf.h +dh.o: ../include/openssl/crypto.h ../include/openssl/des.h +dh.o: ../include/openssl/des_old.h ../include/openssl/dh.h +dh.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +dh.o: ../include/openssl/ec.h ../include/openssl/ecdh.h dh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h dh.o: ../include/openssl/err.h ../include/openssl/evp.h dh.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -388,13 +388,13 @@ dh.o: ../include/openssl/txt_db.h ../include/openssl/ui.h dh.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h dh.o: ../include/openssl/x509_vfy.h apps.h dh.c dsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -dsa.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -dsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -dsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h -dsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h -dsa.o: ../include/openssl/des.h ../include/openssl/des_old.h -dsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h -dsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +dsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +dsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h +dsa.o: ../include/openssl/cast.h ../include/openssl/conf.h +dsa.o: ../include/openssl/crypto.h ../include/openssl/des.h +dsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h +dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +dsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h dsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h dsa.o: ../include/openssl/err.h ../include/openssl/evp.h dsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -413,13 +413,13 @@ dsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h dsa.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h dsa.o: ../include/openssl/x509_vfy.h apps.h dsa.c dsaparam.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -dsaparam.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -dsaparam.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -dsaparam.o: ../include/openssl/buffer.h ../include/openssl/cast.h -dsaparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h -dsaparam.o: ../include/openssl/des.h ../include/openssl/des_old.h -dsaparam.o: ../include/openssl/dh.h ../include/openssl/dsa.h -dsaparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +dsaparam.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +dsaparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h +dsaparam.o: ../include/openssl/cast.h ../include/openssl/conf.h +dsaparam.o: ../include/openssl/crypto.h ../include/openssl/des.h +dsaparam.o: ../include/openssl/des_old.h ../include/openssl/dh.h +dsaparam.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +dsaparam.o: ../include/openssl/ec.h ../include/openssl/ecdh.h dsaparam.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h dsaparam.o: ../include/openssl/err.h ../include/openssl/evp.h dsaparam.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -438,13 +438,13 @@ dsaparam.o: ../include/openssl/txt_db.h ../include/openssl/ui.h dsaparam.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h dsaparam.o: ../include/openssl/x509_vfy.h apps.h dsaparam.c ecdsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ecdsa.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ecdsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ecdsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ecdsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h -ecdsa.o: ../include/openssl/des.h ../include/openssl/des_old.h -ecdsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h -ecdsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ecdsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ecdsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ecdsa.o: ../include/openssl/cast.h ../include/openssl/conf.h +ecdsa.o: ../include/openssl/crypto.h ../include/openssl/des.h +ecdsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ecdsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ecdsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h ecdsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h ecdsa.o: ../include/openssl/err.h ../include/openssl/evp.h ecdsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -462,14 +462,39 @@ ecdsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h ecdsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h ecdsa.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h ecdsa.o: ../include/openssl/x509_vfy.h apps.h ecdsa.c +ecparam.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h +ecparam.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ecparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ecparam.o: ../include/openssl/cast.h ../include/openssl/conf.h +ecparam.o: ../include/openssl/crypto.h ../include/openssl/des.h +ecparam.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ecparam.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ecparam.o: ../include/openssl/ec.h ../include/openssl/ecdh.h +ecparam.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ecparam.o: ../include/openssl/err.h ../include/openssl/evp.h +ecparam.o: ../include/openssl/idea.h ../include/openssl/lhash.h +ecparam.o: ../include/openssl/md2.h ../include/openssl/md4.h +ecparam.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +ecparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ecparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ecparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ecparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ecparam.o: ../include/openssl/rand.h ../include/openssl/rc2.h +ecparam.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +ecparam.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +ecparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ecparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ecparam.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +ecparam.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +ecparam.o: ../include/openssl/x509_vfy.h apps.h ecparam.c enc.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -enc.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h -enc.o: ../include/openssl/conf.h ../include/openssl/crypto.h -enc.o: ../include/openssl/des.h ../include/openssl/des_old.h -enc.o: ../include/openssl/dh.h ../include/openssl/dsa.h -enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +enc.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h +enc.o: ../include/openssl/cast.h ../include/openssl/conf.h +enc.o: ../include/openssl/crypto.h ../include/openssl/des.h +enc.o: ../include/openssl/des_old.h ../include/openssl/dh.h +enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h enc.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h enc.o: ../include/openssl/err.h ../include/openssl/evp.h enc.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -488,14 +513,14 @@ enc.o: ../include/openssl/txt_db.h ../include/openssl/ui.h enc.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h enc.o: ../include/openssl/x509_vfy.h apps.h enc.c engine.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -engine.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -engine.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -engine.o: ../include/openssl/buffer.h ../include/openssl/cast.h -engine.o: ../include/openssl/comp.h ../include/openssl/conf.h -engine.o: ../include/openssl/crypto.h ../include/openssl/des.h -engine.o: ../include/openssl/des_old.h ../include/openssl/dh.h -engine.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -engine.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +engine.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +engine.o: ../include/openssl/bn.h ../include/openssl/buffer.h +engine.o: ../include/openssl/cast.h ../include/openssl/comp.h +engine.o: ../include/openssl/conf.h ../include/openssl/crypto.h +engine.o: ../include/openssl/des.h ../include/openssl/des_old.h +engine.o: ../include/openssl/dh.h ../include/openssl/dsa.h +engine.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +engine.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h engine.o: ../include/openssl/engine.h ../include/openssl/err.h engine.o: ../include/openssl/evp.h ../include/openssl/idea.h engine.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -517,14 +542,14 @@ engine.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h engine.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h engine.o: engine.c errstr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -errstr.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -errstr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -errstr.o: ../include/openssl/buffer.h ../include/openssl/cast.h -errstr.o: ../include/openssl/comp.h ../include/openssl/conf.h -errstr.o: ../include/openssl/crypto.h ../include/openssl/des.h -errstr.o: ../include/openssl/des_old.h ../include/openssl/dh.h -errstr.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -errstr.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +errstr.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +errstr.o: ../include/openssl/bn.h ../include/openssl/buffer.h +errstr.o: ../include/openssl/cast.h ../include/openssl/comp.h +errstr.o: ../include/openssl/conf.h ../include/openssl/crypto.h +errstr.o: ../include/openssl/des.h ../include/openssl/des_old.h +errstr.o: ../include/openssl/dh.h ../include/openssl/dsa.h +errstr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +errstr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h errstr.o: ../include/openssl/engine.h ../include/openssl/err.h errstr.o: ../include/openssl/evp.h ../include/openssl/idea.h errstr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -546,13 +571,13 @@ errstr.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h errstr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h errstr.o: errstr.c gendh.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -gendh.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -gendh.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -gendh.o: ../include/openssl/buffer.h ../include/openssl/cast.h -gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h -gendh.o: ../include/openssl/des.h ../include/openssl/des_old.h -gendh.o: ../include/openssl/dh.h ../include/openssl/dsa.h -gendh.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +gendh.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +gendh.o: ../include/openssl/bn.h ../include/openssl/buffer.h +gendh.o: ../include/openssl/cast.h ../include/openssl/conf.h +gendh.o: ../include/openssl/crypto.h ../include/openssl/des.h +gendh.o: ../include/openssl/des_old.h ../include/openssl/dh.h +gendh.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +gendh.o: ../include/openssl/ec.h ../include/openssl/ecdh.h gendh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h gendh.o: ../include/openssl/err.h ../include/openssl/evp.h gendh.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -571,13 +596,13 @@ gendh.o: ../include/openssl/txt_db.h ../include/openssl/ui.h gendh.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h gendh.o: ../include/openssl/x509_vfy.h apps.h gendh.c gendsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -gendsa.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -gendsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -gendsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h -gendsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h -gendsa.o: ../include/openssl/des.h ../include/openssl/des_old.h -gendsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h -gendsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +gendsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +gendsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h +gendsa.o: ../include/openssl/cast.h ../include/openssl/conf.h +gendsa.o: ../include/openssl/crypto.h ../include/openssl/des.h +gendsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h +gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h gendsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h gendsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -596,13 +621,13 @@ gendsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h gendsa.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h gendsa.o: ../include/openssl/x509_vfy.h apps.h gendsa.c genrsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -genrsa.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -genrsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -genrsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h -genrsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h -genrsa.o: ../include/openssl/des.h ../include/openssl/des_old.h -genrsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h -genrsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +genrsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +genrsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h +genrsa.o: ../include/openssl/cast.h ../include/openssl/conf.h +genrsa.o: ../include/openssl/crypto.h ../include/openssl/des.h +genrsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h +genrsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +genrsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h genrsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h genrsa.o: ../include/openssl/err.h ../include/openssl/evp.h genrsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -621,13 +646,13 @@ genrsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h genrsa.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h genrsa.o: ../include/openssl/x509_vfy.h apps.h genrsa.c nseq.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -nseq.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -nseq.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -nseq.o: ../include/openssl/buffer.h ../include/openssl/cast.h -nseq.o: ../include/openssl/conf.h ../include/openssl/crypto.h -nseq.o: ../include/openssl/des.h ../include/openssl/des_old.h -nseq.o: ../include/openssl/dh.h ../include/openssl/dsa.h -nseq.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +nseq.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +nseq.o: ../include/openssl/bn.h ../include/openssl/buffer.h +nseq.o: ../include/openssl/cast.h ../include/openssl/conf.h +nseq.o: ../include/openssl/crypto.h ../include/openssl/des.h +nseq.o: ../include/openssl/des_old.h ../include/openssl/dh.h +nseq.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +nseq.o: ../include/openssl/ec.h ../include/openssl/ecdh.h nseq.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h nseq.o: ../include/openssl/err.h ../include/openssl/evp.h nseq.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -646,14 +671,14 @@ nseq.o: ../include/openssl/txt_db.h ../include/openssl/ui.h nseq.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h nseq.o: ../include/openssl/x509_vfy.h apps.h nseq.c ocsp.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ocsp.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ocsp.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ocsp.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ocsp.o: ../include/openssl/comp.h ../include/openssl/conf.h -ocsp.o: ../include/openssl/crypto.h ../include/openssl/des.h -ocsp.o: ../include/openssl/des_old.h ../include/openssl/dh.h -ocsp.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -ocsp.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +ocsp.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ocsp.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ocsp.o: ../include/openssl/cast.h ../include/openssl/comp.h +ocsp.o: ../include/openssl/conf.h ../include/openssl/crypto.h +ocsp.o: ../include/openssl/des.h ../include/openssl/des_old.h +ocsp.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ocsp.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ocsp.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h ocsp.o: ../include/openssl/engine.h ../include/openssl/err.h ocsp.o: ../include/openssl/evp.h ../include/openssl/idea.h ocsp.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -675,14 +700,14 @@ ocsp.o: ../include/openssl/txt_db.h ../include/openssl/ui.h ocsp.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h ocsp.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ocsp.c openssl.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -openssl.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -openssl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -openssl.o: ../include/openssl/buffer.h ../include/openssl/cast.h -openssl.o: ../include/openssl/comp.h ../include/openssl/conf.h -openssl.o: ../include/openssl/crypto.h ../include/openssl/des.h -openssl.o: ../include/openssl/des_old.h ../include/openssl/dh.h -openssl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -openssl.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +openssl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +openssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h +openssl.o: ../include/openssl/cast.h ../include/openssl/comp.h +openssl.o: ../include/openssl/conf.h ../include/openssl/crypto.h +openssl.o: ../include/openssl/des.h ../include/openssl/des_old.h +openssl.o: ../include/openssl/dh.h ../include/openssl/dsa.h +openssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +openssl.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h openssl.o: ../include/openssl/engine.h ../include/openssl/err.h openssl.o: ../include/openssl/evp.h ../include/openssl/idea.h openssl.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -704,13 +729,13 @@ openssl.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h openssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h openssl.o: openssl.c progs.h s_apps.h passwd.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -passwd.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -passwd.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -passwd.o: ../include/openssl/buffer.h ../include/openssl/cast.h -passwd.o: ../include/openssl/conf.h ../include/openssl/crypto.h -passwd.o: ../include/openssl/des.h ../include/openssl/des_old.h -passwd.o: ../include/openssl/dh.h ../include/openssl/dsa.h -passwd.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +passwd.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +passwd.o: ../include/openssl/bn.h ../include/openssl/buffer.h +passwd.o: ../include/openssl/cast.h ../include/openssl/conf.h +passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h +passwd.o: ../include/openssl/des_old.h ../include/openssl/dh.h +passwd.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +passwd.o: ../include/openssl/ec.h ../include/openssl/ecdh.h passwd.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h passwd.o: ../include/openssl/err.h ../include/openssl/evp.h passwd.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -728,13 +753,13 @@ passwd.o: ../include/openssl/txt_db.h ../include/openssl/ui.h passwd.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h passwd.o: ../include/openssl/x509_vfy.h apps.h passwd.c pkcs12.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -pkcs12.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -pkcs12.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -pkcs12.o: ../include/openssl/buffer.h ../include/openssl/cast.h -pkcs12.o: ../include/openssl/conf.h ../include/openssl/crypto.h -pkcs12.o: ../include/openssl/des.h ../include/openssl/des_old.h -pkcs12.o: ../include/openssl/dh.h ../include/openssl/dsa.h -pkcs12.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +pkcs12.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +pkcs12.o: ../include/openssl/bn.h ../include/openssl/buffer.h +pkcs12.o: ../include/openssl/cast.h ../include/openssl/conf.h +pkcs12.o: ../include/openssl/crypto.h ../include/openssl/des.h +pkcs12.o: ../include/openssl/des_old.h ../include/openssl/dh.h +pkcs12.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +pkcs12.o: ../include/openssl/ec.h ../include/openssl/ecdh.h pkcs12.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h pkcs12.o: ../include/openssl/err.h ../include/openssl/evp.h pkcs12.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -754,13 +779,13 @@ pkcs12.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h pkcs12.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h pkcs12.o: pkcs12.c pkcs7.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -pkcs7.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -pkcs7.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -pkcs7.o: ../include/openssl/buffer.h ../include/openssl/cast.h -pkcs7.o: ../include/openssl/conf.h ../include/openssl/crypto.h -pkcs7.o: ../include/openssl/des.h ../include/openssl/des_old.h -pkcs7.o: ../include/openssl/dh.h ../include/openssl/dsa.h -pkcs7.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +pkcs7.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +pkcs7.o: ../include/openssl/bn.h ../include/openssl/buffer.h +pkcs7.o: ../include/openssl/cast.h ../include/openssl/conf.h +pkcs7.o: ../include/openssl/crypto.h ../include/openssl/des.h +pkcs7.o: ../include/openssl/des_old.h ../include/openssl/dh.h +pkcs7.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +pkcs7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h pkcs7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h pkcs7.o: ../include/openssl/err.h ../include/openssl/evp.h pkcs7.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -779,13 +804,13 @@ pkcs7.o: ../include/openssl/txt_db.h ../include/openssl/ui.h pkcs7.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h pkcs7.o: ../include/openssl/x509_vfy.h apps.h pkcs7.c pkcs8.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -pkcs8.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -pkcs8.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -pkcs8.o: ../include/openssl/buffer.h ../include/openssl/cast.h -pkcs8.o: ../include/openssl/conf.h ../include/openssl/crypto.h -pkcs8.o: ../include/openssl/des.h ../include/openssl/des_old.h -pkcs8.o: ../include/openssl/dh.h ../include/openssl/dsa.h -pkcs8.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +pkcs8.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +pkcs8.o: ../include/openssl/bn.h ../include/openssl/buffer.h +pkcs8.o: ../include/openssl/cast.h ../include/openssl/conf.h +pkcs8.o: ../include/openssl/crypto.h ../include/openssl/des.h +pkcs8.o: ../include/openssl/des_old.h ../include/openssl/dh.h +pkcs8.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +pkcs8.o: ../include/openssl/ec.h ../include/openssl/ecdh.h pkcs8.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h pkcs8.o: ../include/openssl/err.h ../include/openssl/evp.h pkcs8.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -804,13 +829,13 @@ pkcs8.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h pkcs8.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h pkcs8.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h pkcs8.c rand.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -rand.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -rand.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -rand.o: ../include/openssl/buffer.h ../include/openssl/cast.h -rand.o: ../include/openssl/conf.h ../include/openssl/crypto.h -rand.o: ../include/openssl/des.h ../include/openssl/des_old.h -rand.o: ../include/openssl/dh.h ../include/openssl/dsa.h -rand.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +rand.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +rand.o: ../include/openssl/bn.h ../include/openssl/buffer.h +rand.o: ../include/openssl/cast.h ../include/openssl/conf.h +rand.o: ../include/openssl/crypto.h ../include/openssl/des.h +rand.o: ../include/openssl/des_old.h ../include/openssl/dh.h +rand.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h rand.o: ../include/openssl/err.h ../include/openssl/evp.h rand.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -828,13 +853,13 @@ rand.o: ../include/openssl/txt_db.h ../include/openssl/ui.h rand.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h rand.o: ../include/openssl/x509_vfy.h apps.h rand.c req.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -req.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -req.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -req.o: ../include/openssl/buffer.h ../include/openssl/cast.h -req.o: ../include/openssl/conf.h ../include/openssl/crypto.h -req.o: ../include/openssl/des.h ../include/openssl/des_old.h -req.o: ../include/openssl/dh.h ../include/openssl/dsa.h -req.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +req.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +req.o: ../include/openssl/bn.h ../include/openssl/buffer.h +req.o: ../include/openssl/cast.h ../include/openssl/conf.h +req.o: ../include/openssl/crypto.h ../include/openssl/des.h +req.o: ../include/openssl/des_old.h ../include/openssl/dh.h +req.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +req.o: ../include/openssl/ec.h ../include/openssl/ecdh.h req.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h req.o: ../include/openssl/err.h ../include/openssl/evp.h req.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -853,13 +878,13 @@ req.o: ../include/openssl/txt_db.h ../include/openssl/ui.h req.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h req.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h req.c rsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -rsa.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -rsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -rsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h -rsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h -rsa.o: ../include/openssl/des.h ../include/openssl/des_old.h -rsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h -rsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +rsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h +rsa.o: ../include/openssl/cast.h ../include/openssl/conf.h +rsa.o: ../include/openssl/crypto.h ../include/openssl/des.h +rsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h +rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +rsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h rsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h rsa.o: ../include/openssl/err.h ../include/openssl/evp.h rsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -878,13 +903,13 @@ rsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h rsa.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h rsa.o: ../include/openssl/x509_vfy.h apps.h rsa.c rsautl.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -rsautl.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -rsautl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -rsautl.o: ../include/openssl/buffer.h ../include/openssl/cast.h -rsautl.o: ../include/openssl/conf.h ../include/openssl/crypto.h -rsautl.o: ../include/openssl/des.h ../include/openssl/des_old.h -rsautl.o: ../include/openssl/dh.h ../include/openssl/dsa.h -rsautl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +rsautl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +rsautl.o: ../include/openssl/bn.h ../include/openssl/buffer.h +rsautl.o: ../include/openssl/cast.h ../include/openssl/conf.h +rsautl.o: ../include/openssl/crypto.h ../include/openssl/des.h +rsautl.o: ../include/openssl/des_old.h ../include/openssl/dh.h +rsautl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +rsautl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h rsautl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h rsautl.o: ../include/openssl/err.h ../include/openssl/evp.h rsautl.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -903,14 +928,14 @@ rsautl.o: ../include/openssl/txt_db.h ../include/openssl/ui.h rsautl.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h rsautl.o: ../include/openssl/x509_vfy.h apps.h rsautl.c s_cb.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s_cb.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s_cb.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s_cb.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s_cb.o: ../include/openssl/comp.h ../include/openssl/conf.h -s_cb.o: ../include/openssl/crypto.h ../include/openssl/des.h -s_cb.o: ../include/openssl/des_old.h ../include/openssl/dh.h -s_cb.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -s_cb.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +s_cb.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s_cb.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s_cb.o: ../include/openssl/cast.h ../include/openssl/comp.h +s_cb.o: ../include/openssl/conf.h ../include/openssl/crypto.h +s_cb.o: ../include/openssl/des.h ../include/openssl/des_old.h +s_cb.o: ../include/openssl/dh.h ../include/openssl/dsa.h +s_cb.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s_cb.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h s_cb.o: ../include/openssl/engine.h ../include/openssl/err.h s_cb.o: ../include/openssl/evp.h ../include/openssl/idea.h s_cb.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -932,14 +957,14 @@ s_cb.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s_cb.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h s_apps.h s_cb.o: s_cb.c s_client.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s_client.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s_client.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s_client.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s_client.o: ../include/openssl/comp.h ../include/openssl/conf.h -s_client.o: ../include/openssl/crypto.h ../include/openssl/des.h -s_client.o: ../include/openssl/des_old.h ../include/openssl/dh.h -s_client.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -s_client.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +s_client.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s_client.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s_client.o: ../include/openssl/cast.h ../include/openssl/comp.h +s_client.o: ../include/openssl/conf.h ../include/openssl/crypto.h +s_client.o: ../include/openssl/des.h ../include/openssl/des_old.h +s_client.o: ../include/openssl/dh.h ../include/openssl/dsa.h +s_client.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s_client.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h s_client.o: ../include/openssl/engine.h ../include/openssl/err.h s_client.o: ../include/openssl/evp.h ../include/openssl/idea.h s_client.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -961,14 +986,14 @@ s_client.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s_client.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h s_client.o: s_apps.h s_client.c s_server.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s_server.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s_server.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s_server.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s_server.o: ../include/openssl/comp.h ../include/openssl/conf.h -s_server.o: ../include/openssl/crypto.h ../include/openssl/des.h -s_server.o: ../include/openssl/des_old.h ../include/openssl/dh.h -s_server.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -s_server.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +s_server.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s_server.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s_server.o: ../include/openssl/cast.h ../include/openssl/comp.h +s_server.o: ../include/openssl/conf.h ../include/openssl/crypto.h +s_server.o: ../include/openssl/des.h ../include/openssl/des_old.h +s_server.o: ../include/openssl/dh.h ../include/openssl/dsa.h +s_server.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s_server.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h s_server.o: ../include/openssl/engine.h ../include/openssl/err.h s_server.o: ../include/openssl/evp.h ../include/openssl/idea.h s_server.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -990,14 +1015,14 @@ s_server.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s_server.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h s_server.o: s_apps.h s_server.c s_socket.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s_socket.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s_socket.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s_socket.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s_socket.o: ../include/openssl/comp.h ../include/openssl/conf.h -s_socket.o: ../include/openssl/crypto.h ../include/openssl/des.h -s_socket.o: ../include/openssl/des_old.h ../include/openssl/dh.h -s_socket.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -s_socket.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +s_socket.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s_socket.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s_socket.o: ../include/openssl/cast.h ../include/openssl/comp.h +s_socket.o: ../include/openssl/conf.h ../include/openssl/crypto.h +s_socket.o: ../include/openssl/des.h ../include/openssl/des_old.h +s_socket.o: ../include/openssl/dh.h ../include/openssl/dsa.h +s_socket.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s_socket.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h s_socket.o: ../include/openssl/engine.h ../include/openssl/err.h s_socket.o: ../include/openssl/evp.h ../include/openssl/idea.h s_socket.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -1019,14 +1044,14 @@ s_socket.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s_socket.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h s_socket.o: s_apps.h s_socket.c s_time.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s_time.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s_time.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s_time.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s_time.o: ../include/openssl/comp.h ../include/openssl/conf.h -s_time.o: ../include/openssl/crypto.h ../include/openssl/des.h -s_time.o: ../include/openssl/des_old.h ../include/openssl/dh.h -s_time.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -s_time.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +s_time.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s_time.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s_time.o: ../include/openssl/cast.h ../include/openssl/comp.h +s_time.o: ../include/openssl/conf.h ../include/openssl/crypto.h +s_time.o: ../include/openssl/des.h ../include/openssl/des_old.h +s_time.o: ../include/openssl/dh.h ../include/openssl/dsa.h +s_time.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s_time.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h s_time.o: ../include/openssl/engine.h ../include/openssl/err.h s_time.o: ../include/openssl/evp.h ../include/openssl/idea.h s_time.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -1048,14 +1073,14 @@ s_time.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s_time.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h s_time.o: s_apps.h s_time.c sess_id.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -sess_id.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -sess_id.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -sess_id.o: ../include/openssl/buffer.h ../include/openssl/cast.h -sess_id.o: ../include/openssl/comp.h ../include/openssl/conf.h -sess_id.o: ../include/openssl/crypto.h ../include/openssl/des.h -sess_id.o: ../include/openssl/des_old.h ../include/openssl/dh.h -sess_id.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -sess_id.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +sess_id.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +sess_id.o: ../include/openssl/bn.h ../include/openssl/buffer.h +sess_id.o: ../include/openssl/cast.h ../include/openssl/comp.h +sess_id.o: ../include/openssl/conf.h ../include/openssl/crypto.h +sess_id.o: ../include/openssl/des.h ../include/openssl/des_old.h +sess_id.o: ../include/openssl/dh.h ../include/openssl/dsa.h +sess_id.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +sess_id.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h sess_id.o: ../include/openssl/engine.h ../include/openssl/err.h sess_id.o: ../include/openssl/evp.h ../include/openssl/idea.h sess_id.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -1077,13 +1102,13 @@ sess_id.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h sess_id.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h sess_id.o: sess_id.c smime.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -smime.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -smime.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -smime.o: ../include/openssl/buffer.h ../include/openssl/cast.h -smime.o: ../include/openssl/conf.h ../include/openssl/crypto.h -smime.o: ../include/openssl/des.h ../include/openssl/des_old.h -smime.o: ../include/openssl/dh.h ../include/openssl/dsa.h -smime.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +smime.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +smime.o: ../include/openssl/bn.h ../include/openssl/buffer.h +smime.o: ../include/openssl/cast.h ../include/openssl/conf.h +smime.o: ../include/openssl/crypto.h ../include/openssl/des.h +smime.o: ../include/openssl/des_old.h ../include/openssl/dh.h +smime.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +smime.o: ../include/openssl/ec.h ../include/openssl/ecdh.h smime.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h smime.o: ../include/openssl/err.h ../include/openssl/evp.h smime.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -1102,13 +1127,13 @@ smime.o: ../include/openssl/txt_db.h ../include/openssl/ui.h smime.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h smime.o: ../include/openssl/x509_vfy.h apps.h smime.c speed.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -speed.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -speed.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -speed.o: ../include/openssl/buffer.h ../include/openssl/cast.h -speed.o: ../include/openssl/conf.h ../include/openssl/crypto.h -speed.o: ../include/openssl/des.h ../include/openssl/des_old.h -speed.o: ../include/openssl/dh.h ../include/openssl/dsa.h -speed.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +speed.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +speed.o: ../include/openssl/bn.h ../include/openssl/buffer.h +speed.o: ../include/openssl/cast.h ../include/openssl/conf.h +speed.o: ../include/openssl/crypto.h ../include/openssl/des.h +speed.o: ../include/openssl/des_old.h ../include/openssl/dh.h +speed.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +speed.o: ../include/openssl/ec.h ../include/openssl/ecdh.h speed.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h speed.o: ../include/openssl/err.h ../include/openssl/evp.h speed.o: ../include/openssl/hmac.h ../include/openssl/idea.h @@ -1127,13 +1152,13 @@ speed.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h speed.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h speed.c speed.o: testdsa.h testrsa.h spkac.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -spkac.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -spkac.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -spkac.o: ../include/openssl/buffer.h ../include/openssl/cast.h -spkac.o: ../include/openssl/conf.h ../include/openssl/crypto.h -spkac.o: ../include/openssl/des.h ../include/openssl/des_old.h -spkac.o: ../include/openssl/dh.h ../include/openssl/dsa.h -spkac.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +spkac.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +spkac.o: ../include/openssl/bn.h ../include/openssl/buffer.h +spkac.o: ../include/openssl/cast.h ../include/openssl/conf.h +spkac.o: ../include/openssl/crypto.h ../include/openssl/des.h +spkac.o: ../include/openssl/des_old.h ../include/openssl/dh.h +spkac.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +spkac.o: ../include/openssl/ec.h ../include/openssl/ecdh.h spkac.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h spkac.o: ../include/openssl/err.h ../include/openssl/evp.h spkac.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -1152,13 +1177,13 @@ spkac.o: ../include/openssl/txt_db.h ../include/openssl/ui.h spkac.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h spkac.o: ../include/openssl/x509_vfy.h apps.h spkac.c verify.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -verify.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -verify.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -verify.o: ../include/openssl/buffer.h ../include/openssl/cast.h -verify.o: ../include/openssl/conf.h ../include/openssl/crypto.h -verify.o: ../include/openssl/des.h ../include/openssl/des_old.h -verify.o: ../include/openssl/dh.h ../include/openssl/dsa.h -verify.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +verify.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +verify.o: ../include/openssl/bn.h ../include/openssl/buffer.h +verify.o: ../include/openssl/cast.h ../include/openssl/conf.h +verify.o: ../include/openssl/crypto.h ../include/openssl/des.h +verify.o: ../include/openssl/des_old.h ../include/openssl/dh.h +verify.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +verify.o: ../include/openssl/ec.h ../include/openssl/ecdh.h verify.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h verify.o: ../include/openssl/err.h ../include/openssl/evp.h verify.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -1178,13 +1203,13 @@ verify.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h verify.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h verify.o: verify.c version.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -version.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -version.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -version.o: ../include/openssl/buffer.h ../include/openssl/cast.h -version.o: ../include/openssl/conf.h ../include/openssl/crypto.h -version.o: ../include/openssl/des.h ../include/openssl/des_old.h -version.o: ../include/openssl/dh.h ../include/openssl/dsa.h -version.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +version.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +version.o: ../include/openssl/bn.h ../include/openssl/buffer.h +version.o: ../include/openssl/cast.h ../include/openssl/conf.h +version.o: ../include/openssl/crypto.h ../include/openssl/des.h +version.o: ../include/openssl/des_old.h ../include/openssl/dh.h +version.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +version.o: ../include/openssl/ec.h ../include/openssl/ecdh.h version.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h version.o: ../include/openssl/err.h ../include/openssl/evp.h version.o: ../include/openssl/idea.h ../include/openssl/lhash.h @@ -1202,13 +1227,13 @@ version.o: ../include/openssl/txt_db.h ../include/openssl/ui.h version.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h version.o: ../include/openssl/x509_vfy.h apps.h version.c x509.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -x509.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -x509.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -x509.o: ../include/openssl/buffer.h ../include/openssl/cast.h -x509.o: ../include/openssl/conf.h ../include/openssl/crypto.h -x509.o: ../include/openssl/des.h ../include/openssl/des_old.h -x509.o: ../include/openssl/dh.h ../include/openssl/dsa.h -x509.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +x509.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +x509.o: ../include/openssl/bn.h ../include/openssl/buffer.h +x509.o: ../include/openssl/cast.h ../include/openssl/conf.h +x509.o: ../include/openssl/crypto.h ../include/openssl/des.h +x509.o: ../include/openssl/des_old.h ../include/openssl/dh.h +x509.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +x509.o: ../include/openssl/ec.h ../include/openssl/ecdh.h x509.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h x509.o: ../include/openssl/err.h ../include/openssl/evp.h x509.o: ../include/openssl/idea.h ../include/openssl/lhash.h diff --git a/apps/apps.c b/apps/apps.c index a302119d7f..6f64e6313f 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -798,7 +798,7 @@ end: return(x); } -EVP_PKEY *load_key(BIO *err, const char *file, int format, +EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin, const char *pass, ENGINE *e, const char *key_descrip) { BIO *key=NULL; @@ -808,7 +808,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, cb_data.password = pass; cb_data.prompt_info = file; - if (file == NULL) + if (file == NULL && (!maybe_stdin || format == FORMAT_ENGINE)) { BIO_printf(err,"no keyfile specified\n"); goto end; @@ -828,12 +828,19 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, ERR_print_errors(err); goto end; } - if (BIO_read_filename(key,file) <= 0) + if (file == NULL && maybe_stdin) { - BIO_printf(err, "Error opening %s %s\n", key_descrip, file); - ERR_print_errors(err); - goto end; + setvbuf(stdin, NULL, _IONBF, 0); + BIO_set_fp(key,stdin,BIO_NOCLOSE); } + else + if (BIO_read_filename(key,file) <= 0) + { + BIO_printf(err, "Error opening %s %s\n", + key_descrip, file); + ERR_print_errors(err); + goto end; + } if (format == FORMAT_ASN1) { pkey=d2i_PrivateKey_bio(key, NULL); @@ -867,7 +874,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, return(pkey); } -EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, +EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin, const char *pass, ENGINE *e, const char *key_descrip) { BIO *key=NULL; @@ -877,7 +884,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, cb_data.password = pass; cb_data.prompt_info = file; - if (file == NULL) + if (file == NULL && (!maybe_stdin || format == FORMAT_ENGINE)) { BIO_printf(err,"no keyfile specified\n"); goto end; @@ -897,11 +904,18 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, ERR_print_errors(err); goto end; } - if (BIO_read_filename(key,file) <= 0) + if (file == NULL && maybe_stdin) { - BIO_printf(err, "Error opening %s %s\n", key_descrip, file); - ERR_print_errors(err); - goto end; + setvbuf(stdin, NULL, _IONBF, 0); + BIO_set_fp(key,stdin,BIO_NOCLOSE); + } + else + if (BIO_read_filename(key,file) <= 0) + { + BIO_printf(err, "Error opening %s %s\n", + key_descrip, file); + ERR_print_errors(err); + goto end; } if (format == FORMAT_ASN1) { diff --git a/apps/apps.h b/apps/apps.h index a88902ac13..32a79605ee 100644 --- a/apps/apps.h +++ b/apps/apps.h @@ -233,9 +233,9 @@ int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2); int add_oid_section(BIO *err, CONF *conf); X509 *load_cert(BIO *err, const char *file, int format, const char *pass, ENGINE *e, const char *cert_descrip); -EVP_PKEY *load_key(BIO *err, const char *file, int format, +EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin, const char *pass, ENGINE *e, const char *key_descrip); -EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, +EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin, const char *pass, ENGINE *e, const char *key_descrip); STACK_OF(X509) *load_certs(BIO *err, const char *file, int format, const char *pass, ENGINE *e, const char *cert_descrip); @@ -699,7 +699,7 @@ bad: goto err; } } - pkey = load_key(bio_err, keyfile, keyform, key, e, + pkey = load_key(bio_err, keyfile, keyform, 0, key, e, "CA private key"); if (key) memset(key,0,strlen(key)); if (pkey == NULL) @@ -1515,7 +1515,7 @@ bad: else #endif #ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) + if (pkey->type == EVP_PKEY_EC) dgst=EVP_ecdsa(); else #endif @@ -2094,9 +2094,8 @@ again2: } } - row[DB_name]=X509_NAME_oneline(dn_subject,NULL,0); row[DB_serial]=BN_bn2hex(serial); - if ((row[DB_name] == NULL) || (row[DB_serial] == NULL)) + if (row[DB_serial] == NULL) { BIO_printf(bio_err,"Memory allocation failure\n"); goto err; @@ -2294,7 +2293,7 @@ again2: EVP_PKEY_free(pktmp); #endif #ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) + if (pkey->type == EVP_PKEY_EC) dgst = EVP_ecdsa(); pktmp = X509_get_pubkey(ret); if (EVP_PKEY_missing_parameters(pktmp) && @@ -2319,10 +2318,10 @@ again2: /* row[DB_serial] done already */ row[DB_file]=(char *)OPENSSL_malloc(8); - /* row[DB_name] done already */ + row[DB_name]=X509_NAME_oneline(X509_get_subject_name(ret),NULL,0); if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || - (row[DB_file] == NULL)) + (row[DB_file] == NULL) || (row[DB_name] == NULL)) { BIO_printf(bio_err,"Memory allocation failure\n"); goto err; diff --git a/apps/dgst.c b/apps/dgst.c index e21c3d83ac..32e40c1f53 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -277,10 +277,10 @@ int MAIN(int argc, char **argv) if(keyfile) { if (want_pub) - sigkey = load_pubkey(bio_err, keyfile, keyform, NULL, + sigkey = load_pubkey(bio_err, keyfile, keyform, 0, NULL, e, "key file"); else - sigkey = load_key(bio_err, keyfile, keyform, NULL, + sigkey = load_key(bio_err, keyfile, keyform, 0, NULL, e, "key file"); if (!sigkey) { diff --git a/apps/ecdsa.c b/apps/ecdsa.c index 91c8d1d7d7..f54590d61f 100644 --- a/apps/ecdsa.c +++ b/apps/ecdsa.c @@ -60,8 +60,8 @@ #include "apps.h" #include <openssl/bio.h> #include <openssl/err.h> -#include <openssl/ecdsa.h> #include <openssl/evp.h> +#include <openssl/ecdsa.h> #include <openssl/x509.h> #include <openssl/pem.h> @@ -85,7 +85,7 @@ int MAIN(int argc, char **argv) { ENGINE *e = NULL; int ret = 1; - ECDSA *ecdsa = NULL; + EC_KEY *eckey = NULL; int i, badops = 0; const EVP_CIPHER *enc = NULL; BIO *in = NULL, *out = NULL; @@ -279,17 +279,17 @@ bad: if (informat == FORMAT_ASN1) { if (pubin) - ecdsa = d2i_ECDSA_PUBKEY_bio(in, NULL); + eckey = d2i_EC_PUBKEY_bio(in, NULL); else - ecdsa = d2i_ECDSAPrivateKey_bio(in, NULL); + eckey = d2i_ECPrivateKey_bio(in, NULL); } else if (informat == FORMAT_PEM) { if (pubin) - ecdsa = PEM_read_bio_ECDSA_PUBKEY(in, NULL, NULL, + eckey = PEM_read_bio_EC_PUBKEY(in, NULL, NULL, NULL); else - ecdsa = PEM_read_bio_ECDSAPrivateKey(in, NULL, NULL, + eckey = PEM_read_bio_ECPrivateKey(in, NULL, NULL, passin); } else @@ -297,7 +297,7 @@ bad: BIO_printf(bio_err, "bad input format specified for key\n"); goto end; } - if (ecdsa == NULL) + if (eckey == NULL) { BIO_printf(bio_err,"unable to load Key\n"); ERR_print_errors(bio_err); @@ -325,15 +325,15 @@ bad: if (new_form) { - EC_GROUP_set_point_conversion_form(ecdsa->group, form); - ECDSA_set_conversion_form(ecdsa, form); + EC_GROUP_set_point_conversion_form(eckey->group, form); + eckey->conv_form = form; } if (new_asn1_flag) - EC_GROUP_set_asn1_flag(ecdsa->group, asn1_flag); + EC_GROUP_set_asn1_flag(eckey->group, asn1_flag); if (text) - if (!ECDSA_print(out, ecdsa, 0)) + if (!EC_KEY_print(out, eckey, 0)) { perror(outfile); ERR_print_errors(bio_err); @@ -343,24 +343,24 @@ bad: if (noout) goto end; - BIO_printf(bio_err, "writing ECDSA key\n"); + BIO_printf(bio_err, "writing EC key\n"); if (outformat == FORMAT_ASN1) { if (param_out) - i = i2d_ECPKParameters_bio(out, ecdsa->group); + i = i2d_ECPKParameters_bio(out, eckey->group); else if (pubin || pubout) - i = i2d_ECDSA_PUBKEY_bio(out, ecdsa); + i = i2d_EC_PUBKEY_bio(out, eckey); else - i = i2d_ECDSAPrivateKey_bio(out, ecdsa); + i = i2d_ECPrivateKey_bio(out, eckey); } else if (outformat == FORMAT_PEM) { if (param_out) - i = PEM_write_bio_ECPKParameters(out, ecdsa->group); + i = PEM_write_bio_ECPKParameters(out, eckey->group); else if (pubin || pubout) - i = PEM_write_bio_ECDSA_PUBKEY(out, ecdsa); + i = PEM_write_bio_EC_PUBKEY(out, eckey); else - i = PEM_write_bio_ECDSAPrivateKey(out, ecdsa, enc, + i = PEM_write_bio_ECPrivateKey(out, eckey, enc, NULL, 0, NULL, passout); } else @@ -382,8 +382,8 @@ end: BIO_free(in); if (out) BIO_free_all(out); - if (ecdsa) - ECDSA_free(ecdsa); + if (eckey) + EC_KEY_free(eckey); if (passin) OPENSSL_free(passin); if (passout) diff --git a/apps/ecparam.c b/apps/ecparam.c index 126a52ac02..228791decd 100644 --- a/apps/ecparam.c +++ b/apps/ecparam.c @@ -1,4 +1,7 @@ /* apps/ecparam.c */ +/* + * Originally written by Nils Larsch for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -52,7 +55,33 @@ * Hudson (tjh@cryptsoft.com). * */ -#ifndef OPENSSL_NO_ECDSA +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ +#ifndef OPENSSL_NO_EC #include <assert.h> #include <stdio.h> #include <stdlib.h> @@ -63,7 +92,9 @@ #include <openssl/err.h> #include <openssl/bn.h> #include <openssl/ec.h> +#ifndef OPENSSL_NO_ECDSA #include <openssl/ecdsa.h> +#endif #include <openssl/x509.h> #include <openssl/pem.h> @@ -97,27 +128,74 @@ * -engine e - use engine e, possible a hardware device */ -static const char *curve_list[20] = { - "prime192v1 - NIST recommended curve over a 192 bit prime field", - "prime192v2 - 192 bit prime curve from the X9.62 draft", - "prime192v3 - 192 bit prime curve from the X9.62 draft", - "prime239v1 - 239 bit prime curve from the X9.62 draft", - "prime239v2 - 239 bit prime curve from the X9.62 draft", - "prime239v3 - 239 bit prime curve from the X9.62 draft", - "prime256v1 - NIST recommended curve over a 256 bit prime field", - "secp112r1 - SECG recommended curve over a 112 bit prime field", - "secp112r2 - SECG recommended curve over a 112 bit prime field", - "secp128r1 - SECG recommended curve over a 128 bit prime field", - "secp128r2 - SECG recommended curve over a 128 bit prime field", - "secp160k1 - SECG recommended curve over a 160 bit prime field", - "secp160r1 - SECG recommended curve over a 160 bit prime field", - "secp160r2 - SECG recommended curve over a 160 bit prime field", - "secp192k1 - SECG recommended curve over a 192 bit prime field", - "secp224k1 - SECG recommended curve over a 224 bit prime field", - "secp224r1 - NIST recommended curve over a 224 bit prime field", - "secp256k1 - SECG recommended curve over a 256 bit prime field", - "secp384r1 - NIST recommended curve over a 384 bit prime field", - "secp521r1 - NIST recommended curve over a 521 bit prime field" +static const char *curve_list[67] = { + "prime192v1 - 192 bit prime curve from the X9.62 draft", + "prime192v2 - 192 bit prime curve from the X9.62 draft", + "prime192v3 - 192 bit prime curve from the X9.62 draft", + "prime239v1 - 239 bit prime curve from the X9.62 draft", + "prime239v2 - 239 bit prime curve from the X9.62 draft", + "prime239v3 - 239 bit prime curve from the X9.62 draft", + "prime256v1 - 256 bit prime curve from the X9.62 draft", + "secp112r1 - SECG recommended curve over a 112 bit prime field", + "secp112r2 - SECG recommended curve over a 112 bit prime field", + "secp128r1 - SECG recommended curve over a 128 bit prime field", + "secp128r2 - SECG recommended curve over a 128 bit prime field", + "secp160k1 - SECG recommended curve over a 160 bit prime field", + "secp160r1 - SECG recommended curve over a 160 bit prime field", + "secp160r2 - SECG recommended curve over a 160 bit prime field", + "secp192k1 - SECG recommended curve over a 192 bit prime field", + "prime192v1 - SECG recommended curve over a 192 bit prime field (aka secp192r1)", + "secp224k1 - SECG recommended curve over a 224 bit prime field", + "secp224r1 - SECG/NIST recommended curve over a 224 bit prime field", + "secp256k1 - SECG recommended curve over a 256 bit prime field", + "prime256v1 - SECG recommended curve over a 256 bit prime field (aka secp256r1)", + "secp384r1 - SECG/NIST recommended curve over a 384 bit prime field", + "secp521r1 - SECG/NIST recommended curve over a 521 bit prime field", + "wap-wsg-idm-ecid-wtls6 - 112 bit prime curve from the WTLS standard", + "wap-wsg-idm-ecid-wtls8 - 112 bit prime curve from the WTLS standard", + "wap-wsg-idm-ecid-wtls7 - 160 bit prime curve from the WTLS standard", + "wap-wsg-idm-ecid-wtls9 - 160 bit prime curve from the WTLS standard", + "wap-wsg-idm-ecid-wtls12 - 224 bit prime curve from the WTLS standard", + "c2pnb163v1 - 163 bit binary curve from the X9.62 draft", + "c2pnb163v2 - 163 bit binary curve from the X9.62 draft", + "c2pnb163v3 - 163 bit binary curve from the X9.62 draft", + "c2pnb176v1 - 176 bit binary curve from the X9.62 draft", + "c2tnb191v1 - 191 bit binary curve from the X9.62 draft", + "c2tnb191v2 - 191 bit binary curve from the X9.62 draft", + "c2tnb191v3 - 191 bit binary curve from the X9.62 draft", + "c2pnb208w1 - 208 bit binary curve from the X9.62 draft", + "c2tnb239v1 - 239 bit binary curve from the X9.62 draft", + "c2tnb239v2 - 239 bit binary curve from the X9.62 draft", + "c2tnb239v3 - 239 bit binary curve from the X9.62 draft", + "c2pnb272w1 - 272 bit binary curve from the X9.62 draft", + "c2pnb304w1 - 304 bit binary curve from the X9.62 draft", + "c2tnb359v1 - 359 bit binary curve from the X9.62 draft", + "c2pnb368w1 - 368 bit binary curve from the X9.62 draft", + "c2tnb431r1 - 431 bit binary curve from the X9.62 draft", + "sect113r1 - SECG recommended curve over a 113 bit binary field", + "sect113r2 - SECG recommended curve over a 113 bit binary field", + "sect131r1 - SECG recommended curve over a 131 bit binary field", + "sect131r2 - SECG recommended curve over a 131 bit binary field", + "sect163k1 - SECG/NIST recommended curve over a 163 bit binary field", + "sect163r1 - SECG recommended curve over a 163 bit binary field", + "sect163r2 - SECG/NIST recommended curve over a 163 bit binary field", + "sect193r1 - SECG recommended curve over a 193 bit binary field", + "sect193r2 - SECG recommended curve over a 193 bit binary field", + "sect233k1 - SECG/NIST recommended curve over a 233 bit binary field", + "sect233r1 - SECG/NIST recommended curve over a 233 bit binary field", + "sect239k1 - SECG recommended curve over a 239 bit binary field", + "sect283k1 - SECG/NIST recommended curve over a 283 bit binary field", + "sect283r1 - SECG/NIST recommended curve over a 283 bit binary field", + "sect409k1 - SECG/NIST recommended curve over a 409 bit binary field", + "sect409r1 - SECG/NIST recommended curve over a 409 bit binary field", + "sect571k1 - SECG/NIST recommended curve over a 571 bit binary field", + "sect571r1 - SECG/NIST recommended curve over a 571 bit binary field", + "wap-wsg-idm-ecid-wtls1 - 113 bit binary curve from the WTLS standard", + "wap-wsg-idm-ecid-wtls4 - 113 bit binary curve from the WTLS standard", + "wap-wsg-idm-ecid-wtls3 - 163 bit binary curve from the WTLS standard", + "wap-wsg-idm-ecid-wtls5 - 163 bit binary curve from the WTLS standard", + "wap-wsg-idm-ecid-wtls10 - 233 bit binary curve from the WTLS standard", + "wap-wsg-idm-ecid-wtls11 - 233 bit binary curve from the WTLS standard" }; static int ecparam_print_var(BIO *,BIGNUM *,const char *,int,unsigned char *); @@ -600,36 +678,36 @@ bad: if (genkey) { - ECDSA *ecdsa = ECDSA_new(); + EC_KEY *eckey = EC_KEY_new(); - if (ecdsa == NULL) + if (eckey == NULL) goto end; assert(need_rand); - ecdsa->group = group; + eckey->group = group; - if (!ECDSA_generate_key(ecdsa)) + if (!EC_KEY_generate_key(eckey)) { - ecdsa->group = NULL; - ECDSA_free(ecdsa); + eckey->group = NULL; + EC_KEY_free(eckey); goto end; } if (outformat == FORMAT_ASN1) - i = i2d_ECDSAPrivateKey_bio(out, ecdsa); + i = i2d_ECPrivateKey_bio(out, eckey); else if (outformat == FORMAT_PEM) - i = PEM_write_bio_ECDSAPrivateKey(out, ecdsa, NULL, + i = PEM_write_bio_ECPrivateKey(out, eckey, NULL, NULL, 0, NULL, NULL); else { BIO_printf(bio_err, "bad output format specified " "for outfile\n"); - ecdsa->group = NULL; - ECDSA_free(ecdsa); + eckey->group = NULL; + EC_KEY_free(eckey); goto end; } - ecdsa->group = NULL; - ECDSA_free(ecdsa); + eckey->group = NULL; + EC_KEY_free(eckey); } if (need_rand) diff --git a/apps/ocsp.c b/apps/ocsp.c index 49a156a1cf..59b97a634b 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -613,11 +613,11 @@ int MAIN(int argc, char **argv) NULL, e, "CA certificate"); if (rcertfile) { - rother = load_certs(bio_err, sign_certfile, FORMAT_PEM, + rother = load_certs(bio_err, rcertfile, FORMAT_PEM, NULL, e, "responder other certificates"); - if (!sign_other) goto end; + if (!rother) goto end; } - rkey = load_key(bio_err, rkeyfile, FORMAT_PEM, NULL, NULL, + rkey = load_key(bio_err, rkeyfile, FORMAT_PEM, 0, NULL, NULL, "responder private key"); if (!rkey) goto end; @@ -663,7 +663,7 @@ int MAIN(int argc, char **argv) NULL, e, "signer certificates"); if (!sign_other) goto end; } - key = load_key(bio_err, keyfile, FORMAT_PEM, NULL, NULL, + key = load_key(bio_err, keyfile, FORMAT_PEM, 0, NULL, NULL, "signer private key"); if (!key) goto end; diff --git a/apps/pkcs12.c b/apps/pkcs12.c index e345cf1489..73550d1801 100644 --- a/apps/pkcs12.c +++ b/apps/pkcs12.c @@ -427,7 +427,7 @@ int MAIN(int argc, char **argv) CRYPTO_push_info("process -export_cert"); CRYPTO_push_info("reading private key"); #endif - key = load_key(bio_err, keyname ? keyname : infile, FORMAT_PEM, + key = load_key(bio_err, keyname ? keyname : infile, FORMAT_PEM, 1, passin, e, "private key"); if (!key) { goto export_end; diff --git a/apps/pkcs8.c b/apps/pkcs8.c index ba91caee6b..912e32006b 100644 --- a/apps/pkcs8.c +++ b/apps/pkcs8.c @@ -222,7 +222,8 @@ int MAIN(int argc, char **argv) if (topk8) { BIO_free(in); /* Not needed in this section */ - pkey = load_key(bio_err, infile, informat, passin, e, "key"); + pkey = load_key(bio_err, infile, informat, 1, + passin, e, "key"); if (!pkey) { return (1); } diff --git a/apps/req.c b/apps/req.c index 75a3604061..1f24be79bd 100644 --- a/apps/req.c +++ b/apps/req.c @@ -142,7 +142,7 @@ static int batch=0; #define TYPE_RSA 1 #define TYPE_DSA 2 #define TYPE_DH 3 -#define TYPE_ECDSA 4 +#define TYPE_EC 4 int MAIN(int, char **); @@ -152,8 +152,8 @@ int MAIN(int argc, char **argv) #ifndef OPENSSL_NO_DSA DSA *dsa_params=NULL; #endif -#ifndef OPENSSL_NO_ECDSA - ECDSA *ecdsa_params = NULL; +#ifndef OPENSSL_NO_EC + EC_KEY *ec_params = NULL; #endif unsigned long nmflag = 0; int ex=1,x509=0,days=30; @@ -327,41 +327,41 @@ int MAIN(int argc, char **argv) } else #endif -#ifndef OPENSSL_NO_ECDSA +#ifndef OPENSSL_NO_EC if (strncmp("ecdsa:",p,4) == 0) { X509 *xtmp=NULL; EVP_PKEY *dtmp; - pkey_type=TYPE_ECDSA; + pkey_type=TYPE_EC; p+=6; if ((in=BIO_new_file(p,"r")) == NULL) { perror(p); goto end; } - if ((ecdsa_params = ECDSA_new()) == NULL) + if ((ec_params = EC_KEY_new()) == NULL) goto end; - if ((ecdsa_params->group = PEM_read_bio_ECPKParameters(in, NULL, NULL, NULL)) == NULL) + if ((ec_params->group = PEM_read_bio_ECPKParameters(in, NULL, NULL, NULL)) == NULL) { - if (ecdsa_params) - ECDSA_free(ecdsa_params); + if (ec_params) + EC_KEY_free(ec_params); ERR_clear_error(); (void)BIO_reset(in); if ((xtmp=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL) { - BIO_printf(bio_err,"unable to load ECDSA parameters from file\n"); + BIO_printf(bio_err,"unable to load EC parameters from file\n"); goto end; } if ((dtmp=X509_get_pubkey(xtmp)) == NULL) goto end; - if (dtmp->type == EVP_PKEY_ECDSA) - ecdsa_params = ECDSAParameters_dup(dtmp->pkey.ecdsa); + if (dtmp->type == EVP_PKEY_EC) + ec_params = ECParameters_dup(dtmp->pkey.eckey); EVP_PKEY_free(dtmp); X509_free(xtmp); - if (ecdsa_params == NULL) + if (ec_params == NULL) { - BIO_printf(bio_err,"Certificate does not contain ECDSA parameters\n"); + BIO_printf(bio_err,"Certificate does not contain EC parameters\n"); goto end; } } @@ -369,16 +369,7 @@ int MAIN(int argc, char **argv) BIO_free(in); in=NULL; - { - BIGNUM *order = BN_new(); - - if (!order) - goto end; - if (!EC_GROUP_get_order(ecdsa_params->group, order, NULL)) - goto end; - newkey = BN_num_bits(order); - BN_free(order); - } + newkey = EC_GROUP_get_degree(ec_params->group); } else @@ -683,7 +674,7 @@ bad: if (keyfile != NULL) { - pkey = load_key(bio_err, keyfile, keyform, passin, e, + pkey = load_key(bio_err, keyfile, keyform, 0, passin, e, "Private Key"); if (!pkey) { @@ -691,7 +682,8 @@ bad: message */ goto end; } - if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA || EVP_PKEY_type(pkey->type) == EVP_PKEY_ECDSA) + if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA || + EVP_PKEY_type(pkey->type) == EVP_PKEY_EC) { char *randfile = NCONF_get_string(req_conf,SECTION,"RANDFILE"); if (randfile == NULL) @@ -745,12 +737,13 @@ bad: dsa_params=NULL; } #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey_type == TYPE_ECDSA) +#ifndef OPENSSL_NO_EC + if (pkey_type == TYPE_EC) { - if (!ECDSA_generate_key(ecdsa_params)) goto end; - if (!EVP_PKEY_assign_ECDSA(pkey, ecdsa_params)) goto end; - ecdsa_params = NULL; + if (!EC_KEY_generate_key(ec_params)) goto end; + if (!EVP_PKEY_assign_EC_KEY(pkey, ec_params)) + goto end; + ec_params = NULL; } #endif @@ -860,7 +853,7 @@ loop: digest=EVP_dss1(); #endif #ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) + if (pkey->type == EVP_PKEY_EC) digest=EVP_ecdsa(); #endif if (req == NULL) @@ -1144,8 +1137,8 @@ end: #ifndef OPENSSL_NO_DSA if (dsa_params != NULL) DSA_free(dsa_params); #endif -#ifndef OPENSSL_NO_ECDSA - if (ecdsa_params != NULL) ECDSA_free(ecdsa_params); +#ifndef OPENSSL_NO_EC + if (ec_params != NULL) EC_KEY_free(ec_params); #endif apps_shutdown(); EXIT(ex); diff --git a/apps/rsa.c b/apps/rsa.c index 60a3381527..4e19bc16fb 100644 --- a/apps/rsa.c +++ b/apps/rsa.c @@ -238,12 +238,12 @@ bad: if (pubin) pkey = load_pubkey(bio_err, infile, (informat == FORMAT_NETSCAPE && sgckey ? - FORMAT_IISSGC : informat), + FORMAT_IISSGC : informat), 1, passin, e, "Public Key"); else pkey = load_key(bio_err, infile, (informat == FORMAT_NETSCAPE && sgckey ? - FORMAT_IISSGC : informat), + FORMAT_IISSGC : informat), 1, passin, e, "Private Key"); if (pkey != NULL) diff --git a/apps/rsautl.c b/apps/rsautl.c index 9b02e6782e..36957e5b84 100644 --- a/apps/rsautl.c +++ b/apps/rsautl.c @@ -169,12 +169,12 @@ int MAIN(int argc, char **argv) switch(key_type) { case KEY_PRIVKEY: - pkey = load_key(bio_err, keyfile, keyform, + pkey = load_key(bio_err, keyfile, keyform, 0, NULL, e, "Private Key"); break; case KEY_PUBKEY: - pkey = load_pubkey(bio_err, keyfile, keyform, + pkey = load_pubkey(bio_err, keyfile, keyform, 0, NULL, e, "Public Key"); break; diff --git a/apps/s_server.c b/apps/s_server.c index b32a7f5b07..3fe402cea0 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -108,6 +108,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <assert.h> #include <stdio.h> @@ -168,6 +173,7 @@ static int generate_session_id(const SSL *ssl, unsigned char *id, static DH *load_dh_param(char *dhfile); static DH *get_dh512(void); #endif + #ifdef MONOLITH static void s_server_init(void); #endif @@ -206,6 +212,7 @@ static DH *get_dh512(void) } #endif + /* static int load_CA(SSL_CTX *ctx, char *file);*/ #undef BUFSIZZ @@ -283,6 +290,11 @@ static void sv_usage(void) BIO_printf(bio_err," -dkey arg - second private key file to use (usually for DSA)\n"); BIO_printf(bio_err," -dhparam arg - DH parameter file to use, in cert file if not specified\n"); BIO_printf(bio_err," or a default set of parameters is used\n"); +#ifndef OPENSSL_NO_ECDH + BIO_printf(bio_err," -named_curve arg - Elliptic curve name to use for ephemeral ECDH keys.\n" \ + " Use \"openssl ecparam -list_curves\" for all names\n" \ + " (default is sect163r2).\n"); +#endif #ifdef FIONBIO BIO_printf(bio_err," -nbio - Run with non-blocking IO\n"); #endif @@ -307,6 +319,9 @@ static void sv_usage(void) #ifndef OPENSSL_NO_DH BIO_printf(bio_err," -no_dhe - Disable ephemeral DH\n"); #endif +#ifndef OPENSSL_NO_ECDH + BIO_printf(bio_err," -no_ecdhe - Disable ephemeral ECDH\n"); +#endif BIO_printf(bio_err," -bugs - Turn on SSL bug compatibility\n"); BIO_printf(bio_err," -www - Respond to a 'GET /' with a status page\n"); BIO_printf(bio_err," -WWW - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n"); @@ -480,10 +495,11 @@ int MAIN(int argc, char *argv[]) char *CApath=NULL,*CAfile=NULL; char *context = NULL; char *dhfile = NULL; + char *named_curve = NULL; int badop=0,bugs=0; int ret=1; int off=0; - int no_tmp_rsa=0,no_dhe=0,nocert=0; + int no_tmp_rsa=0,no_dhe=0,no_ecdhe=0,nocert=0; int state=0; SSL_METHOD *meth=NULL; ENGINE *e=NULL; @@ -564,6 +580,13 @@ int MAIN(int argc, char *argv[]) if (--argc < 1) goto bad; dhfile = *(++argv); } +#ifndef OPENSSL_NO_ECDH + else if (strcmp(*argv,"-named_curve") == 0) + { + if (--argc < 1) goto bad; + named_curve = *(++argv); + } +#endif else if (strcmp(*argv,"-dcert") == 0) { if (--argc < 1) goto bad; @@ -632,6 +655,8 @@ int MAIN(int argc, char *argv[]) { no_tmp_rsa=1; } else if (strcmp(*argv,"-no_dhe") == 0) { no_dhe=1; } + else if (strcmp(*argv,"-no_ecdhe") == 0) + { no_ecdhe=1; } else if (strcmp(*argv,"-www") == 0) { www=1; } else if (strcmp(*argv,"-WWW") == 0) @@ -802,6 +827,59 @@ bad: DH_free(dh); } #endif + +#ifndef OPENSSL_NO_ECDH + if (!no_ecdhe) + { + EC_KEY *ecdh=NULL; + + ecdh = EC_KEY_new(); + if (ecdh == NULL) + { + BIO_printf(bio_err,"Could not create ECDH struct.\n"); + goto end; + } + + if (named_curve) + { + int nid = OBJ_sn2nid(named_curve); + + if (nid == 0) + { + BIO_printf(bio_err, "unknown curve name (%s)\n", + named_curve); + goto end; + } + + ecdh->group = EC_GROUP_new_by_nid(nid); + if (ecdh->group == NULL) + { + BIO_printf(bio_err, "unable to create curve (%s)\n", + named_curve); + goto end; + } + } + + if (ecdh->group != NULL) + { + BIO_printf(bio_s_out,"Setting temp ECDH parameters\n"); + } + else + { + BIO_printf(bio_s_out,"Using default temp ECDH parameters\n"); + ecdh->group=EC_GROUP_new_by_nid(NID_sect163r2); + if (ecdh->group == NULL) + { + BIO_printf(bio_err, "unable to create curve (sect163r2)\n"); + goto end; + } + } + (void)BIO_flush(bio_s_out); + + SSL_CTX_set_tmp_ecdh(ctx,ecdh); + EC_KEY_free(ecdh); + } +#endif if (!set_cert_stuff(ctx,s_cert_file,s_key_file)) goto end; diff --git a/apps/smime.c b/apps/smime.c index 90fe026f56..ef0e477464 100644 --- a/apps/smime.c +++ b/apps/smime.c @@ -428,7 +428,7 @@ int MAIN(int argc, char **argv) } else keyfile = NULL; if(keyfile) { - key = load_key(bio_err, keyfile, keyform, passin, e, + key = load_key(bio_err, keyfile, keyform, 0, passin, e, "signing key file"); if (!key) { goto end; diff --git a/apps/speed.c b/apps/speed.c index fea0ffe2cf..abcede337e 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -55,6 +55,32 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The ECDH and ECDSA speed test software is originally written by + * Sumit Gupta of Sun Microsystems Laboratories. + * + */ /* most of this code has been pilfered from my libdes speed.c program */ @@ -62,6 +88,8 @@ #define SECONDS 3 #define RSA_SECONDS 10 #define DSA_SECONDS 10 +#define ECDSA_SECONDS 10 +#define ECDH_SECONDS 10 /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ @@ -184,6 +212,12 @@ #ifndef OPENSSL_NO_DSA #include "./testdsa.h" #endif +#ifndef OPENSSL_NO_ECDSA +#include <openssl/ecdsa.h> +#endif +#ifndef OPENSSL_NO_ECDH +#include <openssl/ecdh.h> +#endif /* The following if from times(3) man page. It may need to be changed */ #ifndef HZ @@ -226,6 +260,10 @@ static int do_multi(int multi); #define SIZE_NUM 5 #define RSA_NUM 4 #define DSA_NUM 3 + +#define EC_NUM 15 +#define MAX_ECDH_SIZE 256 + static const char *names[ALGOR_NUM]={ "md2","mdc2","md4","md5","hmac(md5)","sha1","rmd160","rc4", "des cbc","des ede3","idea cbc", @@ -235,6 +273,9 @@ static double results[ALGOR_NUM][SIZE_NUM]; static int lengths[SIZE_NUM]={16,64,256,1024,8*1024}; static double rsa_results[RSA_NUM][2]; static double dsa_results[DSA_NUM][2]; +static double ecdsa_results[EC_NUM][2]; +static double ecdh_results[EC_NUM][1]; + #ifdef SIGALRM #if defined(__STDC__) || defined(sgi) || defined(_AIX) @@ -477,6 +518,23 @@ int MAIN(int argc, char **argv) #define R_RSA_1024 1 #define R_RSA_2048 2 #define R_RSA_4096 3 + +#define R_EC_P160 0 +#define R_EC_P224 1 +#define R_EC_P256 2 +#define R_EC_P384 3 +#define R_EC_P521 4 +#define R_EC_K163 5 +#define R_EC_K233 6 +#define R_EC_K283 7 +#define R_EC_K409 8 +#define R_EC_K571 9 +#define R_EC_B163 10 +#define R_EC_B233 11 +#define R_EC_B283 12 +#define R_EC_B409 13 +#define R_EC_B571 14 + #ifndef OPENSSL_NO_RSA RSA *rsa_key[RSA_NUM]; long rsa_c[RSA_NUM][2]; @@ -492,8 +550,81 @@ int MAIN(int argc, char **argv) long dsa_c[DSA_NUM][2]; static unsigned int dsa_bits[DSA_NUM]={512,1024,2048}; #endif +#ifndef OPENSSL_NO_EC + /* We only test over the following curves as they are representative, + * To add tests over more curves, simply add the curve NID + * and curve name to the following arrays and increase the + * EC_NUM value accordingly. + */ + static unsigned int test_curves[EC_NUM] = + { + /* Prime Curves */ + EC_GROUP_SECG_PRIME_160R1, + EC_GROUP_NIST_PRIME_224, + EC_GROUP_NIST_PRIME_256, + EC_GROUP_NIST_PRIME_384, + EC_GROUP_NIST_PRIME_521, + /* Binary Curves */ + EC_GROUP_NIST_CHAR2_K163, + EC_GROUP_NIST_CHAR2_K233, + EC_GROUP_NIST_CHAR2_K283, + EC_GROUP_NIST_CHAR2_K409, + EC_GROUP_NIST_CHAR2_K571, + EC_GROUP_NIST_CHAR2_B163, + EC_GROUP_NIST_CHAR2_B233, + EC_GROUP_NIST_CHAR2_B283, + EC_GROUP_NIST_CHAR2_B409, + EC_GROUP_NIST_CHAR2_B571 + }; + static char * test_curves_names[EC_NUM] = + { + /* Prime Curves */ + "secp160r1", + "nistp224", + "nistp256", + "nistp384", + "nistp521", + /* Binary Curves */ + "nistk163", + "nistk233", + "nistk283", + "nistk409", + "nistk571", + "nistb163", + "nistb233", + "nistb283", + "nistb409", + "nistb571" + }; + static int test_curves_bits[EC_NUM] = + { + 160, 224, 256, 384, 521, + 163, 233, 283, 409, 571, + 163, 233, 283, 409, 571 + }; + +#endif + +#ifndef OPENSSL_NO_ECDSA + unsigned char ecdsasig[256]; + unsigned int ecdsasiglen; + EC_KEY *ecdsa[EC_NUM]; + long ecdsa_c[EC_NUM][2]; +#endif + +#ifndef OPENSSL_NO_ECDH + EC_KEY *ecdh_a[EC_NUM], *ecdh_b[EC_NUM]; + unsigned char secret_a[MAX_ECDH_SIZE], secret_b[MAX_ECDH_SIZE]; + int secret_size_a, secret_size_b; + int ecdh_checks = 0; + int secret_idx = 0; + long ecdh_c[EC_NUM][2]; +#endif + int rsa_doit[RSA_NUM]; int dsa_doit[DSA_NUM]; + int ecdsa_doit[EC_NUM]; + int ecdh_doit[EC_NUM]; int doit[ALGOR_NUM]; int pr_header=0; const EVP_CIPHER *evp_cipher=NULL; @@ -512,6 +643,17 @@ int MAIN(int argc, char **argv) #ifndef OPENSSL_NO_DSA memset(dsa_key,0,sizeof(dsa_key)); #endif +#ifndef OPENSSL_NO_ECDSA + for (i=0; i<EC_NUM; i++) ecdsa[i] = NULL; +#endif +#ifndef OPENSSL_NO_ECDH + for (i=0; i<EC_NUM; i++) + { + ecdh_a[i] = NULL; + ecdh_b[i] = NULL; + } +#endif + if (bio_err == NULL) if ((bio_err=BIO_new(BIO_s_file())) != NULL) @@ -550,6 +692,15 @@ int MAIN(int argc, char **argv) rsa_doit[i]=0; for (i=0; i<DSA_NUM; i++) dsa_doit[i]=0; +#ifndef OPENSSL_NO_ECDSA + for (i=0; i<EC_NUM; i++) + ecdsa_doit[i]=0; +#endif +#ifndef OPENSSL_NO_ECDH + for (i=0; i<EC_NUM; i++) + ecdh_doit[i]=0; +#endif + j=0; argc--; @@ -769,6 +920,52 @@ int MAIN(int argc, char **argv) } else #endif +#ifndef OPENSSL_NO_ECDSA + if (strcmp(*argv,"ecdsap160") == 0) ecdsa_doit[R_EC_P160]=2; + else if (strcmp(*argv,"ecdsap224") == 0) ecdsa_doit[R_EC_P224]=2; + else if (strcmp(*argv,"ecdsap256") == 0) ecdsa_doit[R_EC_P256]=2; + else if (strcmp(*argv,"ecdsap384") == 0) ecdsa_doit[R_EC_P384]=2; + else if (strcmp(*argv,"ecdsap521") == 0) ecdsa_doit[R_EC_P521]=2; + else if (strcmp(*argv,"ecdsak163") == 0) ecdsa_doit[R_EC_K163]=2; + else if (strcmp(*argv,"ecdsak233") == 0) ecdsa_doit[R_EC_K233]=2; + else if (strcmp(*argv,"ecdsak283") == 0) ecdsa_doit[R_EC_K283]=2; + else if (strcmp(*argv,"ecdsak409") == 0) ecdsa_doit[R_EC_K409]=2; + else if (strcmp(*argv,"ecdsak571") == 0) ecdsa_doit[R_EC_K571]=2; + else if (strcmp(*argv,"ecdsab163") == 0) ecdsa_doit[R_EC_B163]=2; + else if (strcmp(*argv,"ecdsab233") == 0) ecdsa_doit[R_EC_B233]=2; + else if (strcmp(*argv,"ecdsab283") == 0) ecdsa_doit[R_EC_B283]=2; + else if (strcmp(*argv,"ecdsab409") == 0) ecdsa_doit[R_EC_B409]=2; + else if (strcmp(*argv,"ecdsab571") == 0) ecdsa_doit[R_EC_B571]=2; + else if (strcmp(*argv,"ecdsa") == 0) + { + for (i=0; i < EC_NUM; i++) + ecdsa_doit[i]=1; + } + else +#endif +#ifndef OPENSSL_NO_ECDH + if (strcmp(*argv,"ecdhp160") == 0) ecdh_doit[R_EC_P160]=2; + else if (strcmp(*argv,"ecdhp224") == 0) ecdh_doit[R_EC_P224]=2; + else if (strcmp(*argv,"ecdhp256") == 0) ecdh_doit[R_EC_P256]=2; + else if (strcmp(*argv,"ecdhp384") == 0) ecdh_doit[R_EC_P384]=2; + else if (strcmp(*argv,"ecdhp521") == 0) ecdh_doit[R_EC_P521]=2; + else if (strcmp(*argv,"ecdhk163") == 0) ecdh_doit[R_EC_K163]=2; + else if (strcmp(*argv,"ecdhk233") == 0) ecdh_doit[R_EC_K233]=2; + else if (strcmp(*argv,"ecdhk283") == 0) ecdh_doit[R_EC_K283]=2; + else if (strcmp(*argv,"ecdhk409") == 0) ecdh_doit[R_EC_K409]=2; + else if (strcmp(*argv,"ecdhk571") == 0) ecdh_doit[R_EC_K571]=2; + else if (strcmp(*argv,"ecdhb163") == 0) ecdh_doit[R_EC_B163]=2; + else if (strcmp(*argv,"ecdhb233") == 0) ecdh_doit[R_EC_B233]=2; + else if (strcmp(*argv,"ecdhb283") == 0) ecdh_doit[R_EC_B283]=2; + else if (strcmp(*argv,"ecdhb409") == 0) ecdh_doit[R_EC_B409]=2; + else if (strcmp(*argv,"ecdhb571") == 0) ecdh_doit[R_EC_B571]=2; + else if (strcmp(*argv,"ecdh") == 0) + { + for (i=0; i < EC_NUM; i++) + ecdh_doit[i]=1; + } + else +#endif { BIO_printf(bio_err,"Error: bad option or value\n"); BIO_printf(bio_err,"\n"); @@ -834,6 +1031,18 @@ int MAIN(int argc, char **argv) #ifndef OPENSSL_NO_DSA BIO_printf(bio_err,"dsa512 dsa1024 dsa2048\n"); #endif +#ifndef OPENSSL_NO_ECDSA + BIO_printf(bio_err,"ecdsap160 ecdsap224 ecdsap256 ecdsap384 ecdsap521\n"); + BIO_printf(bio_err,"ecdsak163 ecdsak233 ecdsak283 ecdsak409 ecdsak571\n"); + BIO_printf(bio_err,"ecdsab163 ecdsab233 ecdsab283 ecdsab409 ecdsab571\n"); + BIO_printf(bio_err,"ecdsa\n"); +#endif +#ifndef OPENSSL_NO_ECDH + BIO_printf(bio_err,"ecdhp160 ecdhp224 ecdhp256 ecdhp384 ecdhp521\n"); + BIO_printf(bio_err,"ecdhk163 ecdhk233 ecdhk283 ecdhk409 ecdhk571\n"); + BIO_printf(bio_err,"ecdhb163 ecdhb233 ecdhb283 ecdhb409 ecdhb571\n"); + BIO_printf(bio_err,"ecdh\n"); +#endif #ifndef OPENSSL_NO_IDEA BIO_printf(bio_err,"idea "); @@ -1063,6 +1272,114 @@ int MAIN(int argc, char **argv) } #endif +#ifndef OPENSSL_NO_ECDSA + ecdsa_c[R_EC_P160][0]=count/1000; + ecdsa_c[R_EC_P160][1]=count/1000/2; + for (i=R_EC_P224; i<=R_EC_P521; i++) + { + ecdsa_c[i][0]=ecdsa_c[i-1][0]/2; + ecdsa_c[i][1]=ecdsa_c[i-1][1]/2; + if ((ecdsa_doit[i] <= 1) && (ecdsa_c[i][0] == 0)) + ecdsa_doit[i]=0; + else + { + if (ecdsa_c[i] == 0) + { + ecdsa_c[i][0]=1; + ecdsa_c[i][1]=1; + } + } + } + ecdsa_c[R_EC_K163][0]=count/1000; + ecdsa_c[R_EC_K163][1]=count/1000/2; + for (i=R_EC_K233; i<=R_EC_K571; i++) + { + ecdsa_c[i][0]=ecdsa_c[i-1][0]/2; + ecdsa_c[i][1]=ecdsa_c[i-1][1]/2; + if ((ecdsa_doit[i] <= 1) && (ecdsa_c[i][0] == 0)) + ecdsa_doit[i]=0; + else + { + if (ecdsa_c[i] == 0) + { + ecdsa_c[i][0]=1; + ecdsa_c[i][1]=1; + } + } + } + ecdsa_c[R_EC_B163][0]=count/1000; + ecdsa_c[R_EC_B163][1]=count/1000/2; + for (i=R_EC_B233; i<=R_EC_B571; i++) + { + ecdsa_c[i][0]=ecdsa_c[i-1][0]/2; + ecdsa_c[i][1]=ecdsa_c[i-1][1]/2; + if ((ecdsa_doit[i] <= 1) && (ecdsa_c[i][0] == 0)) + ecdsa_doit[i]=0; + else + { + if (ecdsa_c[i] == 0) + { + ecdsa_c[i][0]=1; + ecdsa_c[i][1]=1; + } + } + } +#endif + +#ifndef OPENSSL_NO_ECDH + ecdh_c[R_EC_P160][0]=count/1000; + ecdh_c[R_EC_P160][1]=count/1000; + for (i=R_EC_P224; i<=R_EC_P521; i++) + { + ecdh_c[i][0]=ecdh_c[i-1][0]/2; + ecdh_c[i][1]=ecdh_c[i-1][1]/2; + if ((ecdh_doit[i] <= 1) && (ecdh_c[i][0] == 0)) + ecdh_doit[i]=0; + else + { + if (ecdh_c[i] == 0) + { + ecdh_c[i][0]=1; + ecdh_c[i][1]=1; + } + } + } + ecdh_c[R_EC_K163][0]=count/1000; + ecdh_c[R_EC_K163][1]=count/1000; + for (i=R_EC_K233; i<=R_EC_K571; i++) + { + ecdh_c[i][0]=ecdh_c[i-1][0]/2; + ecdh_c[i][1]=ecdh_c[i-1][1]/2; + if ((ecdh_doit[i] <= 1) && (ecdh_c[i][0] == 0)) + ecdh_doit[i]=0; + else + { + if (ecdh_c[i] == 0) + { + ecdh_c[i][0]=1; + ecdh_c[i][1]=1; + } + } + } + ecdh_c[R_EC_B163][0]=count/1000; + ecdh_c[R_EC_B163][1]=count/1000; + for (i=R_EC_B233; i<=R_EC_B571; i++) + { + ecdh_c[i][0]=ecdh_c[i-1][0]/2; + ecdh_c[i][1]=ecdh_c[i-1][1]/2; + if ((ecdh_doit[i] <= 1) && (ecdh_c[i][0] == 0)) + ecdh_doit[i]=0; + else + { + if (ecdh_c[i] == 0) + { + ecdh_c[i][0]=1; + ecdh_c[i][1]=1; + } + } + } +#endif + #define COND(d) (count < (d)) #define COUNT(d) (d) #else @@ -1587,6 +1904,220 @@ int MAIN(int argc, char **argv) } if (rnd_fake) RAND_cleanup(); #endif + +#ifndef OPENSSL_NO_ECDSA + if (RAND_status() != 1) + { + RAND_seed(rnd_seed, sizeof rnd_seed); + rnd_fake = 1; + } + for (j=0; j<EC_NUM; j++) + { + int ret; + + if (!ecdsa_doit[j]) continue; /* Ignore Curve */ + ecdsa[j] = EC_KEY_new(); + if (ecdsa[j] == NULL) + { + BIO_printf(bio_err,"ECDSA failure.\n"); + ERR_print_errors(bio_err); + rsa_count=1; + } + else + { + ecdsa[j]->group = EC_GROUP_new_by_nid(test_curves[j]); + /* Could not obtain group information */ + if (ecdsa[j]->group == NULL) + { + BIO_printf(bio_err,"ECDSA failure.Could not obtain group information\n"); + ERR_print_errors(bio_err); + rsa_count=1; + } + else + { + /* Perform ECDSA signature test */ + EC_KEY_generate_key(ecdsa[j]); + ret = ECDSA_sign(0, buf, 20, ecdsasig, + &ecdsasiglen, ecdsa[j]); + if (ret == 0) + { + BIO_printf(bio_err,"ECDSA sign failure. No ECDSA sign will be done.\n"); + ERR_print_errors(bio_err); + rsa_count=1; + } + else + { + pkey_print_message("sign","ecdsa", + ecdsa_c[j][0], + test_curves_bits[j], + ECDSA_SECONDS); + + Time_F(START); + for (count=0,run=1; COND(ecdsa_c[j][0]); + count++) + { + ret=ECDSA_sign(0, buf, 20, + ecdsasig, &ecdsasiglen, + ecdsa[j]); + if (ret == 0) + { + BIO_printf(bio_err, "ECDSA sign failure\n"); + ERR_print_errors(bio_err); + count=1; + break; + } + } + d=Time_F(STOP); + + BIO_printf(bio_err, mr ? "+R5:%ld:%d:%.2f\n" : + "%ld %d bit ECDSA signs in %.2fs \n", + count, test_curves_bits[j], d); + ecdsa_results[j][0]=d/(double)count; + rsa_count=count; + } + + /* Perform ECDSA verification test */ + ret=ECDSA_verify(0, buf, 20, ecdsasig, + ecdsasiglen, ecdsa[j]); + if (ret != 1) + { + BIO_printf(bio_err,"ECDSA verify failure. No ECDSA verify will be done.\n"); + ERR_print_errors(bio_err); + ecdsa_doit[j] = 0; + } + else + { + pkey_print_message("verify","ecdsa", + ecdsa_c[j][1], + test_curves_bits[j], + ECDSA_SECONDS); + Time_F(START); + for (count=0,run=1; COND(ecdsa_c[j][1]); count++) + { + ret=ECDSA_verify(0, buf, 20, ecdsasig, ecdsasiglen, ecdsa[j]); + if (ret != 1) + { + BIO_printf(bio_err, "ECDSA verify failure\n"); + ERR_print_errors(bio_err); + count=1; + break; + } + } + d=Time_F(STOP); + BIO_printf(bio_err, mr? "+R6:%ld:%d:%.2f\n" + : "%ld %d bit ECDSA verify in %.2fs\n", + count, test_curves_bits[j], d); + ecdsa_results[j][1]=d/(double)count; + } + + if (rsa_count <= 1) + { + /* if longer than 10s, don't do any more */ + for (j++; j<EC_NUM; j++) + ecdsa_doit[j]=0; + } + } + } + } + if (rnd_fake) RAND_cleanup(); +#endif + +#ifndef OPENSSL_NO_ECDH + if (RAND_status() != 1) + { + RAND_seed(rnd_seed, sizeof rnd_seed); + rnd_fake = 1; + } + for (j=0; j<EC_NUM; j++) + { + if (!ecdh_doit[j]) continue; + ecdh_a[j] = EC_KEY_new(); + ecdh_b[j] = EC_KEY_new(); + if ((ecdh_a[j] == NULL) || (ecdh_b[j] == NULL)) + { + BIO_printf(bio_err,"ECDH failure.\n"); + ERR_print_errors(bio_err); + rsa_count=1; + } + else + { + ecdh_a[j]->group = EC_GROUP_new_by_nid(test_curves[j]); + if (ecdh_a[j]->group == NULL) + { + BIO_printf(bio_err,"ECDH failure.\n"); + ERR_print_errors(bio_err); + rsa_count=1; + } + else + { + ecdh_b[j]->group = ecdh_a[j]->group; + + /* generate two ECDH key pairs */ + if (!EC_KEY_generate_key(ecdh_a[j]) || + !EC_KEY_generate_key(ecdh_b[j])) + { + BIO_printf(bio_err,"ECDH key generation failure.\n"); + ERR_print_errors(bio_err); + rsa_count=1; + } + else + { + secret_size_a = ECDH_compute_key(secret_a, + ecdh_b[j]->pub_key, + ecdh_a[j]); + secret_size_b = ECDH_compute_key(secret_b, + ecdh_a[j]->pub_key, + ecdh_b[j]); + if (secret_size_a != secret_size_b) + ecdh_checks = 0; + else + ecdh_checks = 1; + + for (secret_idx = 0; + (secret_idx < secret_size_a) + && (ecdh_checks == 1); + secret_idx++) + { + if (secret_a[secret_idx] != secret_b[secret_idx]) + ecdh_checks = 0; + } + + if (ecdh_checks == 0) + { + BIO_printf(bio_err,"ECDH computations don't match.\n"); + ERR_print_errors(bio_err); + rsa_count=1; + } + + pkey_print_message("","ecdh", + ecdh_c[j][0], + test_curves_bits[j], + ECDH_SECONDS); + Time_F(START); + for (count=0,run=1; COND(ecdh_c[j][0]); count++) + { + ECDH_compute_key(secret_a, + ecdh_b[j]->pub_key, + ecdh_a[j]); + } + d=Time_F(STOP); + BIO_printf(bio_err, mr ? "+R7:%ld:%d:%.2f\n" :"%ld %d-bit ECDH ops in %.2fs\n", + count, test_curves_bits[j], d); + ecdh_results[j][0]=d/(double)count; + rsa_count=count; + } + } + } + + if (rsa_count <= 1) + { + /* if longer than 10s, don't do any more */ + for (j++; j<EC_NUM; j++) + ecdh_doit[j]=0; + } + } + if (rnd_fake) RAND_cleanup(); +#endif #ifdef HAVE_FORK show_res: #endif @@ -1712,7 +2243,57 @@ show_res: 1.0/dsa_results[k][0],1.0/dsa_results[k][1]); } #endif +#ifndef OPENSSL_NO_ECDSA + j=1; + for (k=0; k<EC_NUM; k++) + { + if (!ecdsa_doit[k]) continue; + if (j && !mr) + { + printf("%30ssign verify sign/s verify/s\n"," "); + j=0; + } + + if (mr) + fprintf(stdout,"+F4:%u:%u:%f:%f\n", + k, test_curves_bits[k], + ecdsa_results[k][0],ecdsa_results[k][1]); + else + fprintf(stdout, + "%4u bit ecdsa (%s) %8.4fs %8.4fs %8.1f %8.1f\n", + test_curves_bits[k], + test_curves_names[k], + ecdsa_results[k][0],ecdsa_results[k][1], + 1.0/ecdsa_results[k][0],1.0/ecdsa_results[k][1]); + } +#endif + + +#ifndef OPENSSL_NO_ECDH + j=1; + for (k=0; k<EC_NUM; k++) + { + if (!ecdh_doit[k]) continue; + if (j && !mr) + { + printf("%30sop op/s\n"," "); + j=0; + } + if (mr) + fprintf(stdout,"+F5:%u:%u:%f:%f\n", + k, test_curves_bits[k], + ecdh_results[k][0], 1.0/ecdh_results[k][0]); + + else + fprintf(stdout,"%4u bit ecdh (%s) %8.4fs %8.1f\n", + test_curves_bits[k], + test_curves_names[k], + ecdh_results[k][0], 1.0/ecdh_results[k][0]); + } +#endif + mret=0; + end: ERR_print_errors(bio_err); if (buf != NULL) OPENSSL_free(buf); @@ -1727,6 +2308,22 @@ end: if (dsa_key[i] != NULL) DSA_free(dsa_key[i]); #endif + +#ifndef OPENSSL_NO_ECDSA + for (i=0; i<EC_NUM; i++) + if (ecdsa[i] != NULL) + EC_KEY_free(ecdsa[i]); +#endif +#ifndef OPENSSL_NO_ECDH + for (i=0; i<EC_NUM; i++) + { + if (ecdh_a[i] != NULL) + EC_KEY_free(ecdh_a[i]); + if (ecdh_b[i] != NULL) + EC_KEY_free(ecdh_b[i]); + } +#endif + apps_shutdown(); EXIT(mret); } @@ -1928,6 +2525,49 @@ static int do_multi(int multi) else dsa_results[k][1]=d; } +#ifndef OPENSSL_NO_ECDSA + else if(!strncmp(buf,"+F4:",4)) + { + int k; + double d; + + p=buf+4; + k=atoi(sstrsep(&p,sep)); + sstrsep(&p,sep); + + d=atof(sstrsep(&p,sep)); + if(n) + ecdsa_results[k][0]=1/(1/ecdsa_results[k][0]+1/d); + else + ecdsa_results[k][0]=d; + + d=atof(sstrsep(&p,sep)); + if(n) + ecdsa_results[k][1]=1/(1/ecdsa_results[k][1]+1/d); + else + ecdsa_results[k][1]=d; + } +#endif + +#ifndef OPENSSL_NO_ECDH + else if(!strncmp(buf,"+F5:",4)) + { + int k; + double d; + + p=buf+4; + k=atoi(sstrsep(&p,sep)); + sstrsep(&p,sep); + + d=atof(sstrsep(&p,sep)); + if(n) + ecdh_results[k][0]=1/(1/ecdh_results[k][0]+1/d); + else + ecdh_results[k][0]=d; + + } +#endif + else if(!strncmp(buf,"+H:",3)) { } diff --git a/apps/spkac.c b/apps/spkac.c index 049a37963c..4ce53e36c9 100644 --- a/apps/spkac.c +++ b/apps/spkac.c @@ -186,7 +186,7 @@ bad: if(keyfile) { pkey = load_key(bio_err, strcmp(keyfile, "-") ? keyfile : NULL, - FORMAT_PEM, passin, e, "private key"); + FORMAT_PEM, 1, passin, e, "private key"); if(!pkey) { goto end; } diff --git a/apps/version.c b/apps/version.c index 0cbcb47f88..435e0b4bb3 100644 --- a/apps/version.c +++ b/apps/version.c @@ -172,7 +172,19 @@ int MAIN(int argc, char **argv) } } - if (version) printf("%s\n",SSLeay_version(SSLEAY_VERSION)); + if (version) + { + if (SSLeay() == SSLEAY_VERSION_NUMBER) + { + printf("%s\n",SSLeay_version(SSLEAY_VERSION)); + } + else + { + printf("%s (Library: %s)\n", + OPENSSL_VERSION_TEXT, + SSLeay_version(SSLEAY_VERSION)); + } + } if (date) printf("%s\n",SSLeay_version(SSLEAY_BUILT_ON)); if (platform) printf("%s\n",SSLeay_version(SSLEAY_PLATFORM)); if (options) diff --git a/apps/x509.c b/apps/x509.c index 23e9b6bfe1..aa06462b9f 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -861,8 +861,8 @@ bad: if (Upkey == NULL) { Upkey=load_key(bio_err, - keyfile,keyformat, passin, e, - "Private key"); + keyfile, keyformat, 0, + passin, e, "Private key"); if (Upkey == NULL) goto end; } #ifndef OPENSSL_NO_DSA @@ -870,7 +870,7 @@ bad: digest=EVP_dss1(); #endif #ifndef OPENSSL_NO_ECDSA - if (Upkey->type == EVP_PKEY_ECDSA) + if (Upkey->type == EVP_PKEY_EC) digest=EVP_ecdsa(); #endif @@ -884,8 +884,9 @@ bad: if (CAkeyfile != NULL) { CApkey=load_key(bio_err, - CAkeyfile,CAkeyformat, passin, - e, "CA Private Key"); + CAkeyfile, CAkeyformat, + 0, passin, e, + "CA Private Key"); if (CApkey == NULL) goto end; } #ifndef OPENSSL_NO_DSA @@ -893,7 +894,7 @@ bad: digest=EVP_dss1(); #endif #ifndef OPENSSL_NO_ECDSA - if (CApkey->type == EVP_PKEY_ECDSA) + if (CApkey->type == EVP_PKEY_EC) digest = EVP_ecdsa(); #endif @@ -916,17 +917,21 @@ bad: else { pk=load_key(bio_err, - keyfile,FORMAT_PEM, passin, e, - "request key"); + keyfile, FORMAT_PEM, 0, + passin, e, "request key"); if (pk == NULL) goto end; } BIO_printf(bio_err,"Generating certificate request\n"); +#ifndef OPENSSL_NO_DSA if (pk->type == EVP_PKEY_DSA) digest=EVP_dss1(); - else if (pk->type == EVP_PKEY_ECDSA) +#endif +#ifndef OPENSSL_NO_ECDSA + if (pk->type == EVP_PKEY_EC) digest=EVP_ecdsa(); +#endif rq=X509_to_X509_REQ(x,pk,digest); EVP_PKEY_free(pk); @@ -393,6 +393,9 @@ exit 0 GCCVER=`(gcc -dumpversion) 2>/dev/null` if [ "$GCCVER" != "" ]; then CC=gcc + # then strip off whatever prefix egcs prepends the number with... + # Hopefully, this will work for any future prefixes as well. + GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z]*\-//'` # Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion # does give us what we want though, so we use that. We just just the # major and minor version numbers. diff --git a/crypto/Makefile.ssl b/crypto/Makefile.ssl index 7804227eed..42a01e194a 100644 --- a/crypto/Makefile.ssl +++ b/crypto/Makefile.ssl @@ -28,7 +28,7 @@ LIBS= SDIRS= md2 md5 sha mdc2 hmac ripemd \ des rc2 rc4 rc5 idea bf cast \ - bn ec rsa dsa ecdsa dh dso engine aes \ + bn ec rsa dsa ecdsa ecdh dh dso engine aes \ buffer bio stack lhash rand err objects \ evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 @@ -98,7 +98,7 @@ lib: $(LIBOBJ) shared: if [ -n "$(SHARED_LIBS)" ]; then \ - (cd ..; make $(SHARED_LIB)); \ + (cd ..; $(MAKE) $(SHARED_LIB)); \ fi libs: @@ -180,7 +180,7 @@ cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c -ebcdic.o: ../include/openssl/opensslconf.h ebcdic.c +ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h diff --git a/crypto/asn1/Makefile.ssl b/crypto/asn1/Makefile.ssl index 1b0991e9d9..bad609eaca 100644 --- a/crypto/asn1/Makefile.ssl +++ b/crypto/asn1/Makefile.ssl @@ -145,13 +145,13 @@ a_d2i_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h a_d2i_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h a_d2i_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_d2i_fp.c a_digest.o: ../../e_os.h ../../include/openssl/aes.h -a_digest.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -a_digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -a_digest.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -a_digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -a_digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -a_digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -a_digest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +a_digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +a_digest.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +a_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +a_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +a_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +a_digest.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h a_digest.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h a_digest.o: ../../include/openssl/evp.h ../../include/openssl/idea.h a_digest.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -267,13 +267,13 @@ a_set.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h a_set.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h a_set.o: ../cryptlib.h a_set.c a_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -a_sign.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -a_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -a_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -a_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -a_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -a_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -a_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +a_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +a_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +a_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +a_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +a_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +a_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h a_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h a_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h a_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -289,13 +289,13 @@ a_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h a_sign.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h a_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h a_sign.c a_strex.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -a_strex.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -a_strex.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -a_strex.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -a_strex.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -a_strex.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -a_strex.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -a_strex.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +a_strex.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +a_strex.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_strex.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +a_strex.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +a_strex.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +a_strex.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +a_strex.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h a_strex.o: ../../include/openssl/evp.h ../../include/openssl/idea.h a_strex.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h a_strex.o: ../../include/openssl/md4.h ../../include/openssl/md5.h @@ -354,13 +354,13 @@ a_utf8.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h a_utf8.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h a_utf8.o: ../cryptlib.h a_utf8.c a_verify.o: ../../e_os.h ../../include/openssl/aes.h -a_verify.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -a_verify.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -a_verify.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -a_verify.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -a_verify.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -a_verify.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -a_verify.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +a_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +a_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +a_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +a_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +a_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +a_verify.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h a_verify.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h a_verify.o: ../../include/openssl/evp.h ../../include/openssl/idea.h a_verify.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -402,14 +402,14 @@ asn1_par.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h asn1_par.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h asn1_par.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_par.c asn_moid.o: ../../e_os.h ../../include/openssl/aes.h -asn_moid.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -asn_moid.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -asn_moid.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -asn_moid.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -asn_moid.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -asn_moid.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -asn_moid.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -asn_moid.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +asn_moid.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +asn_moid.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +asn_moid.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +asn_moid.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +asn_moid.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +asn_moid.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +asn_moid.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +asn_moid.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h asn_moid.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h asn_moid.o: ../../include/openssl/evp.h ../../include/openssl/idea.h asn_moid.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -434,13 +434,12 @@ asn_pack.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h asn_pack.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h asn_pack.o: ../../include/openssl/symhacks.h ../cryptlib.h asn_pack.c d2i_pr.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -d2i_pr.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -d2i_pr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -d2i_pr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -d2i_pr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -d2i_pr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -d2i_pr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -d2i_pr.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +d2i_pr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +d2i_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +d2i_pr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +d2i_pr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +d2i_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +d2i_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h d2i_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h d2i_pr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h d2i_pr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -455,13 +454,12 @@ d2i_pr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h d2i_pr.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h d2i_pr.o: ../cryptlib.h d2i_pr.c d2i_pu.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -d2i_pu.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -d2i_pu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -d2i_pu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -d2i_pu.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -d2i_pu.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -d2i_pu.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -d2i_pu.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +d2i_pu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +d2i_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +d2i_pu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +d2i_pu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +d2i_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +d2i_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h d2i_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h d2i_pu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h d2i_pu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -509,13 +507,12 @@ f_string.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h f_string.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h f_string.o: ../../include/openssl/symhacks.h ../cryptlib.h f_string.c i2d_pr.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -i2d_pr.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -i2d_pr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -i2d_pr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -i2d_pr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -i2d_pr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -i2d_pr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -i2d_pr.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +i2d_pr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +i2d_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +i2d_pr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +i2d_pr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +i2d_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +i2d_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h i2d_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h i2d_pr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h i2d_pr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -530,13 +527,12 @@ i2d_pr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h i2d_pr.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h i2d_pr.o: ../cryptlib.h i2d_pr.c i2d_pu.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -i2d_pu.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -i2d_pu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -i2d_pu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -i2d_pu.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -i2d_pu.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -i2d_pu.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -i2d_pu.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +i2d_pu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +i2d_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +i2d_pu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +i2d_pu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +i2d_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +i2d_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h i2d_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h i2d_pu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h i2d_pu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -558,21 +554,21 @@ n_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h n_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h n_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h n_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -n_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -n_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -n_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -n_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -n_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -n_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -n_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -n_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -n_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -n_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -n_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -n_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -n_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -n_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -n_pkey.o: ../cryptlib.h n_pkey.c +n_pkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +n_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +n_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +n_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +n_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +n_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +n_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +n_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +n_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +n_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +n_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +n_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +n_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +n_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +n_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h n_pkey.c nsseq.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h nsseq.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h nsseq.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -580,20 +576,21 @@ nsseq.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h nsseq.o: ../../include/openssl/crypto.h ../../include/openssl/des.h nsseq.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h nsseq.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -nsseq.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -nsseq.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -nsseq.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -nsseq.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -nsseq.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -nsseq.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -nsseq.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -nsseq.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -nsseq.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -nsseq.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -nsseq.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -nsseq.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -nsseq.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -nsseq.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h nsseq.c +nsseq.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +nsseq.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h +nsseq.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +nsseq.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +nsseq.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +nsseq.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +nsseq.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +nsseq.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +nsseq.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +nsseq.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +nsseq.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +nsseq.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +nsseq.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +nsseq.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +nsseq.o: ../../include/openssl/x509_vfy.h nsseq.c p5_pbe.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h p5_pbe.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h p5_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -601,22 +598,22 @@ p5_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h p5_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h p5_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h p5_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p5_pbe.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -p5_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h -p5_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -p5_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -p5_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -p5_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -p5_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -p5_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -p5_pbe.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h -p5_pbe.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -p5_pbe.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -p5_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -p5_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -p5_pbe.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -p5_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -p5_pbe.o: ../cryptlib.h p5_pbe.c +p5_pbe.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +p5_pbe.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +p5_pbe.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p5_pbe.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p5_pbe.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p5_pbe.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p5_pbe.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p5_pbe.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p5_pbe.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +p5_pbe.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p5_pbe.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p5_pbe.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p5_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p5_pbe.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p5_pbe.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p5_pbe.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_pbe.c p5_pbev2.o: ../../e_os.h ../../include/openssl/aes.h p5_pbev2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h p5_pbev2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h @@ -625,12 +622,13 @@ p5_pbev2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h p5_pbev2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h p5_pbev2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h p5_pbev2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -p5_pbev2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -p5_pbev2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -p5_pbev2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -p5_pbev2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -p5_pbev2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -p5_pbev2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p5_pbev2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +p5_pbev2.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p5_pbev2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p5_pbev2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p5_pbev2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p5_pbev2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p5_pbev2.o: ../../include/openssl/opensslconf.h p5_pbev2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h p5_pbev2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h p5_pbev2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h @@ -648,30 +646,30 @@ p8_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h p8_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h p8_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h p8_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -p8_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -p8_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -p8_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -p8_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -p8_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -p8_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -p8_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -p8_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -p8_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -p8_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -p8_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -p8_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -p8_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -p8_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -p8_pkey.o: ../cryptlib.h p8_pkey.c +p8_pkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +p8_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p8_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p8_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p8_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p8_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p8_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p8_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +p8_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p8_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p8_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p8_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p8_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p8_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p8_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p8_pkey.c t_bitst.o: ../../e_os.h ../../include/openssl/aes.h -t_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -t_bitst.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -t_bitst.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -t_bitst.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -t_bitst.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -t_bitst.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -t_bitst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -t_bitst.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +t_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +t_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +t_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +t_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +t_bitst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +t_bitst.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +t_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +t_bitst.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h t_bitst.o: ../../include/openssl/err.h ../../include/openssl/evp.h t_bitst.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h t_bitst.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -688,13 +686,13 @@ t_bitst.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h t_bitst.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h t_bitst.o: ../cryptlib.h t_bitst.c t_crl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -t_crl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -t_crl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -t_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -t_crl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -t_crl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -t_crl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -t_crl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +t_crl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_crl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_crl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +t_crl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_crl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_crl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h t_crl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h t_crl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h t_crl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -710,26 +708,25 @@ t_crl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h t_crl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h t_crl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h t_crl.o: ../../include/openssl/x509v3.h ../cryptlib.h t_crl.c -t_pkey.o: ../../e_os.h ../../include/openssl/asn1.h -t_pkey.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +t_pkey.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h t_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h t_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h t_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -t_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -t_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h -t_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -t_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -t_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h -t_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -t_pkey.o: ../../include/openssl/symhacks.h ../cryptlib.h t_pkey.c +t_pkey.o: ../../include/openssl/ec.h ../../include/openssl/err.h +t_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +t_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +t_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +t_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +t_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +t_pkey.o: ../cryptlib.h t_pkey.c t_req.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -t_req.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -t_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -t_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -t_req.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -t_req.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -t_req.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -t_req.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +t_req.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_req.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +t_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_req.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h t_req.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h t_req.o: ../../include/openssl/evp.h ../../include/openssl/idea.h t_req.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -746,13 +743,13 @@ t_req.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h t_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h t_req.o: ../../include/openssl/x509v3.h ../cryptlib.h t_req.c t_spki.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -t_spki.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -t_spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -t_spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -t_spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -t_spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -t_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -t_spki.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +t_spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_spki.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +t_spki.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +t_spki.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +t_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +t_spki.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h t_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h t_spki.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h t_spki.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -768,13 +765,13 @@ t_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h t_spki.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h t_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h t_spki.c t_x509.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -t_x509.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -t_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -t_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -t_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -t_x509.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -t_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -t_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +t_x509.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_x509.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +t_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_x509.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_x509.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h t_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h t_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h t_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -791,13 +788,13 @@ t_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h t_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h t_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h t_x509.c t_x509a.o: ../../e_os.h ../../include/openssl/aes.h -t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -t_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -t_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -t_x509a.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -t_x509a.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -t_x509a.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -t_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +t_x509a.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +t_x509a.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +t_x509a.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_x509a.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_x509a.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_x509a.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h t_x509a.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h t_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h t_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -870,21 +867,21 @@ x_algor.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_algor.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_algor.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_algor.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_algor.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_algor.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -x_algor.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -x_algor.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -x_algor.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -x_algor.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -x_algor.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -x_algor.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -x_algor.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -x_algor.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -x_algor.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -x_algor.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -x_algor.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -x_algor.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -x_algor.o: x_algor.c +x_algor.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_algor.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h +x_algor.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_algor.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_algor.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_algor.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_algor.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_algor.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_algor.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_algor.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_algor.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_algor.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_algor.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_algor.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_algor.o: ../../include/openssl/x509_vfy.h x_algor.c x_attrib.o: ../../e_os.h ../../include/openssl/aes.h x_attrib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h x_attrib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h @@ -893,12 +890,13 @@ x_attrib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h x_attrib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h x_attrib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h x_attrib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -x_attrib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -x_attrib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -x_attrib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -x_attrib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -x_attrib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -x_attrib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_attrib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +x_attrib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_attrib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_attrib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_attrib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_attrib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_attrib.o: ../../include/openssl/opensslconf.h x_attrib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h x_attrib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h x_attrib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -924,21 +922,22 @@ x_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_crl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_crl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_crl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h -x_crl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -x_crl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -x_crl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -x_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -x_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -x_crl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -x_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -x_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -x_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -x_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -x_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -x_crl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -x_crl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_crl.c +x_crl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_crl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +x_crl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_crl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_crl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_crl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_crl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_crl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_crl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_crl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_crl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_crl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_crl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_crl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_crl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_crl.o: ../cryptlib.h x_crl.c x_exten.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h x_exten.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h x_exten.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -946,29 +945,29 @@ x_exten.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_exten.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_exten.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_exten.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_exten.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_exten.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -x_exten.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -x_exten.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -x_exten.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -x_exten.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -x_exten.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -x_exten.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -x_exten.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -x_exten.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -x_exten.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -x_exten.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -x_exten.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -x_exten.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -x_exten.o: x_exten.c +x_exten.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_exten.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h +x_exten.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_exten.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_exten.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_exten.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_exten.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_exten.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_exten.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_exten.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_exten.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_exten.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_exten.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_exten.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_exten.o: ../../include/openssl/x509_vfy.h x_exten.c x_info.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -x_info.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -x_info.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -x_info.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -x_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_info.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_info.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_info.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_info.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x_info.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h x_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x_info.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -999,29 +998,30 @@ x_name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_name.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_name.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_name.o: ../../include/openssl/err.h ../../include/openssl/evp.h -x_name.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -x_name.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -x_name.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -x_name.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -x_name.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -x_name.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -x_name.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -x_name.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -x_name.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -x_name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -x_name.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -x_name.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -x_name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_name.c +x_name.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_name.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +x_name.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_name.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_name.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_name.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_name.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_name.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_name.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_name.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_name.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_name.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_name.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_name.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_name.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_name.o: ../cryptlib.h x_name.c x_pkey.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -x_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h -x_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +x_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -1045,12 +1045,13 @@ x_pubkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h x_pubkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h x_pubkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h x_pubkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -x_pubkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -x_pubkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -x_pubkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -x_pubkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -x_pubkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -x_pubkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_pubkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +x_pubkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_pubkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_pubkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_pubkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_pubkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_pubkey.o: ../../include/openssl/opensslconf.h x_pubkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h x_pubkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h x_pubkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -1067,21 +1068,22 @@ x_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_req.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h -x_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -x_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -x_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -x_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -x_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -x_req.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -x_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -x_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -x_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -x_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -x_req.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -x_req.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -x_req.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_req.c +x_req.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_req.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +x_req.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_req.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_req.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_req.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_req.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_req.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_req.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_req.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_req.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_req.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_req.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_req.o: ../cryptlib.h x_req.c x_sig.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h x_sig.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h x_sig.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -1089,21 +1091,22 @@ x_sig.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_sig.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_sig.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_sig.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_sig.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_sig.o: ../../include/openssl/err.h ../../include/openssl/evp.h -x_sig.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -x_sig.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -x_sig.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -x_sig.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -x_sig.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -x_sig.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -x_sig.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -x_sig.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -x_sig.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -x_sig.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -x_sig.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -x_sig.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -x_sig.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_sig.c +x_sig.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_sig.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +x_sig.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_sig.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_sig.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_sig.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_sig.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_sig.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_sig.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_sig.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_sig.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_sig.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_sig.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_sig.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_sig.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_sig.o: ../cryptlib.h x_sig.c x_spki.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h x_spki.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h x_spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -1111,21 +1114,22 @@ x_spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_spki.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h -x_spki.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -x_spki.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -x_spki.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -x_spki.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -x_spki.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -x_spki.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -x_spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -x_spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -x_spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -x_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -x_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -x_spki.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -x_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_spki.c +x_spki.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_spki.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +x_spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_spki.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_spki.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_spki.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_spki.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_spki.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_spki.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_spki.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_spki.o: ../cryptlib.h x_spki.c x_val.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h x_val.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h x_val.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -1133,21 +1137,22 @@ x_val.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_val.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_val.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_val.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_val.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_val.o: ../../include/openssl/err.h ../../include/openssl/evp.h -x_val.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -x_val.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -x_val.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -x_val.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -x_val.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -x_val.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -x_val.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -x_val.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -x_val.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -x_val.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -x_val.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -x_val.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -x_val.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_val.c +x_val.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_val.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +x_val.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_val.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_val.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_val.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_val.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_val.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_val.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_val.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_val.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_val.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_val.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_val.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_val.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_val.o: ../cryptlib.h x_val.c x_x509.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h x_x509.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h x_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -1156,21 +1161,22 @@ x_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h x_x509.o: ../../include/openssl/des.h ../../include/openssl/des_old.h x_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h x_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -x_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -x_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -x_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -x_x509.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -x_x509.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -x_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -x_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -x_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -x_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -x_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -x_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -x_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -x_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -x_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -x_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h x_x509.c +x_x509.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +x_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_x509.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_x509.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_x509.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_x509.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_x509.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_x509.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +x_x509.o: ../cryptlib.h x_x509.c x_x509a.o: ../../e_os.h ../../include/openssl/aes.h x_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h x_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h @@ -1179,18 +1185,18 @@ x_x509a.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h x_x509a.o: ../../include/openssl/des.h ../../include/openssl/des_old.h x_x509a.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h x_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -x_x509a.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -x_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -x_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -x_x509a.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -x_x509a.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -x_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -x_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -x_x509a.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -x_x509a.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -x_x509a.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -x_x509a.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -x_x509a.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -x_x509a.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -x_x509a.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -x_x509a.o: ../cryptlib.h x_x509a.c +x_x509a.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +x_x509a.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_x509a.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_x509a.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_x509a.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_x509a.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_x509a.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_x509a.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_x509a.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_x509a.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_x509a.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_x509a.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_x509a.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_x509a.c diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h index 303fe5da8b..1be3e02298 100644 --- a/crypto/asn1/asn1.h +++ b/crypto/asn1/asn1.h @@ -1010,6 +1010,7 @@ void ERR_load_ASN1_strings(void); #define ASN1_F_I2D_ASN1_TIME 160 #define ASN1_F_I2D_DSA_PUBKEY 161 #define ASN1_F_I2D_ECDSA_PUBKEY 174 +#define ASN1_F_I2D_EC_PUBKEY 176 #define ASN1_F_I2D_NETSCAPE_RSA 162 #define ASN1_F_I2D_PRIVATEKEY 163 #define ASN1_F_I2D_PUBLICKEY 164 diff --git a/crypto/asn1/asn1_err.c b/crypto/asn1/asn1_err.c index dbb9753bb9..d64f987ac6 100644 --- a/crypto/asn1/asn1_err.c +++ b/crypto/asn1/asn1_err.c @@ -128,7 +128,8 @@ static ERR_STRING_DATA ASN1_str_functs[]= {ERR_PACK(0,ASN1_F_D2I_X509_PKEY,0), "d2i_X509_PKEY"}, {ERR_PACK(0,ASN1_F_I2D_ASN1_TIME,0), "I2D_ASN1_TIME"}, {ERR_PACK(0,ASN1_F_I2D_DSA_PUBKEY,0), "i2d_DSA_PUBKEY"}, -{ERR_PACK(0,ASN1_F_I2D_ECDSA_PUBKEY,0), "i2d_ECDSA_PUBKEY"}, +{ERR_PACK(0,ASN1_F_I2D_ECDSA_PUBKEY,0), "I2D_ECDSA_PUBKEY"}, +{ERR_PACK(0,ASN1_F_I2D_EC_PUBKEY,0), "i2d_EC_PUBKEY"}, {ERR_PACK(0,ASN1_F_I2D_NETSCAPE_RSA,0), "i2d_Netscape_RSA"}, {ERR_PACK(0,ASN1_F_I2D_PRIVATEKEY,0), "i2d_PrivateKey"}, {ERR_PACK(0,ASN1_F_I2D_PUBLICKEY,0), "i2d_PublicKey"}, diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c index 77447a5240..0638870ab7 100644 --- a/crypto/asn1/asn1_lib.c +++ b/crypto/asn1/asn1_lib.c @@ -57,6 +57,7 @@ */ #include <stdio.h> +#include <limits.h> #include "cryptlib.h" #include <openssl/asn1.h> #include <openssl/asn1_mac.h> @@ -124,15 +125,13 @@ int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, int *pclass, (int)(omax+ *pp)); #endif -#if 0 - if ((p+ *plength) > (omax+ *pp)) + if (*plength > (omax - (p - *pp))) { ASN1err(ASN1_F_ASN1_GET_OBJECT,ASN1_R_TOO_LONG); /* Set this so that even if things are not long enough * the values are set correctly */ ret|=0x80; } -#endif *pp=p; return(ret|inf); err: @@ -143,7 +142,7 @@ err: static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max) { unsigned char *p= *pp; - long ret=0; + unsigned long ret=0; int i; if (max-- < 1) return(0); @@ -159,6 +158,8 @@ static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max) i= *p&0x7f; if (*(p++) & 0x80) { + if (i > sizeof(long)) + return 0; if (max-- == 0) return(0); while (i-- > 0) { @@ -170,8 +171,10 @@ static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max) else ret=i; } + if (ret > LONG_MAX) + return 0; *pp=p; - *rl=ret; + *rl=(long)ret; return(1); } @@ -407,7 +410,7 @@ int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b) void asn1_add_error(unsigned char *address, int offset) { - char buf1[16],buf2[16]; + char buf1[DECIMAL_SIZE(address)+1],buf2[DECIMAL_SIZE(offset)+1]; sprintf(buf1,"%lu",(unsigned long)address); sprintf(buf2,"%d",offset); diff --git a/crypto/asn1/d2i_pr.c b/crypto/asn1/d2i_pr.c index d56e5fdc6e..8d0dc27904 100644 --- a/crypto/asn1/d2i_pr.c +++ b/crypto/asn1/d2i_pr.c @@ -68,8 +68,8 @@ #ifndef OPENSSL_NO_DSA #include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA -#include <openssl/ecdsa.h> +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> #endif EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp, @@ -111,9 +111,9 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp, } break; #endif -#ifndef OPENSSL_NO_ECDSA - case EVP_PKEY_ECDSA: - if ((ret->pkey.ecdsa = d2i_ECDSAPrivateKey(NULL, +#ifndef OPENSSL_NO_EC + case EVP_PKEY_EC: + if ((ret->pkey.eckey = d2i_ECPrivateKey(NULL, (const unsigned char **)pp, length)) == NULL) { ASN1err(ASN1_F_D2I_PRIVATEKEY, ERR_R_ASN1_LIB); @@ -154,7 +154,7 @@ EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, unsigned char **pp, if(sk_ASN1_TYPE_num(inkey) == 6) keytype = EVP_PKEY_DSA; else if (sk_ASN1_TYPE_num(inkey) == 4) - keytype = EVP_PKEY_ECDSA; + keytype = EVP_PKEY_EC; else keytype = EVP_PKEY_RSA; sk_ASN1_TYPE_pop_free(inkey, ASN1_TYPE_free); return d2i_PrivateKey(keytype, a, pp, length); diff --git a/crypto/asn1/d2i_pu.c b/crypto/asn1/d2i_pu.c index f66d72fd7b..cf97b83eac 100644 --- a/crypto/asn1/d2i_pu.c +++ b/crypto/asn1/d2i_pu.c @@ -68,8 +68,8 @@ #ifndef OPENSSL_NO_DSA #include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA -#include <openssl/ecdsa.h> +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> #endif EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp, @@ -111,10 +111,11 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp, } break; #endif -#ifndef OPENSSL_NO_ECDSA - case EVP_PKEY_ECDSA: - if ((ret->pkey.ecdsa = ECDSAPublicKey_set_octet_string(&(ret->pkey.ecdsa), - (const unsigned char **)pp, length)) == NULL) +#ifndef OPENSSL_NO_EC + case EVP_PKEY_EC: + if ((ret->pkey.eckey = ECPublicKey_set_octet_string( + &(ret->pkey.eckey), (const unsigned char **)pp, + length)) == NULL) { ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB); goto err; diff --git a/crypto/asn1/i2d_pr.c b/crypto/asn1/i2d_pr.c index a40c64d3f4..bbf2a0d2d6 100644 --- a/crypto/asn1/i2d_pr.c +++ b/crypto/asn1/i2d_pr.c @@ -67,8 +67,8 @@ #ifndef OPENSSL_NO_DSA #include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA -#include <openssl/ecdsa.h> +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> #endif int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp) @@ -86,10 +86,10 @@ int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp) return(i2d_DSAPrivateKey(a->pkey.dsa,pp)); } #endif -#ifndef OPENSSL_NO_ECDSA - if (a->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (a->type == EVP_PKEY_EC) { - return(i2d_ECDSAPrivateKey(a->pkey.ecdsa, pp)); + return(i2d_ECPrivateKey(a->pkey.eckey, pp)); } #endif diff --git a/crypto/asn1/i2d_pu.c b/crypto/asn1/i2d_pu.c index 2fcc5554a7..85220b44d6 100644 --- a/crypto/asn1/i2d_pu.c +++ b/crypto/asn1/i2d_pu.c @@ -67,8 +67,8 @@ #ifndef OPENSSL_NO_DSA #include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA -#include <openssl/ecdsa.h> +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> #endif int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp) @@ -83,9 +83,9 @@ int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp) case EVP_PKEY_DSA: return(i2d_DSAPublicKey(a->pkey.dsa,pp)); #endif -#ifndef OPENSSL_NO_ECDSA - case EVP_PKEY_ECDSA: - return(ECDSAPublicKey_get_octet_string(a->pkey.ecdsa, pp)); +#ifndef OPENSSL_NO_EC + case EVP_PKEY_EC: + return(ECPublicKey_get_octet_string(a->pkey.eckey, pp)); #endif default: ASN1err(ASN1_F_I2D_PUBLICKEY,ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE); diff --git a/crypto/asn1/t_pkey.c b/crypto/asn1/t_pkey.c index 652b26b7b0..964fd914f7 100644 --- a/crypto/asn1/t_pkey.c +++ b/crypto/asn1/t_pkey.c @@ -55,6 +55,11 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Binary polynomial ECC support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <stdio.h> #include "cryptlib.h" @@ -70,12 +75,14 @@ #ifndef OPENSSL_NO_DSA #include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA -#include <openssl/ecdsa.h> +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> #endif static int print(BIO *fp,const char *str,BIGNUM *num, unsigned char *buf,int off); +static int print_bin(BIO *fp, const char *str, const unsigned char *num, + size_t len, int off); #ifndef OPENSSL_NO_RSA #ifndef OPENSSL_NO_FP_API int RSA_print_fp(FILE *fp, const RSA *x, int off) @@ -257,6 +264,22 @@ int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off) BIO_free(b); return(ret); } + +int EC_KEY_print_fp(FILE *fp, const EC_KEY *x, int off) + { + BIO *b; + int ret; + + if ((b=BIO_new(BIO_s_file())) == NULL) + { + ECerr(EC_F_EC_KEY_PRINT_FP, ERR_R_BIO_LIB); + return(0); + } + BIO_set_fp(b, fp, BIO_NOCLOSE); + ret = EC_KEY_print(b, x, off); + BIO_free(b); + return(ret); + } #endif int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) @@ -268,7 +291,9 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) BN_CTX *ctx=NULL; EC_POINT *point=NULL; BIGNUM *p=NULL, *a=NULL, *b=NULL, *gen=NULL, - *order=NULL, *cofactor=NULL, *seed=NULL; + *order=NULL, *cofactor=NULL; + const unsigned char *seed; + size_t seed_len=0; static const char *gen_compressed = "Generator (compressed):"; static const char *gen_uncompressed = "Generator (uncompressed):"; @@ -306,8 +331,12 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) else { /* explicit parameters */ - /* TODO */ + int is_char_two = 0; point_conversion_form_t form; + int tmp_nid = EC_METHOD_get_field_type(EC_GROUP_method_of(x)); + + if (tmp_nid == NID_X9_62_characteristic_two_field) + is_char_two = 1; if ((p = BN_new()) == NULL || (a = BN_new()) == NULL || (b = BN_new()) == NULL || (order = BN_new()) == NULL || @@ -317,10 +346,21 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) goto err; } - if (!EC_GROUP_get_curve_GFp(x, p, a, b, ctx)) + if (is_char_two) { - reason = ERR_R_EC_LIB; - goto err; + if (!EC_GROUP_get_curve_GF2m(x, p, a, b, ctx)) + { + reason = ERR_R_EC_LIB; + goto err; + } + } + else /* prime field */ + { + if (!EC_GROUP_get_curve_GFp(x, p, a, b, ctx)) + { + reason = ERR_R_EC_LIB; + goto err; + } } if ((point = EC_GROUP_get0_generator(x)) == NULL) @@ -356,18 +396,8 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) if (buf_len < (i = (size_t)BN_num_bytes(cofactor))) buf_len = i; - if (EC_GROUP_get0_seed(x)) - { - seed = BN_bin2bn(EC_GROUP_get0_seed(x), - EC_GROUP_get_seed_len(x), NULL); - if (seed == NULL) - { - reason = ERR_R_BN_LIB; - goto err; - } - if (buf_len < (i = (size_t)BN_num_bytes(seed))) - buf_len = i; - } + if ((seed = EC_GROUP_get0_seed(x)) != NULL) + seed_len = EC_GROUP_get_seed_len(x); buf_len += 10; if ((buffer = OPENSSL_malloc(buf_len)) == NULL) @@ -379,10 +409,25 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) { if (off > 128) off=128; memset(str,' ',off); + if (BIO_write(bp, str, off) <= 0) + goto err; + } + + if (BIO_printf(bp, "Field Type: %s\n", OBJ_nid2sn(tmp_nid)) + <= 0) + goto err; + + if (is_char_two) + { + if ((p != NULL) && !print(bp, "Polynomial:", p, buffer, + off)) + goto err; + } + else + { + if ((p != NULL) && !print(bp, "Prime:", p, buffer,off)) + goto err; } - - if ((p != NULL) && !print(bp, "P: ", p, buffer, off)) - goto err; if ((a != NULL) && !print(bp, "A: ", a, buffer, off)) goto err; if ((b != NULL) && !print(bp, "B: ", b, buffer, off)) @@ -409,8 +454,8 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) buffer, off)) goto err; if ((cofactor != NULL) && !print(bp, "Cofactor: ", cofactor, buffer, off)) goto err; - if ((seed != NULL) && !print(bp, "Seed:", seed, - buffer, off)) goto err; + if (seed && !print_bin(bp, "Seed:", seed, seed_len, off)) + goto err; } ret=1; err: @@ -428,37 +473,14 @@ err: BN_free(order); if (cofactor) BN_free(cofactor); - if (seed) - BN_free(seed); if (ctx) BN_CTX_free(ctx); if (buffer != NULL) OPENSSL_free(buffer); return(ret); } -#endif /* OPENSSL_NO_EC */ - -#ifndef OPENSSL_NO_ECDSA -#ifndef OPENSSL_NO_FP_API -int ECDSA_print_fp(FILE *fp, const ECDSA *x, int off) -{ - BIO *b; - int ret; - - if ((b=BIO_new(BIO_s_file())) == NULL) - { - ECDSAerr(ECDSA_F_ECDSA_PRINT_FP, ERR_R_BIO_LIB); - return(0); - } - BIO_set_fp(b, fp, BIO_NOCLOSE); - ret = ECDSA_print(b, x, off); - BIO_free(b); - return(ret); -} -#endif - -int ECDSA_print(BIO *bp, const ECDSA *x, int off) +int EC_KEY_print(BIO *bp, const EC_KEY *x, int off) { char str[128]; unsigned char *buffer=NULL; @@ -474,7 +496,7 @@ int ECDSA_print(BIO *bp, const ECDSA *x, int off) } if ((pub_key = EC_POINT_point2bn(x->group, x->pub_key, - ECDSA_get_conversion_form(x), NULL, ctx)) == NULL) + x->conv_form, NULL, ctx)) == NULL) { reason = ERR_R_EC_LIB; goto err; @@ -516,7 +538,7 @@ int ECDSA_print(BIO *bp, const ECDSA *x, int off) ret=1; err: if (!ret) - ECDSAerr(ECDSA_F_ECDSA_PRINT, reason); + ECerr(EC_F_EC_KEY_PRINT, reason); if (pub_key) BN_free(pub_key); if (ctx) @@ -525,7 +547,7 @@ err: OPENSSL_free(buffer); return(ret); } -#endif +#endif /* OPENSSL_NO_EC */ static int print(BIO *bp, const char *number, BIGNUM *num, unsigned char *buf, int off) @@ -577,6 +599,44 @@ static int print(BIO *bp, const char *number, BIGNUM *num, unsigned char *buf, return(1); } +static int print_bin(BIO *fp, const char *name, const unsigned char *buf, + size_t len, int off) + { + int i; + char str[128]; + + if (buf == NULL) + return 1; + if (off) + { + if (off > 128) + off=128; + memset(str,' ',off); + if (BIO_write(fp, str, off) <= 0) + return 0; + } + + if (BIO_printf(fp,"%s", name) <= 0) + return 0; + + for (i=0; i<len; i++) + { + if ((i%15) == 0) + { + str[0]='\n'; + memset(&(str[1]),' ',off+4); + if (BIO_write(fp, str, off+1+4) <= 0) + return 0; + } + if (BIO_printf(fp,"%02x%s",buf[i],((i+1) == len)?"":":") <= 0) + return 0; + } + if (BIO_write(fp,"\n",1) <= 0) + return 0; + + return 1; + } + #ifndef OPENSSL_NO_DH #ifndef OPENSSL_NO_FP_API int DHparams_print_fp(FILE *fp, const DH *x) @@ -690,26 +750,26 @@ err: #endif /* !OPENSSL_NO_DSA */ -#ifndef OPENSSL_NO_ECDSA +#ifndef OPENSSL_NO_EC #ifndef OPENSSL_NO_FP_API -int ECDSAParameters_print_fp(FILE *fp, const ECDSA *x) +int ECParameters_print_fp(FILE *fp, const EC_KEY *x) { BIO *b; int ret; if ((b=BIO_new(BIO_s_file())) == NULL) - { - ECDSAerr(ECDSA_F_ECDSAPARAMETERS_PRINT_FP, ERR_R_BIO_LIB); + { + ECerr(EC_F_ECPARAMETERS_PRINT_FP, ERR_R_BIO_LIB); return(0); - } + } BIO_set_fp(b, fp, BIO_NOCLOSE); - ret = ECDSAParameters_print(b, x); + ret = ECParameters_print(b, x); BIO_free(b); return(ret); } #endif -int ECDSAParameters_print(BIO *bp, const ECDSA *x) +int ECParameters_print(BIO *bp, const EC_KEY *x) { int reason=ERR_R_EC_LIB, ret=0; BIGNUM *order=NULL; @@ -741,7 +801,7 @@ int ECDSAParameters_print(BIO *bp, const ECDSA *x) err: if (order) BN_free(order); - ECDSAerr(ECDSA_F_ECDSAPARAMETERS_PRINT, reason); + ECerr(EC_F_ECPARAMETERS_PRINT, reason); return(ret); } diff --git a/crypto/asn1/t_req.c b/crypto/asn1/t_req.c index bfa58cc967..7cf09a4646 100644 --- a/crypto/asn1/t_req.c +++ b/crypto/asn1/t_req.c @@ -134,11 +134,11 @@ int X509_REQ_print(BIO *bp, X509_REQ *x) } else #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey != NULL && pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (pkey != NULL && pkey->type == EVP_PKEY_EC) { - BIO_printf(bp, "%12sECDSA Public Key: \n",""); - ECDSA_print(bp, pkey->pkey.ecdsa, 16); + BIO_printf(bp, "%12sEC Public Key: \n",""); + EC_KEY_print(bp, pkey->pkey.eckey, 16); } else #endif diff --git a/crypto/asn1/t_spki.c b/crypto/asn1/t_spki.c index 86821119d8..499e12834a 100644 --- a/crypto/asn1/t_spki.c +++ b/crypto/asn1/t_spki.c @@ -93,11 +93,11 @@ int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki) } else #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (pkey->type == EVP_PKEY_EC) { - BIO_printf(out, " ECDSA Public Key:\n"); - ECDSA_print(out, pkey->pkey.ecdsa,2); + BIO_printf(out, " EC Public Key:\n"); + EC_KEY_print(out, pkey->pkey.eckey,2); } else #endif diff --git a/crypto/asn1/t_x509.c b/crypto/asn1/t_x509.c index ae6d5ce041..5074a74928 100644 --- a/crypto/asn1/t_x509.c +++ b/crypto/asn1/t_x509.c @@ -66,8 +66,8 @@ #ifndef OPENSSL_NO_DSA #include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA -#include <openssl/ecdsa.h> +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> #endif #include <openssl/objects.h> #include <openssl/x509.h> @@ -232,11 +232,11 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag) } else #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (pkey->type == EVP_PKEY_EC) { - BIO_printf(bp, "%12sECDSA Public Key:\n",""); - ECDSA_print(bp, pkey->pkey.ecdsa, 16); + BIO_printf(bp, "%12sEC Public Key:\n",""); + EC_KEY_print(bp, pkey->pkey.eckey, 16); } else #endif diff --git a/crypto/asn1/x_pubkey.c b/crypto/asn1/x_pubkey.c index 68ddeb43f2..c32a6eaa49 100644 --- a/crypto/asn1/x_pubkey.c +++ b/crypto/asn1/x_pubkey.c @@ -129,14 +129,14 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) OPENSSL_free(p); } #endif -#ifndef OPENSSL_NO_ECDSA - else if (pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + else if (pkey->type == EVP_PKEY_EC) { int nid=0; unsigned char *pp; - ECDSA *ecdsa; + EC_KEY *eckey; - ecdsa = pkey->pkey.ecdsa; + eckey = pkey->pkey.eckey; ASN1_TYPE_free(a->parameter); if ((a->parameter = ASN1_TYPE_new()) == NULL) @@ -145,8 +145,8 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) goto err; } - if (EC_GROUP_get_asn1_flag(ecdsa->group) - && (nid = EC_GROUP_get_nid(ecdsa->group))) + if (EC_GROUP_get_asn1_flag(eckey->group) + && (nid = EC_GROUP_get_nid(eckey->group))) { /* just set the OID */ a->parameter->type = V_ASN1_OBJECT; @@ -154,9 +154,9 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) } else /* explicit parameters */ { - if ((i = i2d_ECDSAParameters(ecdsa, NULL)) == 0) + if ((i = i2d_ECParameters(eckey, NULL)) == 0) { - X509err(X509_F_X509_PUBKEY_SET, ERR_R_ECDSA_LIB); + X509err(X509_F_X509_PUBKEY_SET, ERR_R_EC_LIB); goto err; } if ((p = (unsigned char *) OPENSSL_malloc(i)) == NULL) @@ -165,9 +165,9 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) goto err; } pp = p; - if (!i2d_ECDSAParameters(ecdsa, &pp)) + if (!i2d_ECParameters(eckey, &pp)) { - X509err(X509_F_X509_PUBKEY_SET, ERR_R_ECDSA_LIB); + X509err(X509_F_X509_PUBKEY_SET, ERR_R_EC_LIB); OPENSSL_free(p); goto err; } @@ -277,24 +277,25 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key) ret->save_parameters=1; } #endif -#ifndef OPENSSL_NO_ECDSA - else if (ret->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + else if (ret->type == EVP_PKEY_EC) { if (a->parameter && (a->parameter->type == V_ASN1_SEQUENCE)) { /* type == V_ASN1_SEQUENCE => we have explicit parameters * (e.g. parameters in the X9_62_EC_PARAMETERS-structure ) */ - if ((ret->pkey.ecdsa= ECDSA_new()) == NULL) + if ((ret->pkey.eckey= EC_KEY_new()) == NULL) { - X509err(X509_F_X509_PUBKEY_GET, ERR_R_MALLOC_FAILURE); + X509err(X509_F_X509_PUBKEY_GET, + ERR_R_MALLOC_FAILURE); goto err; } cp = p = a->parameter->value.sequence->data; j = a->parameter->value.sequence->length; - if (!d2i_ECDSAParameters(&ret->pkey.ecdsa, &cp, (long)j)) + if (!d2i_ECParameters(&ret->pkey.eckey, &cp, (long)j)) { - X509err(X509_F_X509_PUBKEY_GET, ERR_R_ECDSA_LIB); + X509err(X509_F_X509_PUBKEY_GET, ERR_R_EC_LIB); goto err; } } @@ -303,16 +304,16 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key) /* type == V_ASN1_OBJECT => the parameters are given * by an asn1 OID */ - ECDSA *ecdsa; - if (ret->pkey.ecdsa == NULL) - ret->pkey.ecdsa = ECDSA_new(); - ecdsa = ret->pkey.ecdsa; - if (ecdsa->group) - EC_GROUP_free(ecdsa->group); - if ((ecdsa->group = EC_GROUP_new_by_name( + EC_KEY *eckey; + if (ret->pkey.eckey == NULL) + ret->pkey.eckey = EC_KEY_new(); + eckey = ret->pkey.eckey; + if (eckey->group) + EC_GROUP_free(eckey->group); + if ((eckey->group = EC_GROUP_new_by_nid( OBJ_obj2nid(a->parameter->value.object))) == NULL) goto err; - EC_GROUP_set_asn1_flag(ecdsa->group, + EC_GROUP_set_asn1_flag(eckey->group, OPENSSL_EC_NAMED_CURVE); } /* the case implicitlyCA is currently not implemented */ @@ -453,38 +454,38 @@ int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp) } #endif -#ifndef OPENSSL_NO_ECDSA -ECDSA *d2i_ECDSA_PUBKEY(ECDSA **a, unsigned char **pp, long length) +#ifndef OPENSSL_NO_EC +EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, unsigned char **pp, long length) { EVP_PKEY *pkey; - ECDSA *key; + EC_KEY *key; unsigned char *q; q = *pp; pkey = d2i_PUBKEY(NULL, &q, length); if (!pkey) return(NULL); - key = EVP_PKEY_get1_ECDSA(pkey); + key = EVP_PKEY_get1_EC_KEY(pkey); EVP_PKEY_free(pkey); if (!key) return(NULL); *pp = q; if (a) { - ECDSA_free(*a); + EC_KEY_free(*a); *a = key; } return(key); } -int i2d_ECDSA_PUBKEY(ECDSA *a, unsigned char **pp) +int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp) { EVP_PKEY *pktmp; int ret; if (!a) return(0); if ((pktmp = EVP_PKEY_new()) == NULL) { - ASN1err(ASN1_F_I2D_ECDSA_PUBKEY, ERR_R_MALLOC_FAILURE); + ASN1err(ASN1_F_I2D_EC_PUBKEY, ERR_R_MALLOC_FAILURE); return(0); } - EVP_PKEY_set1_ECDSA(pktmp, a); + EVP_PKEY_set1_EC_KEY(pktmp, a); ret = i2d_PUBKEY(pktmp, pp); EVP_PKEY_free(pktmp); return(ret); diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c index 3ce1290772..80c9cb69db 100644 --- a/crypto/bio/b_print.c +++ b/crypto/bio/b_print.c @@ -109,7 +109,7 @@ * o ... (for OpenSSL) */ -#if HAVE_LONG_DOUBLE +#ifdef HAVE_LONG_DOUBLE #define LDOUBLE long double #else #define LDOUBLE double diff --git a/crypto/bn/Makefile.ssl b/crypto/bn/Makefile.ssl index 46663d389c..4e27e87eab 100644 --- a/crypto/bn/Makefile.ssl +++ b/crypto/bn/Makefile.ssl @@ -39,12 +39,12 @@ LIB=$(TOP)/libcrypto.a LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \ bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \ bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \ - bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c + bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \ bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \ bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \ - bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o + bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o bn_gf2m.o SRC= $(LIBSRC) @@ -242,6 +242,13 @@ bn_gcd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h bn_gcd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h bn_gcd.o: ../cryptlib.h bn_gcd.c bn_lcl.h +bn_gf2m.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_gf2m.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_gf2m.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_gf2m.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_gf2m.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_gf2m.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_gf2m.o: ../cryptlib.h bn_gf2m.c bn_lcl.h bn_kron.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h bn_kron.o: ../../include/openssl/opensslconf.h bn_kron.c bn_lcl.h bn_lib.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h index 1eaf879553..1170465b1f 100644 --- a/crypto/bn/bn.h +++ b/crypto/bn/bn.h @@ -55,6 +55,32 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the Eric Young open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The binary polynomial arithmetic software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #ifndef HEADER_BN_H #define HEADER_BN_H @@ -430,7 +456,7 @@ int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b, int BN_from_montgomery(BIGNUM *r,const BIGNUM *a, BN_MONT_CTX *mont, BN_CTX *ctx); void BN_MONT_CTX_free(BN_MONT_CTX *mont); -int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *modulus,BN_CTX *ctx); +int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *mod,BN_CTX *ctx); BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to,BN_MONT_CTX *from); BN_BLINDING *BN_BLINDING_new(BIGNUM *A,BIGNUM *Ai,BIGNUM *mod); @@ -453,6 +479,40 @@ int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp, BN_CTX *ctx); +/* Functions for arithmetic over binary polynomials represented by BIGNUMs. + * + * The BIGNUM::neg property of BIGNUMs representing binary polynomials is ignored. + * + * Note that input arguments are not const so that their bit arrays can + * be expanded to the appropriate size if needed. + */ +int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); /* r = a + b */ +#define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b) +int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p); /* r = a mod p */ +int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); /* r = (a * b) mod p */ +int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); /* r = (a * a) mod p */ +int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); /* r = (1 / b) mod p */ +int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); /* r = (a / b) mod p */ +int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); /* r = (a ^ b) mod p */ +int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); /* r = sqrt(a) mod p */ +int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); /* r^2 + r = a mod p */ +#define BN_GF2m_cmp(a, b) BN_ucmp((a), (b)) +/* Some functions allow for representation of the irreducible polynomials + * as an unsigned int[], say p. The irreducible f(t) is then of the form: + * t^p[0] + t^p[1] + ... + t^p[k] + * where m = p[0] > p[1] > ... > p[k] = 0. + */ +int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[]); /* r = a mod p */ +int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const unsigned int p[], BN_CTX *ctx); /* r = (a * b) mod p */ +int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[], BN_CTX *ctx); /* r = (a * a) mod p */ +int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const unsigned int p[], BN_CTX *ctx); /* r = (1 / b) mod p */ +int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const unsigned int p[], BN_CTX *ctx); /* r = (a / b) mod p */ +int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const unsigned int p[], BN_CTX *ctx); /* r = (a ^ b) mod p */ +int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[], BN_CTX *ctx); /* r = sqrt(a) mod p */ +int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[], BN_CTX *ctx); /* r^2 + r = a mod p */ +int BN_GF2m_poly2arr(const BIGNUM *a, unsigned int p[], int max); +int BN_GF2m_arr2poly(const unsigned int p[], BIGNUM *a); + /* library internal functions */ #define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\ @@ -510,6 +570,13 @@ void ERR_load_BN_strings(void); #define BN_F_BN_DIV 107 #define BN_F_BN_EXPAND2 108 #define BN_F_BN_EXPAND_INTERNAL 120 +#define BN_F_BN_GF2M_MOD 126 +#define BN_F_BN_GF2M_MOD_DIV 123 +#define BN_F_BN_GF2M_MOD_EXP 127 +#define BN_F_BN_GF2M_MOD_MUL 124 +#define BN_F_BN_GF2M_MOD_SOLVE_QUAD 128 +#define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR 129 +#define BN_F_BN_GF2M_MOD_SQR 125 #define BN_F_BN_MOD_EXP2_MONT 118 #define BN_F_BN_MOD_EXP_MONT 109 #define BN_F_BN_MOD_EXP_MONT_WORD 117 @@ -535,6 +602,7 @@ void ERR_load_BN_strings(void); #define BN_R_INVALID_LENGTH 106 #define BN_R_INVALID_RANGE 115 #define BN_R_NOT_A_SQUARE 111 +#define BN_R_NOT_IMPLEMENTED 116 #define BN_R_NOT_INITIALIZED 107 #define BN_R_NO_INVERSE 108 #define BN_R_P_IS_NOT_PRIME 112 diff --git a/crypto/bn/bn_err.c b/crypto/bn/bn_err.c index fb84ee96d8..bcc7ff97af 100644 --- a/crypto/bn/bn_err.c +++ b/crypto/bn/bn_err.c @@ -1,6 +1,6 @@ /* crypto/bn/bn_err.c */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -77,6 +77,13 @@ static ERR_STRING_DATA BN_str_functs[]= {ERR_PACK(0,BN_F_BN_DIV,0), "BN_div"}, {ERR_PACK(0,BN_F_BN_EXPAND2,0), "bn_expand2"}, {ERR_PACK(0,BN_F_BN_EXPAND_INTERNAL,0), "BN_EXPAND_INTERNAL"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD,0), "BN_GF2m_mod"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD_DIV,0), "BN_GF2m_mod_div"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD_EXP,0), "BN_GF2m_mod_exp"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD_MUL,0), "BN_GF2m_mod_mul"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD_SOLVE_QUAD,0), "BN_GF2m_mod_solve_quad"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR,0), "BN_GF2m_mod_solve_quad_arr"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD_SQR,0), "BN_GF2m_mod_sqr"}, {ERR_PACK(0,BN_F_BN_MOD_EXP2_MONT,0), "BN_mod_exp2_mont"}, {ERR_PACK(0,BN_F_BN_MOD_EXP_MONT,0), "BN_mod_exp_mont"}, {ERR_PACK(0,BN_F_BN_MOD_EXP_MONT_WORD,0), "BN_mod_exp_mont_word"}, @@ -105,6 +112,7 @@ static ERR_STRING_DATA BN_str_reasons[]= {BN_R_INVALID_LENGTH ,"invalid length"}, {BN_R_INVALID_RANGE ,"invalid range"}, {BN_R_NOT_A_SQUARE ,"not a square"}, +{BN_R_NOT_IMPLEMENTED ,"not implemented"}, {BN_R_NOT_INITIALIZED ,"not initialized"}, {BN_R_NO_INVERSE ,"no inverse"}, {BN_R_P_IS_NOT_PRIME ,"p is not prime"}, diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index a016cb7f53..20f851cc66 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -363,17 +363,6 @@ static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words) } } - /* Now need to zero any data between b->top and b->max */ - /* XXX Why? */ - - A= &(a[b->top]); - for (i=(words - b->top)>>3; i>0; i--,A+=8) - { - A[0]=0; A[1]=0; A[2]=0; A[3]=0; - A[4]=0; A[5]=0; A[6]=0; A[7]=0; - } - for (i=(words - b->top)&7; i>0; i--,A++) - A[0]=0; #else memset(A,0,sizeof(BN_ULONG)*(words+1)); memcpy(A,b->d,sizeof(b->d[0])*b->top); @@ -397,6 +386,12 @@ BIGNUM *bn_dup_expand(const BIGNUM *b, int words) { BIGNUM *r = NULL; + /* This function does not work if + * words <= b->dmax && top < words + * because BN_dup() does not preserve 'dmax'! + * (But bn_dup_expand() is not used anywhere yet.) + */ + if (words > b->dmax) { BN_ULONG *a = bn_expand_internal(b, words); @@ -429,12 +424,16 @@ BIGNUM *bn_dup_expand(const BIGNUM *b, int words) } /* This is an internal function that should not be used in applications. - * It ensures that 'b' has enough room for a 'words' word number number. + * It ensures that 'b' has enough room for a 'words' word number + * and initialises any unused part of b->d with leading zeros. * It is mostly used by the various BIGNUM routines. If there is an error, * NULL is returned. If not, 'b' is returned. */ BIGNUM *bn_expand2(BIGNUM *b, int words) { + BN_ULONG *A; + int i; + if (words > b->dmax) { BN_ULONG *a = bn_expand_internal(b, words); @@ -449,6 +448,21 @@ BIGNUM *bn_expand2(BIGNUM *b, int words) else b = NULL; } + + /* NB: bn_wexpand() calls this only if the BIGNUM really has to grow */ + if ((b != NULL) && (b->top < b->dmax)) + { + A = &(b->d[b->top]); + for (i=(b->dmax - b->top)>>3; i>0; i--,A+=8) + { + A[0]=0; A[1]=0; A[2]=0; A[3]=0; + A[4]=0; A[5]=0; A[6]=0; A[7]=0; + } + for (i=(b->dmax - b->top)&7; i>0; i--,A++) + A[0]=0; + assert(A == &(b->d[b->dmax])); + } + return b; } diff --git a/crypto/bn/bn_rand.c b/crypto/bn/bn_rand.c index 9e08ccd22e..e6705f7025 100644 --- a/crypto/bn/bn_rand.c +++ b/crypto/bn/bn_rand.c @@ -230,6 +230,7 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) { int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand; int n; + int count = 100; if (range->neg || BN_is_zero(range)) { @@ -263,6 +264,13 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) if (BN_cmp(r, range) >= 0) if (!BN_sub(r, r, range)) return 0; } + + if (!--count) + { + BNerr(BN_F_BN_RAND_RANGE, BN_R_TOO_MANY_ITERATIONS); + return 0; + } + } while (BN_cmp(r, range) >= 0); } @@ -272,6 +280,12 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) { /* range = 11..._2 or range = 101..._2 */ if (!bn_rand(r, n, -1, 0)) return 0; + + if (!--count) + { + BNerr(BN_F_BN_RAND_RANGE, BN_R_TOO_MANY_ITERATIONS); + return 0; + } } while (BN_cmp(r, range) >= 0); } diff --git a/crypto/bn/bn_sqrt.c b/crypto/bn/bn_sqrt.c index e2a1105dc8..463d4a8139 100644 --- a/crypto/bn/bn_sqrt.c +++ b/crypto/bn/bn_sqrt.c @@ -65,14 +65,12 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) * using the Tonelli/Shanks algorithm (cf. Henri Cohen, "A Course * in Algebraic Computational Number Theory", algorithm 1.5.1). * 'p' must be prime! - * If 'a' is not a square, this is not necessarily detected by - * the algorithms; a bogus result must be expected in this case. */ { BIGNUM *ret = in; int err = 1; int r; - BIGNUM *b, *q, *t, *x, *y; + BIGNUM *A, *b, *q, *t, *x, *y; int e, i, j; if (!BN_is_odd(p) || BN_abs_is_word(p, 1)) @@ -109,17 +107,8 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) return ret; } -#if 0 /* if BN_mod_sqrt is used with correct input, this just wastes time */ - r = BN_kronecker(a, p, ctx); - if (r < -1) return NULL; - if (r == -1) - { - BNerr(BN_F_BN_MOD_SQRT, BN_R_NOT_A_SQUARE); - return(NULL); - } -#endif - BN_CTX_start(ctx); + A = BN_CTX_get(ctx); b = BN_CTX_get(ctx); q = BN_CTX_get(ctx); t = BN_CTX_get(ctx); @@ -131,6 +120,9 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) ret = BN_new(); if (ret == NULL) goto end; + /* A = a mod p */ + if (!BN_nnmod(A, a, p, ctx)) goto end; + /* now write |p| - 1 as 2^e*q where q is odd */ e = 1; while (!BN_is_bit_set(p, e)) @@ -149,9 +141,9 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) if (!BN_rshift(q, p, 2)) goto end; q->neg = 0; if (!BN_add_word(q, 1)) goto end; - if (!BN_mod_exp(ret, a, q, p, ctx)) goto end; + if (!BN_mod_exp(ret, A, q, p, ctx)) goto end; err = 0; - goto end; + goto vrfy; } if (e == 2) @@ -182,15 +174,8 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) * November 1992.) */ - /* make sure that a is reduced modulo p */ - if (a->neg || BN_ucmp(a, p) >= 0) - { - if (!BN_nnmod(x, a, p, ctx)) goto end; - a = x; /* use x as temporary variable */ - } - /* t := 2*a */ - if (!BN_mod_lshift1_quick(t, a, p)) goto end; + if (!BN_mod_lshift1_quick(t, A, p)) goto end; /* b := (2*a)^((|p|-5)/8) */ if (!BN_rshift(q, p, 3)) goto end; @@ -205,12 +190,12 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) if (!BN_sub_word(t, 1)) goto end; /* x = a*b*t */ - if (!BN_mod_mul(x, a, b, p, ctx)) goto end; + if (!BN_mod_mul(x, A, b, p, ctx)) goto end; if (!BN_mod_mul(x, x, t, p, ctx)) goto end; if (!BN_copy(ret, x)) goto end; err = 0; - goto end; + goto vrfy; } /* e > 2, so we really have to use the Tonelli/Shanks algorithm. @@ -297,7 +282,7 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) /* x := a^((q-1)/2) */ if (BN_is_zero(t)) /* special case: p = 2^e + 1 */ { - if (!BN_nnmod(t, a, p, ctx)) goto end; + if (!BN_nnmod(t, A, p, ctx)) goto end; if (BN_is_zero(t)) { /* special case: a == 0 (mod p) */ @@ -310,7 +295,7 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) } else { - if (!BN_mod_exp(x, a, t, p, ctx)) goto end; + if (!BN_mod_exp(x, A, t, p, ctx)) goto end; if (BN_is_zero(x)) { /* special case: a == 0 (mod p) */ @@ -322,10 +307,10 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) /* b := a*x^2 (= a^q) */ if (!BN_mod_sqr(b, x, p, ctx)) goto end; - if (!BN_mod_mul(b, b, a, p, ctx)) goto end; + if (!BN_mod_mul(b, b, A, p, ctx)) goto end; /* x := a*x (= a^((q+1)/2)) */ - if (!BN_mod_mul(x, x, a, p, ctx)) goto end; + if (!BN_mod_mul(x, x, A, p, ctx)) goto end; while (1) { @@ -342,7 +327,7 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) { if (!BN_copy(ret, x)) goto end; err = 0; - goto end; + goto vrfy; } @@ -373,6 +358,22 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) e = i; } + vrfy: + if (!err) + { + /* verify the result -- the input might have been not a square + * (test added in 0.9.8) */ + + if (!BN_mod_sqr(x, ret, p, ctx)) + err = 1; + + if (!err && 0 != BN_cmp(x, A)) + { + BNerr(BN_F_BN_MOD_SQRT, BN_R_NOT_A_SQUARE); + err = 1; + } + } + end: if (err) { diff --git a/crypto/bn/bntest.c b/crypto/bn/bntest.c index 8158a67374..9026b2888d 100644 --- a/crypto/bn/bntest.c +++ b/crypto/bn/bntest.c @@ -55,6 +55,32 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the Eric Young open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The binary polynomial arithmetic software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #include <stdio.h> #include <stdlib.h> @@ -91,6 +117,15 @@ int test_mod(BIO *bp,BN_CTX *ctx); int test_mod_mul(BIO *bp,BN_CTX *ctx); int test_mod_exp(BIO *bp,BN_CTX *ctx); int test_exp(BIO *bp,BN_CTX *ctx); +int test_gf2m_add(BIO *bp); +int test_gf2m_mod(BIO *bp); +int test_gf2m_mod_mul(BIO *bp,BN_CTX *ctx); +int test_gf2m_mod_sqr(BIO *bp,BN_CTX *ctx); +int test_gf2m_mod_inv(BIO *bp,BN_CTX *ctx); +int test_gf2m_mod_div(BIO *bp,BN_CTX *ctx); +int test_gf2m_mod_exp(BIO *bp,BN_CTX *ctx); +int test_gf2m_mod_sqrt(BIO *bp,BN_CTX *ctx); +int test_gf2m_mod_solve_quad(BIO *bp,BN_CTX *ctx); int test_kron(BIO *bp,BN_CTX *ctx); int test_sqrt(BIO *bp,BN_CTX *ctx); int rand_neg(void); @@ -234,6 +269,42 @@ int main(int argc, char *argv[]) if (!test_sqrt(out,ctx)) goto err; BIO_flush(out); + message(out,"BN_GF2m_add"); + if (!test_gf2m_add(out)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod"); + if (!test_gf2m_mod(out)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_mul"); + if (!test_gf2m_mod_mul(out,ctx)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_sqr"); + if (!test_gf2m_mod_sqr(out,ctx)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_inv"); + if (!test_gf2m_mod_inv(out,ctx)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_div"); + if (!test_gf2m_mod_div(out,ctx)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_exp"); + if (!test_gf2m_mod_exp(out,ctx)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_sqrt"); + if (!test_gf2m_mod_sqrt(out,ctx)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_solve_quad"); + if (!test_gf2m_mod_solve_quad(out,ctx)) goto err; + BIO_flush(out); + BN_CTX_free(ctx); BIO_free(out); @@ -872,6 +943,581 @@ int test_exp(BIO *bp, BN_CTX *ctx) return(1); } +int test_gf2m_add(BIO *bp) + { + BIGNUM a,b,c; + int i, ret = 0; + + BN_init(&a); + BN_init(&b); + BN_init(&c); + + for (i=0; i<num0; i++) + { + BN_rand(&a,512,0,0); + BN_copy(&b, BN_value_one()); + a.neg=rand_neg(); + b.neg=rand_neg(); + BN_GF2m_add(&c,&a,&b); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,&a); + BIO_puts(bp," ^ "); + BN_print(bp,&b); + BIO_puts(bp," = "); + } + BN_print(bp,&c); + BIO_puts(bp,"\n"); + } +#endif + /* Test that two added values have the correct parity. */ + if((BN_is_odd(&a) && BN_is_odd(&c)) || (!BN_is_odd(&a) && !BN_is_odd(&c))) + { + fprintf(stderr,"GF(2^m) addition test (a) failed!\n"); + goto err; + } + BN_GF2m_add(&c,&c,&c); + /* Test that c + c = 0. */ + if(!BN_is_zero(&c)) + { + fprintf(stderr,"GF(2^m) addition test (b) failed!\n"); + goto err; + } + } + ret = 1; + err: + BN_free(&a); + BN_free(&b); + BN_free(&c); + return ret; + } + +int test_gf2m_mod(BIO *bp) + { + BIGNUM *a,*b[2],*c,*d,*e; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + e=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 1024, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod(c, a, b[j]); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,a); + BIO_puts(bp," % "); + BN_print(bp,b[j]); + BIO_puts(bp," - "); + BN_print(bp,c); + BIO_puts(bp,"\n"); + } + } +#endif + BN_GF2m_add(d, a, c); + BN_GF2m_mod(e, d, b[j]); + /* Test that a + (a mod p) mod p == 0. */ + if(!BN_is_zero(e)) + { + fprintf(stderr,"GF(2^m) modulo test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + BN_free(e); + return ret; + } + +int test_gf2m_mod_mul(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d,*e,*f,*g,*h; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + e=BN_new(); + f=BN_new(); + g=BN_new(); + h=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 1024, 0, 0); + BN_bntest_rand(c, 1024, 0, 0); + BN_bntest_rand(d, 1024, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod_mul(e, a, c, b[j], ctx); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,a); + BIO_puts(bp," * "); + BN_print(bp,c); + BIO_puts(bp," % "); + BN_print(bp,b[j]); + BIO_puts(bp," - "); + BN_print(bp,e); + BIO_puts(bp,"\n"); + } + } +#endif + BN_GF2m_add(f, a, d); + BN_GF2m_mod_mul(g, f, c, b[j], ctx); + BN_GF2m_mod_mul(h, d, c, b[j], ctx); + BN_GF2m_add(f, e, g); + BN_GF2m_add(f, f, h); + /* Test that (a+d)*c = a*c + d*c. */ + if(!BN_is_zero(f)) + { + fprintf(stderr,"GF(2^m) modular multiplication test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + BN_free(e); + BN_free(f); + BN_free(g); + BN_free(h); + return ret; + } + +int test_gf2m_mod_sqr(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 1024, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod_sqr(c, a, b[j], ctx); + BN_copy(d, a); + BN_GF2m_mod_mul(d, a, d, b[j], ctx); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,a); + BIO_puts(bp," ^ 2 % "); + BN_print(bp,b[j]); + BIO_puts(bp, " = "); + BN_print(bp,c); + BIO_puts(bp,"; a * a = "); + BN_print(bp,d); + BIO_puts(bp,"\n"); + } + } +#endif + BN_GF2m_add(d, c, d); + /* Test that a*a = a^2. */ + if(!BN_is_zero(d)) + { + fprintf(stderr,"GF(2^m) modular squaring test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + return ret; + } + +int test_gf2m_mod_inv(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 512, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod_inv(c, a, b[j], ctx); + BN_GF2m_mod_mul(d, a, c, b[j], ctx); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,a); + BIO_puts(bp, " * "); + BN_print(bp,c); + BIO_puts(bp," - 1 % "); + BN_print(bp,b[j]); + BIO_puts(bp,"\n"); + } + } +#endif + /* Test that ((1/a)*a) = 1. */ + if(!BN_is_one(d)) + { + fprintf(stderr,"GF(2^m) modular inversion test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + return ret; + } + +int test_gf2m_mod_div(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d,*e,*f; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + e=BN_new(); + f=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 512, 0, 0); + BN_bntest_rand(c, 512, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod_div(d, a, c, b[j], ctx); + BN_GF2m_mod_mul(e, d, c, b[j], ctx); + BN_GF2m_mod_div(f, a, e, b[j], ctx); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,a); + BIO_puts(bp, " = "); + BN_print(bp,c); + BIO_puts(bp," * "); + BN_print(bp,d); + BIO_puts(bp, " % "); + BN_print(bp,b[j]); + BIO_puts(bp,"\n"); + } + } +#endif + /* Test that ((a/c)*c)/a = 1. */ + if(!BN_is_one(f)) + { + fprintf(stderr,"GF(2^m) modular division test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + BN_free(e); + BN_free(f); + return ret; + } + +int test_gf2m_mod_exp(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d,*e,*f; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + e=BN_new(); + f=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 512, 0, 0); + BN_bntest_rand(c, 512, 0, 0); + BN_bntest_rand(d, 512, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod_exp(e, a, c, b[j], ctx); + BN_GF2m_mod_exp(f, a, d, b[j], ctx); + BN_GF2m_mod_mul(e, e, f, b[j], ctx); + BN_add(f, c, d); + BN_GF2m_mod_exp(f, a, f, b[j], ctx); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,a); + BIO_puts(bp, " ^ ("); + BN_print(bp,c); + BIO_puts(bp," + "); + BN_print(bp,d); + BIO_puts(bp, ") = "); + BN_print(bp,e); + BIO_puts(bp, "; - "); + BN_print(bp,f); + BIO_puts(bp, " % "); + BN_print(bp,b[j]); + BIO_puts(bp,"\n"); + } + } +#endif + BN_GF2m_add(f, e, f); + /* Test that a^(c+d)=a^c*a^d. */ + if(!BN_is_zero(f)) + { + fprintf(stderr,"GF(2^m) modular exponentiation test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + BN_free(e); + BN_free(f); + return ret; + } + +int test_gf2m_mod_sqrt(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d,*e,*f; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + e=BN_new(); + f=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 512, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod(c, a, b[j]); + BN_GF2m_mod_sqrt(d, a, b[j], ctx); + BN_GF2m_mod_sqr(e, d, b[j], ctx); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,d); + BIO_puts(bp, " ^ 2 - "); + BN_print(bp,a); + BIO_puts(bp,"\n"); + } + } +#endif + BN_GF2m_add(f, c, e); + /* Test that d^2 = a, where d = sqrt(a). */ + if(!BN_is_zero(f)) + { + fprintf(stderr,"GF(2^m) modular square root test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + BN_free(e); + BN_free(f); + return ret; + } + +int test_gf2m_mod_solve_quad(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d,*e; + int i, j, s = 0, t, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + e=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 512, 0, 0); + for (j=0; j < 2; j++) + { + t = BN_GF2m_mod_solve_quad(c, a, b[j], ctx); + if (t) + { + s++; + BN_GF2m_mod_sqr(d, c, b[j], ctx); + BN_GF2m_add(d, c, d); + BN_GF2m_mod(e, a, b[j]); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,c); + BIO_puts(bp, " is root of z^2 + z = "); + BN_print(bp,a); + BIO_puts(bp, " % "); + BN_print(bp,b[j]); + BIO_puts(bp, "\n"); + } + } +#endif + BN_GF2m_add(e, e, d); + /* Test that solution of quadratic c satisfies c^2 + c = a. */ + if(!BN_is_zero(e)) + { + fprintf(stderr,"GF(2^m) modular solve quadratic test failed!\n"); + goto err; + } + + } + else + { +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BIO_puts(bp, "There are no roots of z^2 + z = "); + BN_print(bp,a); + BIO_puts(bp, " % "); + BN_print(bp,b[j]); + BIO_puts(bp, "\n"); + } + } +#endif + } + } + } + if (s == 0) + { + fprintf(stderr,"All %i tests of GF(2^m) modular solve quadratic resulted in no roots;\n", num0); + fprintf(stderr,"this is very unlikely and probably indicates an error.\n"); + goto err; + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + BN_free(e); + return ret; + } + static void genprime_cb(int p, int n, void *arg) { char c='*'; diff --git a/crypto/conf/Makefile.ssl b/crypto/conf/Makefile.ssl index c57c4edb51..f1c02fd04b 100644 --- a/crypto/conf/Makefile.ssl +++ b/crypto/conf/Makefile.ssl @@ -89,14 +89,14 @@ conf_api.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h conf_api.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h conf_api.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h conf_api.o: conf_api.c -conf_def.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h -conf_def.o: ../../include/openssl/conf.h ../../include/openssl/conf_api.h -conf_def.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -conf_def.o: ../../include/openssl/err.h ../../include/openssl/lhash.h -conf_def.o: ../../include/openssl/opensslconf.h +conf_def.o: ../../e_os.h ../../include/openssl/bio.h +conf_def.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h +conf_def.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h +conf_def.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +conf_def.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h conf_def.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h conf_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -conf_def.o: conf_def.c conf_def.h +conf_def.o: ../cryptlib.h conf_def.c conf_def.h conf_err.o: ../../include/openssl/bio.h ../../include/openssl/conf.h conf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h conf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h @@ -112,14 +112,14 @@ conf_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h conf_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h conf_lib.o: conf_lib.c conf_mall.o: ../../e_os.h ../../include/openssl/aes.h -conf_mall.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -conf_mall.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -conf_mall.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -conf_mall.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -conf_mall.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -conf_mall.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -conf_mall.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -conf_mall.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +conf_mall.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +conf_mall.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +conf_mall.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +conf_mall.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +conf_mall.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +conf_mall.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +conf_mall.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +conf_mall.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h conf_mall.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h conf_mall.o: ../../include/openssl/err.h ../../include/openssl/evp.h conf_mall.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -137,14 +137,14 @@ conf_mall.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h conf_mall.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h conf_mall.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_mall.c conf_mod.o: ../../e_os.h ../../include/openssl/aes.h -conf_mod.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -conf_mod.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -conf_mod.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -conf_mod.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -conf_mod.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -conf_mod.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -conf_mod.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -conf_mod.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +conf_mod.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +conf_mod.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +conf_mod.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +conf_mod.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +conf_mod.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +conf_mod.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +conf_mod.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +conf_mod.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h conf_mod.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h conf_mod.o: ../../include/openssl/evp.h ../../include/openssl/idea.h conf_mod.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -161,14 +161,14 @@ conf_mod.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h conf_mod.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h conf_mod.o: ../cryptlib.h conf_mod.c conf_sap.o: ../../e_os.h ../../include/openssl/aes.h -conf_sap.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -conf_sap.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -conf_sap.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -conf_sap.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -conf_sap.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -conf_sap.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -conf_sap.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -conf_sap.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +conf_sap.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +conf_sap.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +conf_sap.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +conf_sap.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +conf_sap.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +conf_sap.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +conf_sap.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +conf_sap.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h conf_sap.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h conf_sap.o: ../../include/openssl/err.h ../../include/openssl/evp.h conf_sap.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index e1e6bf6ede..d718eed20a 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -67,6 +67,7 @@ #include "conf_def.h" #include <openssl/buffer.h> #include <openssl/err.h> +#include "cryptlib.h" static char *eat_ws(CONF *conf, char *p); static char *eat_alpha_numeric(CONF *conf, char *p); @@ -208,12 +209,12 @@ static int def_load(CONF *conf, const char *name, long *line) static int def_load_bio(CONF *conf, BIO *in, long *line) { #define BUFSIZE 512 - char btmp[16]; int bufnum=0,i,ii; BUF_MEM *buff=NULL; char *s,*p,*end; int again,n; long eline=0; + char btmp[DECIMAL_SIZE(eline)+1]; CONF_VALUE *v=NULL,*tv; CONF_VALUE *sv=NULL; char *section=NULL,*buf; diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index f92babc2e2..edcc08921c 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -230,7 +230,7 @@ static int module_run(const CONF *cnf, char *name, char *value, { if (!(flags & CONF_MFLAGS_SILENT)) { - char rcode[10]; + char rcode[DECIMAL_SIZE(ret)+1]; CONFerr(CONF_F_CONF_MODULES_LOAD, CONF_R_MODULE_INITIALIZATION_ERROR); sprintf(rcode, "%-8d", ret); ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 9a7ed2cf75..b72f7fb015 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -55,6 +55,11 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <stdio.h> #include <string.h> @@ -105,7 +110,8 @@ static const char* lock_names[CRYPTO_NUM_LOCKS] = "ui", "ecdsa", "ec", -#if CRYPTO_NUM_LOCKS != 33 + "ecdh", +#if CRYPTO_NUM_LOCKS != 34 # error "Inconsistency between crypto.h and cryptlib.c" #endif }; diff --git a/crypto/cryptlib.h b/crypto/cryptlib.h index a0489e57fc..88e4ae509f 100644 --- a/crypto/cryptlib.h +++ b/crypto/cryptlib.h @@ -89,6 +89,10 @@ extern "C" { #define X509_CERT_DIR_EVP "SSL_CERT_DIR" #define X509_CERT_FILE_EVP "SSL_CERT_FILE" +/* size of string represenations */ +#define DECIMAL_SIZE(type) ((sizeof(type)*8+2)/3+1) +#define HEX_SIZE(type) ((sizeof(type)*2) + #ifdef __cplusplus } #endif diff --git a/crypto/crypto-lib.com b/crypto/crypto-lib.com index 556495c96f..e57234eb5d 100644 --- a/crypto/crypto-lib.com +++ b/crypto/crypto-lib.com @@ -92,7 +92,7 @@ $! Define The Different Encryption Types. $! $ ENCRYPT_TYPES = "Basic,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,"+ - "DES,RC2,RC4,RC5,IDEA,BF,CAST,"+ - - "BN,EC,RSA,DSA,DH,DSO,ENGINE,AES,"+ - + "BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,AES,"+ - "BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,"+ - "EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ - "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5" @@ -221,21 +221,22 @@ $ IF F$TRNLNM("OPENSSL_NO_ASM").OR.ARCH.EQS."AXP" THEN LIB_BN_ASM = "bn_asm" $ LIB_BN = "bn_add,bn_div,bn_exp,bn_lib,bn_ctx,bn_mul,bn_mod,"+ - "bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ - "bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ - - "bn_recp,bn_mont,bn_mpi,bn_exp2" + "bn_recp,bn_mont,bn_mpi,bn_exp2,bn_gf2m" $ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_recp,ecp_nist,ec_cvt,ec_mult,"+ - - "ec_err" + "ec_err,ec_curve,ec_check,ec_print,ec_asn1,ec_key,"+ - + "ec2_smpl,ec2_smpt,ec2_mult" $ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ - "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ - "rsa_asn1" $ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,dsa_err,dsa_ossl" -$ LIB_ECDSA = "ecs_lib,ecs_gen,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,"+ - - "ecs_key,ecs_err" +$ LIB_ECDSA = "ecs_lib,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,ecs_err" $ LIB_DH = "dh_asn1,dh_gen,dh_key,dh_lib,dh_check,dh_err" +$ LIB_ECDH = "ech_lib,ech_ossl,ech_key,ech_err" $ LIB_DSO = "dso_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ - "dso_openssl,dso_win32,dso_vms" $ LIB_ENGINE = "eng_err,eng_lib,eng_list,eng_init,eng_ctrl,"+ - "eng_table,eng_pkey,eng_fat,eng_all,"+ - - "tb_rsa,tb_dsa,tb_dh,tb_rand,tb_cipher,tb_digest,"+ - + "tb_rsa,tb_dsa,tb_ecdsa,tb_dh,tb_rand,tb_cipher,tb_digest,tb_ecdh"+ - "eng_openssl,eng_dyn,eng_cnf,"+ - "hw_atalla,hw_cswift,hw_ncipher,hw_nuron,hw_ubsec,"+ - "hw_openbsd_dev_crypto,hw_aep,hw_sureware,hw_4758_cca" @@ -253,12 +254,12 @@ $ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd,"+ - "rand_vms" $ LIB_ERR = "err,err_all,err_prn" $ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err" -$ LIB_EVP = "encode,digest,evp_enc,evp_key,"+ - +$ LIB_EVP = "encode,digest,evp_enc,evp_key,evp_acnf,"+ - "e_des,e_bf,e_idea,e_des3,"+ - "e_rc4,e_aes,names,"+ - "e_xcbc_d,e_rc2,e_cast,e_rc5" $ LIB_EVP_2 = "m_null,m_md2,m_md4,m_md5,m_sha,m_sha1," + - - "m_dss,m_dss1,m_mdc2,m_ripemd,"+ - + "m_dss,m_dss1,m_mdc2,m_ripemd,m_ecdsa,"+ - "p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ - "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ - "c_all,c_allc,c_alld,evp_lib,bio_ok,"+- diff --git a/crypto/crypto.h b/crypto/crypto.h index 0991cf294c..e4d1526e0e 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -55,6 +55,11 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #ifndef HEADER_CRYPTO_H #define HEADER_CRYPTO_H @@ -128,7 +133,8 @@ extern "C" { #define CRYPTO_LOCK_UI 30 #define CRYPTO_LOCK_ECDSA 31 #define CRYPTO_LOCK_EC 32 -#define CRYPTO_NUM_LOCKS 33 +#define CRYPTO_LOCK_ECDH 33 +#define CRYPTO_NUM_LOCKS 34 #define CRYPTO_LOCK 1 #define CRYPTO_UNLOCK 2 @@ -236,6 +242,7 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS) #define CRYPTO_EX_INDEX_X509 10 #define CRYPTO_EX_INDEX_UI 11 #define CRYPTO_EX_INDEX_ECDSA 12 +#define CRYPTO_EX_INDEX_ECDH 13 /* Dynamically assigned indexes start from this value (don't use directly, use * via CRYPTO_ex_data_new_class). */ diff --git a/crypto/des/Makefile.ssl b/crypto/des/Makefile.ssl index 00e479dbd1..14baf7d0cc 100644 --- a/crypto/des/Makefile.ssl +++ b/crypto/des/Makefile.ssl @@ -207,7 +207,8 @@ ecb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h ecb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h ecb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h ecb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -ecb_enc.o: ../../include/openssl/ui_compat.h des_locl.h ecb_enc.c spr.h +ecb_enc.o: ../../include/openssl/ui_compat.h des_locl.h des_ver.h ecb_enc.c +ecb_enc.o: spr.h ede_cbcm_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h ede_cbcm_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h ede_cbcm_enc.o: ../../include/openssl/opensslconf.h diff --git a/crypto/des/des_ver.h b/crypto/des/des_ver.h index 0fa94d5368..379bbadda2 100644 --- a/crypto/des/des_ver.h +++ b/crypto/des/des_ver.h @@ -63,5 +63,9 @@ # define OPENSSL_EXTERN OPENSSL_EXPORT #endif -OPENSSL_EXTERN char *DES_version; /* SSLeay version string */ -OPENSSL_EXTERN char *libdes_version; /* old libdes version string */ +/* The following macros make sure the names are different from libdes names */ +#define DES_version OSSL_DES_version +#define libdes_version OSSL_libdes_version + +OPENSSL_EXTERN const char *OSSL_DES_version; /* SSLeay version string */ +OPENSSL_EXTERN const char *OSSL_libdes_version; /* old libdes version string */ diff --git a/crypto/des/ecb_enc.c b/crypto/des/ecb_enc.c index 4650f2fa0f..1b70f68806 100644 --- a/crypto/des/ecb_enc.c +++ b/crypto/des/ecb_enc.c @@ -57,6 +57,7 @@ */ #include "des_locl.h" +#include "des_ver.h" #include "spr.h" #include <openssl/opensslv.h> diff --git a/crypto/des/set_key.c b/crypto/des/set_key.c index 683916e71b..143008ed9c 100644 --- a/crypto/des/set_key.c +++ b/crypto/des/set_key.c @@ -342,7 +342,7 @@ void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule) register DES_LONG *k; register int i; -#if OPENBSD_DEV_CRYPTO +#ifdef OPENBSD_DEV_CRYPTO memcpy(schedule->key,key,sizeof schedule->key); schedule->session=NULL; #endif diff --git a/crypto/dh/Makefile.ssl b/crypto/dh/Makefile.ssl index c183bb48a2..c6e7ab63a8 100644 --- a/crypto/dh/Makefile.ssl +++ b/crypto/dh/Makefile.ssl @@ -112,29 +112,27 @@ dh_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h dh_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h dh_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h dh_gen.o: ../cryptlib.h dh_gen.c -dh_key.o: ../../e_os.h ../../include/openssl/asn1.h -dh_key.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +dh_key.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h dh_key.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h dh_key.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h dh_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -dh_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -dh_key.o: ../../include/openssl/engine.h ../../include/openssl/err.h -dh_key.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h -dh_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -dh_key.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h -dh_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -dh_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -dh_key.o: ../cryptlib.h dh_key.c -dh_lib.o: ../../e_os.h ../../include/openssl/asn1.h -dh_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +dh_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +dh_key.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h +dh_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dh_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dh_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +dh_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +dh_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dh_key.o: ../../include/openssl/ui.h ../cryptlib.h dh_key.c +dh_lib.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h dh_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h dh_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -dh_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h -dh_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h -dh_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -dh_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h -dh_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -dh_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -dh_lib.o: ../cryptlib.h dh_lib.c +dh_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +dh_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h +dh_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dh_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dh_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +dh_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +dh_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dh_lib.o: ../../include/openssl/ui.h ../cryptlib.h dh_lib.c diff --git a/crypto/dsa/Makefile.ssl b/crypto/dsa/Makefile.ssl index 52140ed15a..74fd754742 100644 --- a/crypto/dsa/Makefile.ssl +++ b/crypto/dsa/Makefile.ssl @@ -129,11 +129,11 @@ dsa_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h dsa_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h dsa_key.o: ../cryptlib.h dsa_key.c dsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h -dsa_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -dsa_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -dsa_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -dsa_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -dsa_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +dsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +dsa_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h dsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h dsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h dsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -142,11 +142,11 @@ dsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h dsa_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h dsa_lib.o: ../cryptlib.h dsa_lib.c dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h -dsa_ossl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -dsa_ossl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -dsa_ossl.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -dsa_ossl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -dsa_ossl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_ossl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +dsa_ossl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h dsa_ossl.o: ../../include/openssl/engine.h ../../include/openssl/err.h dsa_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h dsa_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -155,11 +155,11 @@ dsa_ossl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h dsa_ossl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h dsa_ossl.o: ../cryptlib.h dsa_ossl.c dsa_sign.o: ../../e_os.h ../../include/openssl/asn1.h -dsa_sign.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -dsa_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -dsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -dsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -dsa_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +dsa_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h dsa_sign.o: ../../include/openssl/engine.h ../../include/openssl/err.h dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -168,11 +168,11 @@ dsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h dsa_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h dsa_sign.o: ../cryptlib.h dsa_sign.c dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h -dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h -dsa_vrf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -dsa_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -dsa_vrf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -dsa_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +dsa_vrf.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h dsa_vrf.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h dsa_vrf.o: ../../include/openssl/err.h ../../include/openssl/lhash.h dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h diff --git a/crypto/ec/Makefile.ssl b/crypto/ec/Makefile.ssl index adf9426cf8..d183f679c4 100644 --- a/crypto/ec/Makefile.ssl +++ b/crypto/ec/Makefile.ssl @@ -23,11 +23,13 @@ TEST=ectest.c APPS= LIB=$(TOP)/libcrypto.a -LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_recp.c ecp_nist.c ec_cvt.c ec_mult.c \ - ec_err.c ec_curve.c ec_check.c ec_print.c ec_asn1.c +LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_recp.c ecp_nist.c ec_cvt.c ec_mult.c\ + ec_err.c ec_curve.c ec_check.c ec_print.c ec_asn1.c ec_key.c\ + ec2_smpl.c ec2_smpt.c ec2_mult.c -LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_recp.o ecp_nist.o ec_cvt.o ec_mult.o \ - ec_err.o ec_curve.o ec_check.o ec_print.o ec_asn1.o +LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_recp.o ecp_nist.o ec_cvt.o ec_mult.o\ + ec_err.o ec_curve.o ec_check.o ec_print.o ec_asn1.o ec_key.o\ + ec2_smpl.o ec2_mult.o SRC= $(LIBSRC) @@ -82,16 +84,32 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. -ec_asn1.o: ../../e_os.h ../../include/openssl/asn1.h -ec_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ec_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ec2_mult.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ec2_mult.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ec2_mult.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ec2_mult.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +ec2_mult.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h +ec2_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ec2_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ec2_mult.o: ../../include/openssl/symhacks.h ec2_mult.c ec_lcl.h +ec2_smpl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ec2_smpl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ec2_smpl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ec2_smpl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +ec2_smpl.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h +ec2_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ec2_smpl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ec2_smpl.o: ../../include/openssl/symhacks.h ec2_smpl.c ec2_smpt.c ec_lcl.h +ec2_smpt.o: ec2_smpt.c +ec_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +ec_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h ec_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h ec_asn1.o: ../../include/openssl/ec.h ../../include/openssl/err.h ec_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h ec_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h ec_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ec_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ec_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h ec_asn1.c ec_lcl.h +ec_asn1.o: ../../include/openssl/symhacks.h ec_asn1.c ec_lcl.h ec_check.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h ec_check.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h ec_check.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h @@ -124,6 +142,14 @@ ec_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h ec_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h ec_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h ec_err.o: ec_err.c +ec_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ec_key.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ec_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ec_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +ec_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h +ec_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ec_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ec_key.o: ../../include/openssl/symhacks.h ec_key.c ec_lcl.h ec_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h ec_lib.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h ec_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h diff --git a/crypto/ec/ec.h b/crypto/ec/ec.h index e17fc20dd4..17083f23a2 100644 --- a/crypto/ec/ec.h +++ b/crypto/ec/ec.h @@ -1,4 +1,7 @@ /* crypto/ec/ec.h */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,32 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #ifndef HEADER_EC_H #define HEADER_EC_H @@ -103,11 +132,16 @@ const EC_METHOD *EC_GFp_recp_method(void); /* TODO */ const EC_METHOD *EC_GFp_nist_method(void); /* TODO */ #endif +/* EC_METHOD for curves over GF(2^m). + */ +const EC_METHOD *EC_GF2m_simple_method(void); + EC_GROUP *EC_GROUP_new(const EC_METHOD *); void EC_GROUP_free(EC_GROUP *); void EC_GROUP_clear_free(EC_GROUP *); int EC_GROUP_copy(EC_GROUP *, const EC_GROUP *); +EC_GROUP *EC_GROUP_dup(const EC_GROUP *); const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *); int EC_METHOD_get_field_type(const EC_METHOD *); @@ -130,12 +164,12 @@ unsigned char *EC_GROUP_get0_seed(const EC_GROUP *); size_t EC_GROUP_get_seed_len(const EC_GROUP *); size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len); -/* We don't have types for field specifications and field elements in general. - * Otherwise we could declare - * int EC_GROUP_set_curve(EC_GROUP *, .....); - */ int EC_GROUP_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); int EC_GROUP_get_curve_GFp(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); +int EC_GROUP_set_curve_GF2m(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int EC_GROUP_get_curve_GF2m(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); + +int EC_GROUP_get_degree(const EC_GROUP *); /* EC_GROUP_check() returns 1 if 'group' defines a valid group, 0 otherwise */ int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx); @@ -143,9 +177,10 @@ int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx); * elliptic curve is not zero, 0 otherwise */ int EC_GROUP_check_discriminant(const EC_GROUP *, BN_CTX *); -/* EC_GROUP_new_GFp() calls EC_GROUP_new() and EC_GROUP_set_GFp() +/* EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() * after choosing an appropriate EC_METHOD */ EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); /* EC_GROUP_new_by_nid() and EC_GROUP_new_by_name() also set * generator and order */ @@ -181,15 +216,66 @@ EC_GROUP *EC_GROUP_new_by_name(int name); #define EC_GROUP_SECG_PRIME_384R1 NID_secp384r1 #define EC_GROUP_SECG_PRIME_521R1 NID_secp521r1 #define EC_GROUP_WTLS_6 NID_wap_wsg_idm_ecid_wtls6 -#define EC_GROUP_WTLS_7 NID_secp160r1 +#define EC_GROUP_WTLS_7 NID_wap_wsg_idm_ecid_wtls7 #define EC_GROUP_WTLS_8 NID_wap_wsg_idm_ecid_wtls8 #define EC_GROUP_WTLS_9 NID_wap_wsg_idm_ecid_wtls9 -#define EC_GROUP_WTLS_12 NID_secp224r1 +#define EC_GROUP_WTLS_12 NID_wap_wsg_idm_ecid_wtls12 +#define EC_GROUP_NIST_CHAR2_K163 NID_sect163k1 +#define EC_GROUP_NIST_CHAR2_B163 NID_sect163r2 +#define EC_GROUP_NIST_CHAR2_K233 NID_sect233k1 +#define EC_GROUP_NIST_CHAR2_B233 NID_sect233r1 +#define EC_GROUP_NIST_CHAR2_K283 NID_sect283k1 +#define EC_GROUP_NIST_CHAR2_B283 NID_sect283r1 +#define EC_GROUP_NIST_CHAR2_K409 NID_sect409k1 +#define EC_GROUP_NIST_CHAR2_B409 NID_sect409r1 +#define EC_GROUP_NIST_CHAR2_K571 NID_sect571k1 +#define EC_GROUP_NIST_CHAR2_B571 NID_sect571r1 +#define EC_GROUP_X9_62_CHAR2_163V1 NID_X9_62_c2pnb163v1 +#define EC_GROUP_X9_62_CHAR2_163V2 NID_X9_62_c2pnb163v2 +#define EC_GROUP_X9_62_CHAR2_163V3 NID_X9_62_c2pnb163v3 +#define EC_GROUP_X9_62_CHAR2_176V1 NID_X9_62_c2pnb176v1 +#define EC_GROUP_X9_62_CHAR2_191V1 NID_X9_62_c2tnb191v1 +#define EC_GROUP_X9_62_CHAR2_191V2 NID_X9_62_c2tnb191v2 +#define EC_GROUP_X9_62_CHAR2_191V3 NID_X9_62_c2tnb191v3 +#define EC_GROUP_X9_62_CHAR2_208W1 NID_X9_62_c2pnb208w1 +#define EC_GROUP_X9_62_CHAR2_239V1 NID_X9_62_c2tnb239v1 +#define EC_GROUP_X9_62_CHAR2_239V2 NID_X9_62_c2tnb239v2 +#define EC_GROUP_X9_62_CHAR2_239V3 NID_X9_62_c2tnb239v3 +#define EC_GROUP_X9_62_CHAR2_272W1 NID_X9_62_c2pnb272w1 +#define EC_GROUP_X9_62_CHAR2_304W1 NID_X9_62_c2pnb304w1 +#define EC_GROUP_X9_62_CHAR2_359V1 NID_X9_62_c2tnb359v1 +#define EC_GROUP_X9_62_CHAR2_368W1 NID_X9_62_c2pnb368w1 +#define EC_GROUP_X9_62_CHAR2_431R1 NID_X9_62_c2tnb431r1 +#define EC_GROUP_SECG_CHAR2_113R1 NID_sect113r1 +#define EC_GROUP_SECG_CHAR2_113R2 NID_sect113r2 +#define EC_GROUP_SECG_CHAR2_131R1 NID_sect131r1 +#define EC_GROUP_SECG_CHAR2_131R2 NID_sect131r2 +#define EC_GROUP_SECG_CHAR2_163K1 NID_sect163k1 +#define EC_GROUP_SECG_CHAR2_163R1 NID_sect163r1 +#define EC_GROUP_SECG_CHAR2_163R2 NID_sect163r2 +#define EC_GROUP_SECG_CHAR2_193R1 NID_sect193r1 +#define EC_GROUP_SECG_CHAR2_193R2 NID_sect193r2 +#define EC_GROUP_SECG_CHAR2_233K1 NID_sect233k1 +#define EC_GROUP_SECG_CHAR2_233R1 NID_sect233r1 +#define EC_GROUP_SECG_CHAR2_239K1 NID_sect239k1 +#define EC_GROUP_SECG_CHAR2_283K1 NID_sect283k1 +#define EC_GROUP_SECG_CHAR2_283R1 NID_sect283r1 +#define EC_GROUP_SECG_CHAR2_409K1 NID_sect409k1 +#define EC_GROUP_SECG_CHAR2_409R1 NID_sect409r1 +#define EC_GROUP_SECG_CHAR2_571K1 NID_sect571k1 +#define EC_GROUP_SECG_CHAR2_571R1 NID_sect571r1 +#define EC_GROUP_WTLS_1 NID_wap_wsg_idm_ecid_wtls1 +#define EC_GROUP_WTLS_3 NID_wap_wsg_idm_ecid_wtls3 +#define EC_GROUP_WTLS_4 NID_wap_wsg_idm_ecid_wtls4 +#define EC_GROUP_WTLS_5 NID_wap_wsg_idm_ecid_wtls5 +#define EC_GROUP_WTLS_10 NID_wap_wsg_idm_ecid_wtls10 +#define EC_GROUP_WTLS_11 NID_wap_wsg_idm_ecid_wtls11 EC_POINT *EC_POINT_new(const EC_GROUP *); void EC_POINT_free(EC_POINT *); void EC_POINT_clear_free(EC_POINT *); int EC_POINT_copy(EC_POINT *, const EC_POINT *); +EC_POINT *EC_POINT_dup(const EC_POINT *, const EC_GROUP *); const EC_METHOD *EC_POINT_method_of(const EC_POINT *); @@ -205,6 +291,13 @@ int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *, const EC_POINT *, int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *, EC_POINT *, const BIGNUM *x, int y_bit, BN_CTX *); +int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *, EC_POINT *, + const BIGNUM *x, const BIGNUM *y, BN_CTX *); +int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *, const EC_POINT *, + BIGNUM *x, BIGNUM *y, BN_CTX *); +int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *, EC_POINT *, + const BIGNUM *x, int y_bit, BN_CTX *); + size_t EC_POINT_point2oct(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *); int EC_POINT_oct2point(const EC_GROUP *, EC_POINT *, @@ -241,21 +334,8 @@ int EC_GROUP_precompute_mult(EC_GROUP *, BN_CTX *); /* ASN1 stuff */ #define OPENSSL_EC_NAMED_CURVE 0x001 -typedef struct ec_parameters_st ECPARAMETERS; typedef struct ecpk_parameters_st ECPKPARAMETERS; -DECLARE_ASN1_ITEM(ECPARAMETERS) -DECLARE_ASN1_ITEM(ECPKPARAMETERS) -DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPARAMETERS, ECPARAMETERS) -DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPKPARAMETERS, ECPKPARAMETERS) - -EC_GROUP *EC_ASN1_pkparameters2group(const ECPKPARAMETERS *); -ECPKPARAMETERS *EC_ASN1_group2pkparameters(const EC_GROUP *, ECPKPARAMETERS *); - - -EC_GROUP *d2i_ECParameters(EC_GROUP **, const unsigned char **in, long len); -int i2d_ECParameters(const EC_GROUP *, unsigned char **out); - EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len); int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out); @@ -275,6 +355,66 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off); int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off); #endif +/* the EC_KEY stuff */ +typedef struct ec_key_st EC_KEY; + +typedef struct ec_key_meth_data_st { + int (*init)(EC_KEY *); + void (*finish)(EC_KEY *); + } EC_KEY_METH_DATA; + +struct ec_key_st { + int version; + + EC_GROUP *group; + + EC_POINT *pub_key; + BIGNUM *priv_key; + + unsigned int enc_flag; + point_conversion_form_t conv_form; + + int references; + + EC_KEY_METH_DATA *meth_data; + }/* EC_KEY */; +/* some values for the encoding_flag */ +#define EC_PKEY_NO_PARAMETERS 0x001 +#define EC_PKEY_NO_PUBKEY 0x002 + +EC_KEY *EC_KEY_new(void); +void EC_KEY_free(EC_KEY *); +EC_KEY *EC_KEY_copy(EC_KEY *, const EC_KEY *); +EC_KEY *EC_KEY_dup(const EC_KEY *); +int EC_KEY_up_ref(EC_KEY *); + +/* EC_KEY_generate_key() creates a ec private (public) key */ +int EC_KEY_generate_key(EC_KEY *); +/* EC_KEY_check_key() */ +int EC_KEY_check_key(const EC_KEY *); + +/* de- and encode functions for the SEC1 ECPrivateKey */ +EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len); +int i2d_ECPrivateKey(EC_KEY *a, unsigned char **out); +/* de- and encode functions for the elliptic curve parameters */ +EC_KEY *d2i_ECParameters(EC_KEY **a, const unsigned char **in, long len); +int i2d_ECParameters(EC_KEY *a, unsigned char **out); + +EC_KEY *ECPublicKey_set_octet_string(EC_KEY **a, const unsigned char **in, + long len); +int ECPublicKey_get_octet_string(EC_KEY *a, unsigned char **out); + +#ifndef OPENSSL_NO_BIO +int ECParameters_print(BIO *bp, const EC_KEY *x); +int EC_KEY_print(BIO *bp, const EC_KEY *x, int off); +#endif +#ifndef OPENSSL_NO_FP_API +int ECParameters_print_fp(FILE *fp, const EC_KEY *x); +int EC_KEY_print_fp(FILE *fp, const EC_KEY *x, int off); +#endif + +#define ECParameters_dup(x) (EC_KEY *)ASN1_dup((int (*)())i2d_ECParameters,\ + (char *(*)())d2i_ECParameters,(char *)(x)) /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes @@ -286,70 +426,97 @@ void ERR_load_EC_strings(void); /* Function codes. */ #define EC_F_COMPUTE_WNAF 143 -#define EC_F_D2I_ECDSAPARAMETERS 154 #define EC_F_D2I_ECPARAMETERS 155 #define EC_F_D2I_ECPKPARAMETERS 161 +#define EC_F_D2I_ECPRIVATEKEY 168 +#define EC_F_ECPARAMETERS_PRINT 173 +#define EC_F_ECPARAMETERS_PRINT_FP 174 #define EC_F_ECPKPARAMETERS_PRINT 166 #define EC_F_ECPKPARAMETERS_PRINT_FP 167 +#define EC_F_ECPUBLICKEY_GET_OCTET 170 +#define EC_F_ECPUBLICKEY_SET_OCTET 171 #define EC_F_EC_ASN1_GROUP2CURVE 159 #define EC_F_EC_ASN1_GROUP2FIELDID 156 #define EC_F_EC_ASN1_GROUP2PARAMETERS 160 #define EC_F_EC_ASN1_GROUP2PKPARAMETERS 162 #define EC_F_EC_ASN1_PARAMETERS2GROUP 157 #define EC_F_EC_ASN1_PKPARAMETERS2GROUP 163 +#define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT 168 +#define EC_F_EC_GF2M_SIMPLE_OCT2POINT 169 +#define EC_F_EC_GF2M_SIMPLE_POINT2OCT 170 +#define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 171 +#define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 172 +#define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES 182 #define EC_F_EC_GFP_MONT_FIELD_DECODE 133 #define EC_F_EC_GFP_MONT_FIELD_ENCODE 134 #define EC_F_EC_GFP_MONT_FIELD_MUL 131 #define EC_F_EC_GFP_MONT_FIELD_SQR 132 #define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT 152 -#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP 100 +#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE 100 #define EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR 101 #define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE 102 #define EC_F_EC_GFP_SIMPLE_OCT2POINT 103 #define EC_F_EC_GFP_SIMPLE_POINT2OCT 104 #define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE 137 -#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP 105 -#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP 128 -#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP 129 +#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES 105 +#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES 128 +#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES 129 #define EC_F_EC_GROUP_CHECK 150 #define EC_F_EC_GROUP_CHECK_DISCRIMINANT 153 #define EC_F_EC_GROUP_COPY 106 #define EC_F_EC_GROUP_GET0_GENERATOR 139 #define EC_F_EC_GROUP_GET_COFACTOR 140 +#define EC_F_EC_GROUP_GET_CURVE_GF2M 173 #define EC_F_EC_GROUP_GET_CURVE_GFP 130 +#define EC_F_EC_GROUP_GET_DEGREE 174 #define EC_F_EC_GROUP_GET_EXTRA_DATA 107 #define EC_F_EC_GROUP_GET_ORDER 141 #define EC_F_EC_GROUP_GROUP2NID 147 #define EC_F_EC_GROUP_NEW 108 #define EC_F_EC_GROUP_NEW_BY_NAME 144 #define EC_F_EC_GROUP_NEW_BY_NID 146 +#define EC_F_EC_GROUP_NEW_GF2M_FROM_HEX 175 #define EC_F_EC_GROUP_NEW_GFP_FROM_HEX 148 #define EC_F_EC_GROUP_PRECOMPUTE_MULT 142 +#define EC_F_EC_GROUP_SET_CURVE_GF2M 176 #define EC_F_EC_GROUP_SET_CURVE_GFP 109 #define EC_F_EC_GROUP_SET_EXTRA_DATA 110 #define EC_F_EC_GROUP_SET_GENERATOR 111 +#define EC_F_EC_KEY_CHECK_KEY 184 +#define EC_F_EC_KEY_COPY 186 +#define EC_F_EC_KEY_GENERATE_KEY 185 +#define EC_F_EC_KEY_PRINT 175 +#define EC_F_EC_KEY_PRINT_FP 176 +#define EC_F_EC_NEW 172 #define EC_F_EC_POINTS_MAKE_AFFINE 136 #define EC_F_EC_POINTS_MUL 138 #define EC_F_EC_POINT_ADD 112 #define EC_F_EC_POINT_CMP 113 #define EC_F_EC_POINT_COPY 114 #define EC_F_EC_POINT_DBL 115 +#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M 177 #define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP 116 #define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP 117 #define EC_F_EC_POINT_IS_AT_INFINITY 118 #define EC_F_EC_POINT_IS_ON_CURVE 119 #define EC_F_EC_POINT_MAKE_AFFINE 120 +#define EC_F_EC_POINT_MUL 179 #define EC_F_EC_POINT_NEW 121 #define EC_F_EC_POINT_OCT2POINT 122 #define EC_F_EC_POINT_POINT2OCT 123 +#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M 180 #define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124 +#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M 181 #define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP 125 #define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP 126 #define EC_F_EC_POINT_SET_TO_INFINITY 127 -#define EC_F_GFP_MONT_GROUP_SET_CURVE_GFP 135 +#define EC_F_EC_WNAF_MUL 183 +#define EC_F_EC_WNAF_PRECOMPUTE_MULT 178 +#define EC_F_GFP_MONT_GROUP_SET_CURVE 135 #define EC_F_I2D_ECDSAPARAMETERS 158 #define EC_F_I2D_ECPARAMETERS 164 #define EC_F_I2D_ECPKPARAMETERS 165 +#define EC_F_I2D_ECPRIVATEKEY 169 /* Reason codes. */ #define EC_R_ASN1_ERROR 130 @@ -372,7 +539,9 @@ void ERR_load_EC_strings(void); #define EC_R_INVALID_FIELD 103 #define EC_R_INVALID_FORM 104 #define EC_R_INVALID_GROUP_ORDER 119 +#define EC_R_INVALID_PRIVATE_KEY 139 #define EC_R_MISSING_PARAMETERS 127 +#define EC_R_MISSING_PRIVATE_KEY 138 #define EC_R_NOT_IMPLEMENTED 136 #define EC_R_NOT_INITIALIZED 111 #define EC_R_NO_SUCH_EXTRA_DATA 105 @@ -387,6 +556,7 @@ void ERR_load_EC_strings(void); #define EC_R_UNKNOWN_NID 117 #define EC_R_UNKNOWN_ORDER 114 #define EC_R_UNKNOWN_PARAMETERS_TYPE 129 +#define EC_R_WRONG_ORDER 140 #ifdef __cplusplus } diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c index 009896b558..c1879dc510 100644 --- a/crypto/ec/ec_asn1.c +++ b/crypto/ec/ec_asn1.c @@ -53,11 +53,12 @@ * */ -#include "cryptlib.h" +#include <string.h> #include "ec_lcl.h" -#include <openssl/asn1.h> +#include <openssl/err.h> #include <openssl/asn1t.h> #include <openssl/objects.h> +#include <string.h> /* some structures needed for the asn1 encoding */ typedef struct x9_62_fieldid_st { @@ -83,14 +84,14 @@ typedef struct x9_62_curve_st { ASN1_BIT_STRING *seed; } X9_62_CURVE; -struct ec_parameters_st { +typedef struct ec_parameters_st { ASN1_INTEGER *version; X9_62_FIELDID *fieldID; X9_62_CURVE *curve; ASN1_OCTET_STRING *base; ASN1_INTEGER *order; ASN1_INTEGER *cofactor; - }/* ECPARAMETERS */; + } ECPARAMETERS; struct ecpk_parameters_st { int type; @@ -101,6 +102,14 @@ struct ecpk_parameters_st { } value; }/* ECPKPARAMETERS */; +/* SEC1 ECPrivateKey */ +typedef struct ec_privatekey_st { + int version; + ASN1_OCTET_STRING *privateKey; + ECPKPARAMETERS *parameters; + ASN1_BIT_STRING *publicKey; + } EC_PRIVATEKEY; + /* the OpenSSL asn1 definitions */ ASN1_SEQUENCE(X9_62_FIELDID) = { @@ -152,6 +161,7 @@ ASN1_SEQUENCE(ECPARAMETERS) = { } ASN1_SEQUENCE_END(ECPARAMETERS) DECLARE_ASN1_FUNCTIONS_const(ECPARAMETERS) +DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPARAMETERS, ECPARAMETERS) IMPLEMENT_ASN1_FUNCTIONS_const(ECPARAMETERS) ASN1_CHOICE(ECPKPARAMETERS) = { @@ -161,8 +171,20 @@ ASN1_CHOICE(ECPKPARAMETERS) = { } ASN1_CHOICE_END(ECPKPARAMETERS) DECLARE_ASN1_FUNCTIONS_const(ECPKPARAMETERS) +DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPKPARAMETERS, ECPKPARAMETERS) IMPLEMENT_ASN1_FUNCTIONS_const(ECPKPARAMETERS) +ASN1_SEQUENCE(EC_PRIVATEKEY) = { + ASN1_SIMPLE(EC_PRIVATEKEY, version, LONG), + ASN1_SIMPLE(EC_PRIVATEKEY, privateKey, ASN1_OCTET_STRING), + ASN1_EXP_OPT(EC_PRIVATEKEY, parameters, ECPKPARAMETERS, 0), + ASN1_EXP_OPT(EC_PRIVATEKEY, publicKey, ASN1_BIT_STRING, 1) +} ASN1_SEQUENCE_END(EC_PRIVATEKEY) + +DECLARE_ASN1_FUNCTIONS_const(EC_PRIVATEKEY) +DECLARE_ASN1_ENCODE_FUNCTIONS_const(EC_PRIVATEKEY, EC_PRIVATEKEY) +IMPLEMENT_ASN1_FUNCTIONS_const(EC_PRIVATEKEY) + /* some internal functions */ static X9_62_FIELDID *ec_asn1_group2field(const EC_GROUP *, X9_62_FIELDID *); @@ -170,6 +192,8 @@ static X9_62_CURVE *ec_asn1_group2curve(const EC_GROUP *, X9_62_CURVE *); static EC_GROUP *ec_asn1_parameters2group(const ECPARAMETERS *); static ECPARAMETERS *ec_asn1_group2parameters(const EC_GROUP *, ECPARAMETERS *); +EC_GROUP *EC_ASN1_pkparameters2group(const ECPKPARAMETERS *); +ECPKPARAMETERS *EC_ASN1_group2pkparameters(const EC_GROUP *, ECPKPARAMETERS *); static X9_62_FIELDID *ec_asn1_group2field(const EC_GROUP *group, X9_62_FIELDID *field) @@ -778,34 +802,7 @@ EC_GROUP *EC_ASN1_pkparameters2group(const ECPKPARAMETERS *params) return ret; } -/* EC_GROUP <-> DER encoding of EC[PK]PARAMETERS */ - -EC_GROUP *d2i_ECParameters(EC_GROUP **a, const unsigned char **in, long len) - { - EC_GROUP *group = NULL; - ECPARAMETERS *params = NULL; - - if ((params = d2i_ECPARAMETERS(NULL, in, len)) == NULL) - { - ECerr(EC_F_D2I_ECPARAMETERS, EC_R_D2I_ECPARAMETERS_FAILURE); - ECPARAMETERS_free(params); - return NULL; - } - - if ((group = ec_asn1_parameters2group(params)) == NULL) - { - ECerr(EC_F_D2I_ECPARAMETERS, EC_R_PARAMETERS2GROUP_FAILURE); - return NULL; - } - - if (a && *a) - EC_GROUP_clear_free(*a); - if (a) - *a = group; - - ECPARAMETERS_free(params); - return(group); - } +/* EC_GROUP <-> DER encoding of ECPKPARAMETERS */ EC_GROUP *d2i_ECPKParameters(EC_GROUP **a, const unsigned char **in, long len) { @@ -835,40 +832,346 @@ EC_GROUP *d2i_ECPKParameters(EC_GROUP **a, const unsigned char **in, long len) return(group); } -int i2d_ECParameters(const EC_GROUP *a, unsigned char **out) +int i2d_ECPKParameters(const EC_GROUP *a, unsigned char **out) { int ret=0; - ECPARAMETERS *tmp = ec_asn1_group2parameters(a, NULL); + ECPKPARAMETERS *tmp = EC_ASN1_group2pkparameters(a, NULL); if (tmp == NULL) { - ECerr(EC_F_I2D_ECPARAMETERS, EC_R_GROUP2PARAMETERS_FAILURE); + ECerr(EC_F_I2D_ECPKPARAMETERS, EC_R_GROUP2PKPARAMETERS_FAILURE); return 0; } - if ((ret = i2d_ECPARAMETERS(tmp, out)) == 0) + if ((ret = i2d_ECPKPARAMETERS(tmp, out)) == 0) { - ECerr(EC_F_I2D_ECPARAMETERS, EC_R_I2D_EC_PARAMETERS_FAILURE); - ECPARAMETERS_free(tmp); + ECerr(EC_F_I2D_ECPKPARAMETERS, EC_R_I2D_ECPKPARAMETERS_FAILURE); + ECPKPARAMETERS_free(tmp); return 0; } - ECPARAMETERS_free(tmp); + ECPKPARAMETERS_free(tmp); return(ret); } -int i2d_ECPKParameters(const EC_GROUP *a, unsigned char **out) +/* some EC_KEY functions */ + +EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len) { - int ret=0; - ECPKPARAMETERS *tmp = EC_ASN1_group2pkparameters(a, NULL); - if (tmp == NULL) + int ok=0; + EC_KEY *ret=NULL; + EC_PRIVATEKEY *priv_key=NULL; + + if ((priv_key = EC_PRIVATEKEY_new()) == NULL) { - ECerr(EC_F_I2D_ECPKPARAMETERS, EC_R_GROUP2PKPARAMETERS_FAILURE); + ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_MALLOC_FAILURE); + return NULL; + } + + if ((priv_key = d2i_EC_PRIVATEKEY(&priv_key, in, len)) == NULL) + { + ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_EC_LIB); + EC_PRIVATEKEY_free(priv_key); + return NULL; + } + + if (a == NULL || *a == NULL) + { + if ((ret = EC_KEY_new()) == NULL) + { + ECerr(EC_F_D2I_ECPRIVATEKEY, + ERR_R_MALLOC_FAILURE); + goto err; + } + if (a) + *a = ret; + } + else + ret = *a; + + if (priv_key->parameters) + { + if (ret->group) + EC_GROUP_clear_free(ret->group); + ret->group = EC_ASN1_pkparameters2group(priv_key->parameters); + } + + if (ret->group == NULL) + { + ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_EC_LIB); + goto err; + } + + ret->version = priv_key->version; + + if (priv_key->privateKey) + { + ret->priv_key = BN_bin2bn( + M_ASN1_STRING_data(priv_key->privateKey), + M_ASN1_STRING_length(priv_key->privateKey), + ret->priv_key); + if (ret->priv_key == NULL) + { + ECerr(EC_F_D2I_ECPRIVATEKEY, + ERR_R_BN_LIB); + goto err; + } + } + else + { + ECerr(EC_F_D2I_ECPRIVATEKEY, + EC_R_MISSING_PRIVATE_KEY); + goto err; + } + + if (priv_key->publicKey) + { + if (ret->pub_key) + EC_POINT_clear_free(ret->pub_key); + ret->pub_key = EC_POINT_new(ret->group); + if (ret->pub_key == NULL) + { + ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_EC_LIB); + goto err; + } + if (!EC_POINT_oct2point(ret->group, ret->pub_key, + M_ASN1_STRING_data(priv_key->publicKey), + M_ASN1_STRING_length(priv_key->publicKey), NULL)) + { + ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_EC_LIB); + goto err; + } + } + + ok = 1; +err: + if (!ok) + { + if (ret) + EC_KEY_free(ret); + ret = NULL; + } + + if (priv_key) + EC_PRIVATEKEY_free(priv_key); + + return(ret); + } + +int i2d_ECPrivateKey(EC_KEY *a, unsigned char **out) + { + int ret=0, ok=0; + unsigned char *buffer=NULL; + size_t buf_len=0, tmp_len; + EC_PRIVATEKEY *priv_key=NULL; + + if (a == NULL || a->group == NULL || a->priv_key == NULL) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, + ERR_R_PASSED_NULL_PARAMETER); + goto err; + } + + if ((priv_key = EC_PRIVATEKEY_new()) == NULL) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, + ERR_R_MALLOC_FAILURE); + goto err; + } + + priv_key->version = a->version; + + buf_len = (size_t)BN_num_bytes(a->priv_key); + buffer = OPENSSL_malloc(buf_len); + if (buffer == NULL) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, + ERR_R_MALLOC_FAILURE); + goto err; + } + + if (!BN_bn2bin(a->priv_key, buffer)) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, ERR_R_BN_LIB); + goto err; + } + + if (!M_ASN1_OCTET_STRING_set(priv_key->privateKey, buffer, buf_len)) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, ERR_R_ASN1_LIB); + goto err; + } + + if (!(a->enc_flag & EC_PKEY_NO_PARAMETERS)) + { + if ((priv_key->parameters = EC_ASN1_group2pkparameters( + a->group, priv_key->parameters)) == NULL) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, ERR_R_EC_LIB); + goto err; + } + } + + if (!(a->enc_flag & EC_PKEY_NO_PUBKEY)) + { + priv_key->publicKey = M_ASN1_BIT_STRING_new(); + if (priv_key->publicKey == NULL) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, + ERR_R_MALLOC_FAILURE); + goto err; + } + + tmp_len = EC_POINT_point2oct(a->group, a->pub_key, + a->conv_form, NULL, 0, NULL); + + if (tmp_len > buf_len) + buffer = OPENSSL_realloc(buffer, tmp_len); + if (buffer == NULL) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, + ERR_R_MALLOC_FAILURE); + goto err; + } + + buf_len = tmp_len; + + if (!EC_POINT_point2oct(a->group, a->pub_key, + a->conv_form, buffer, buf_len, NULL)) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, ERR_R_EC_LIB); + goto err; + } + + if (!M_ASN1_BIT_STRING_set(priv_key->publicKey, buffer, + buf_len)) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, ERR_R_ASN1_LIB); + goto err; + } + } + + if ((ret = i2d_EC_PRIVATEKEY(priv_key, out)) == 0) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, ERR_R_EC_LIB); + goto err; + } + ok=1; +err: + if (buffer) + OPENSSL_free(buffer); + if (priv_key) + EC_PRIVATEKEY_free(priv_key); + return(ok?ret:0); + } + +int i2d_ECParameters(EC_KEY *a, unsigned char **out) + { + if (a == NULL) + { + ECerr(EC_F_I2D_ECPARAMETERS, ERR_R_PASSED_NULL_PARAMETER); return 0; } - if ((ret = i2d_ECPKPARAMETERS(tmp, out)) == 0) + return i2d_ECPKParameters(a->group, out); + } + +EC_KEY *d2i_ECParameters(EC_KEY **a, const unsigned char **in, long len) + { + EC_GROUP *group; + EC_KEY *ret; + + if (in == NULL || *in == NULL) { - ECerr(EC_F_I2D_ECPKPARAMETERS, EC_R_I2D_ECPKPARAMETERS_FAILURE); - ECPKPARAMETERS_free(tmp); + ECerr(EC_F_D2I_ECPARAMETERS, ERR_R_PASSED_NULL_PARAMETER); + return NULL; + } + + group = d2i_ECPKParameters(NULL, in, len); + + if (group == NULL) + { + ECerr(EC_F_D2I_ECPARAMETERS, ERR_R_EC_LIB); + return NULL; + } + + if (a == NULL || *a == NULL) + { + if ((ret = EC_KEY_new()) == NULL) + { + ECerr(EC_F_D2I_ECPARAMETERS, ERR_R_MALLOC_FAILURE); + return NULL; + } + if (a) + *a = ret; + } + else + ret = *a; + + if (ret->group) + EC_GROUP_clear_free(ret->group); + + ret->group = group; + + return ret; + } + +EC_KEY *ECPublicKey_set_octet_string(EC_KEY **a, const unsigned char **in, + long len) + { + EC_KEY *ret=NULL; + + if (a == NULL || (*a) == NULL || (*a)->group == NULL) + { + /* sorry, but a EC_GROUP-structur is necessary + * to set the public key */ + ECerr(EC_F_ECPUBLICKEY_SET_OCTET, ERR_R_PASSED_NULL_PARAMETER); return 0; - } - ECPKPARAMETERS_free(tmp); - return(ret); + } + ret = *a; + if (ret->pub_key == NULL && + (ret->pub_key = EC_POINT_new(ret->group)) == NULL) + { + ECerr(EC_F_ECPUBLICKEY_SET_OCTET, ERR_R_MALLOC_FAILURE); + return 0; + } + if (!EC_POINT_oct2point(ret->group, ret->pub_key, *in, len, NULL)) + { + ECerr(EC_F_ECPUBLICKEY_SET_OCTET, ERR_R_EC_LIB); + return 0; + } + /* save the point conversion form */ + ret->conv_form = (point_conversion_form_t)(*in[0] & ~0x01); + return ret; + } + +int ECPublicKey_get_octet_string(EC_KEY *a, unsigned char **out) + { + size_t buf_len=0; + + if (a == NULL) + { + ECerr(EC_F_ECPUBLICKEY_GET_OCTET, ERR_R_PASSED_NULL_PARAMETER); + return 0; + } + + buf_len = EC_POINT_point2oct(a->group, a->pub_key, + a->conv_form, NULL, 0, NULL); + + if (out == NULL || buf_len == 0) + /* out == NULL => just return the length of the octet string */ + return buf_len; + + if (*out == NULL) + if ((*out = OPENSSL_malloc(buf_len)) == NULL) + { + ECerr(EC_F_ECPUBLICKEY_GET_OCTET, + ERR_R_MALLOC_FAILURE); + return 0; + } + if (!EC_POINT_point2oct(a->group, a->pub_key, a->conv_form, + *out, buf_len, NULL)) + { + ECerr(EC_F_ECPUBLICKEY_GET_OCTET, ERR_R_EC_LIB); + OPENSSL_free(*out); + *out = NULL; + return 0; + } + return buf_len; } diff --git a/crypto/ec/ec_curve.c b/crypto/ec/ec_curve.c index a2fed3d603..55ce45d8cf 100644 --- a/crypto/ec/ec_curve.c +++ b/crypto/ec/ec_curve.c @@ -52,6 +52,32 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #include "ec_lcl.h" #include <openssl/err.h> @@ -191,12 +217,6 @@ "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798",0,\ "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",1 /* some wap/wtls curves */ -#define _EC_GROUP_WTLS_6 \ - "DB7C2ABF62E35E668076BEAD208B",\ - "DB7C2ABF62E35E668076BEAD2088",\ - "659EF8BA043916EEDE8911702B22",\ - "09487239995A5EE76B55F9C2F098",0,\ - "DB7C2ABF62E35E7628DFAC6561C5",1 #define _EC_GROUP_WTLS_8 \ "FFFFFFFFFFFFFFFFFFFFFFFFFDE7",\ "0",\ @@ -209,6 +229,264 @@ "3",\ "1",0,\ "0100000000000000000001CDC98AE0E2DE574ABF33",1 +#define _EC_GROUP_WTLS_12 \ + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001", \ + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE", \ + "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4", \ + "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21", 0, \ + "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", 1 + +/* #define _EC_GROUP_EXAMPLE_CHAR2_CURVE \ + * "prime polynomial", "a", "b", "base point x-coord", "base point y-coord", "order", "cofactor" + */ +#define _EC_GROUP_SECG_CHAR2_113R1 \ + "020000000000000000000000000201", \ + "003088250CA6E7C7FE649CE85820F7", \ + "00E8BEE4D3E2260744188BE0E9C723", \ + "009D73616F35F4AB1407D73562C10F", \ + "00A52830277958EE84D1315ED31886", \ + "0100000000000000D9CCEC8A39E56F", 2 +#define _EC_GROUP_SECG_CHAR2_113R2 \ + "020000000000000000000000000201", \ + "00689918DBEC7E5A0DD6DFC0AA55C7", \ + "0095E9A9EC9B297BD4BF36E059184F", \ + "01A57A6A7B26CA5EF52FCDB8164797", \ + "00B3ADC94ED1FE674C06E695BABA1D", \ + "010000000000000108789B2496AF93", 2 +#define _EC_GROUP_SECG_CHAR2_131R1 \ + "080000000000000000000000000000010D", \ + "07A11B09A76B562144418FF3FF8C2570B8", \ + "0217C05610884B63B9C6C7291678F9D341", \ + "0081BAF91FDF9833C40F9C181343638399", \ + "078C6E7EA38C001F73C8134B1B4EF9E150", \ + "0400000000000000023123953A9464B54D", 2 +#define _EC_GROUP_SECG_CHAR2_131R2 \ + "080000000000000000000000000000010D", \ + "03E5A88919D7CAFCBF415F07C2176573B2", \ + "04B8266A46C55657AC734CE38F018F2192", \ + "0356DCD8F2F95031AD652D23951BB366A8", \ + "0648F06D867940A5366D9E265DE9EB240F", \ + "0400000000000000016954A233049BA98F", 2 +#define _EC_GROUP_SECG_CHAR2_163K1 \ + "0800000000000000000000000000000000000000C9", \ + "1", \ + "1", \ + "02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8", \ + "0289070FB05D38FF58321F2E800536D538CCDAA3D9", \ + "04000000000000000000020108A2E0CC0D99F8A5EF", 2 +#define _EC_GROUP_SECG_CHAR2_163R1 \ + "0800000000000000000000000000000000000000C9", \ + "07B6882CAAEFA84F9554FF8428BD88E246D2782AE2", \ + "0713612DCDDCB40AAB946BDA29CA91F73AF958AFD9", \ + "0369979697AB43897789566789567F787A7876A654", \ + "00435EDB42EFAFB2989D51FEFCE3C80988F41FF883", \ + "03FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B", 2 +#define _EC_GROUP_SECG_CHAR2_163R2 \ + "0800000000000000000000000000000000000000C9", \ + "1", \ + "020A601907B8C953CA1481EB10512F78744A3205FD", \ + "03F0EBA16286A2D57EA0991168D4994637E8343E36", \ + "00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1", \ + "040000000000000000000292FE77E70C12A4234C33", 2 +#define _EC_GROUP_SECG_CHAR2_193R1 \ + "02000000000000000000000000000000000000000000008001", \ + "0017858FEB7A98975169E171F77B4087DE098AC8A911DF7B01", \ + "00FDFB49BFE6C3A89FACADAA7A1E5BBC7CC1C2E5D831478814", \ + "01F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E1", \ + "0025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05", \ + "01000000000000000000000000C7F34A778F443ACC920EBA49", 2 +#define _EC_GROUP_SECG_CHAR2_193R2 \ + "02000000000000000000000000000000000000000000008001", \ + "0163F35A5137C2CE3EA6ED8667190B0BC43ECD69977702709B", \ + "00C9BB9E8927D4D64C377E2AB2856A5B16E3EFB7F61D4316AE", \ + "00D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F", \ + "01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C", \ + "010000000000000000000000015AAB561B005413CCD4EE99D5", 2 +#define _EC_GROUP_SECG_CHAR2_233K1 \ + "020000000000000000000000000000000000000004000000000000000001", \ + "0", \ + "1", \ + "017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126", \ + "01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3", \ + "008000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF", 4 +#define _EC_GROUP_SECG_CHAR2_233R1 \ + "020000000000000000000000000000000000000004000000000000000001", \ + "000000000000000000000000000000000000000000000000000000000001", \ + "0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD", \ + "00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B", \ + "01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052", \ + "01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7", 2 +#define _EC_GROUP_SECG_CHAR2_239K1 \ + "800000000000000000004000000000000000000000000000000000000001", \ + "0", \ + "1", \ + "29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC", \ + "76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA", \ + "2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5", 4 +#define _EC_GROUP_SECG_CHAR2_283K1 \ + "0800000000000000000000000000000000000000000000000000000000000000000010A1", \ + "0", \ + "1", \ + "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836", \ + "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259", \ + "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61", 4 +#define _EC_GROUP_SECG_CHAR2_283R1 \ + "0800000000000000000000000000000000000000000000000000000000000000000010A1", \ + "000000000000000000000000000000000000000000000000000000000000000000000001", \ + "027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E313B79A2F5", \ + "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053", \ + "03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4", \ + "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7CEFADB307", 2 +#define _EC_GROUP_SECG_CHAR2_409K1 \ + "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001", \ + "0", \ + "1", \ + "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746", \ + "01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B", \ + "007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF", 4 + +#define _EC_GROUP_SECG_CHAR2_409R1 \ + "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001", \ + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", \ + "0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F", \ + "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7", \ + "0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706", \ + "010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173", 2 +#define _EC_GROUP_SECG_CHAR2_571K1 \ + "80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425", \ + "0", \ + "1", \ + "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972", \ + "0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3", \ + "020000000000000000000000000000000000000000000000000000000000000000000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB45CFE778F637C1001", 4 +#define _EC_GROUP_SECG_CHAR2_571R1 \ + "80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425", \ + "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", \ + "02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A", \ + "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19", \ + "037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B", \ + "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47", 2 + +#define _EC_GROUP_X9_62_CHAR2_163V1 \ + "0800000000000000000000000000000000000000C9", \ + "072546B5435234A422E0789675F432C89435DE5242", \ + "00C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9", \ + "07AF69989546103D79329FCC3D74880F33BBE803CB", \ + "0190C402D65BCC2B845337BC52352774E879B94B0D", \ + "0400000000000000000001E60FC8821CC74DAEAFC1", 2 +#define _EC_GROUP_X9_62_CHAR2_163V2 \ + "0800000000000000000000000000000000000000C9", \ + "0108B39E77C4B108BED981ED0E890E117C511CF072", \ + "0667ACEB38AF4E488C407433FFAE4F1C811638DF20", \ + "0024266E4EB5106D0A964D92C4860E2671DB9B6CC5", \ + "01F64F1C0280E19A062003DBAECEAEDEC1CE141D41", \ + "03FFFFFFFFFFFFFFFFFFFDF64DE1151ADBB78F10A7", 2 +#define _EC_GROUP_X9_62_CHAR2_163V3 \ + "0800000000000000000000000000000000000000C9", \ + "07A526C63D3E25A256A007699F5447E32AE456B50E", \ + "03F7061798EB99E238FD6F1BF95B48FEEB4854252B", \ + "02F9F87B7C574D0BDECF8A22E6524775F98CDEBDCB", \ + "01D42417D750A363F61E455807D047059CA039ACFE", \ + "03FFFFFFFFFFFFFFFFFFFE1AEE140F110AFF961309", 2 +#define _EC_GROUP_X9_62_CHAR2_176V1 \ + "0100000000000000000000000000000000080000000007", \ + "E4E6DB2995065C407D9D39B8D0967B96704BA8E9C90B", \ + "5DDA470ABE6414DE8EC133AE28E9BBD7FCEC0AE0FFF2", \ + "8D16C2866798B600F9F08BB4A8E860F3298CE04A5798", \ + "6FA4539C2DADDDD6BAB5167D61B436E1D92BB16A562C", \ + "00010092537397ECA4F6145799D62B0A19CE06FE26AD", 0xFF6E +#define _EC_GROUP_X9_62_CHAR2_191V1 \ + "800000000000000000000000000000000000000000000201", \ + "2866537B676752636A68F56554E12640276B649EF7526267", \ + "2E45EF571F00786F67B0081B9495A3D95462F5DE0AA185EC", \ + "36B3DAF8A23206F9C4F299D7B21A9C369137F2C84AE1AA0D", \ + "765BE73433B3F95E332932E70EA245CA2418EA0EF98018FB", \ + "40000000000000000000000004A20E90C39067C893BBB9A5", 2 +#define _EC_GROUP_X9_62_CHAR2_191V2 \ + "800000000000000000000000000000000000000000000201", \ + "401028774D7777C7B7666D1366EA432071274F89FF01E718", \ + "0620048D28BCBD03B6249C99182B7C8CD19700C362C46A01", \ + "3809B2B7CC1B28CC5A87926AAD83FD28789E81E2C9E3BF10", \ + "17434386626D14F3DBF01760D9213A3E1CF37AEC437D668A", \ + "20000000000000000000000050508CB89F652824E06B8173", 4 +#define _EC_GROUP_X9_62_CHAR2_191V3 \ + "800000000000000000000000000000000000000000000201", \ + "6C01074756099122221056911C77D77E77A777E7E7E77FCB", \ + "71FE1AF926CF847989EFEF8DB459F66394D90F32AD3F15E8", \ + "375D4CE24FDE434489DE8746E71786015009E66E38A926DD", \ + "545A39176196575D985999366E6AD34CE0A77CD7127B06BE", \ + "155555555555555555555555610C0B196812BFB6288A3EA3", 6 +#define _EC_GROUP_X9_62_CHAR2_208W1 \ + "010000000000000000000000000000000800000000000000000007", \ + "0000000000000000000000000000000000000000000000000000", \ + "C8619ED45A62E6212E1160349E2BFA844439FAFC2A3FD1638F9E", \ + "89FDFBE4ABE193DF9559ECF07AC0CE78554E2784EB8C1ED1A57A", \ + "0F55B51A06E78E9AC38A035FF520D8B01781BEB1A6BB08617DE3", \ + "000101BAF95C9723C57B6C21DA2EFF2D5ED588BDD5717E212F9D", 0xFE48 +#define _EC_GROUP_X9_62_CHAR2_239V1 \ + "800000000000000000000000000000000000000000000000001000000001", \ + "32010857077C5431123A46B808906756F543423E8D27877578125778AC76", \ + "790408F2EEDAF392B012EDEFB3392F30F4327C0CA3F31FC383C422AA8C16", \ + "57927098FA932E7C0A96D3FD5B706EF7E5F5C156E16B7E7C86038552E91D", \ + "61D8EE5077C33FECF6F1A16B268DE469C3C7744EA9A971649FC7A9616305", \ + "2000000000000000000000000000000F4D42FFE1492A4993F1CAD666E447", 4 +#define _EC_GROUP_X9_62_CHAR2_239V2 \ + "800000000000000000000000000000000000000000000000001000000001", \ + "4230017757A767FAE42398569B746325D45313AF0766266479B75654E65F", \ + "5037EA654196CFF0CD82B2C14A2FCF2E3FF8775285B545722F03EACDB74B", \ + "28F9D04E900069C8DC47A08534FE76D2B900B7D7EF31F5709F200C4CA205", \ + "5667334C45AFF3B5A03BAD9DD75E2C71A99362567D5453F7FA6E227EC833", \ + "1555555555555555555555555555553C6F2885259C31E3FCDF154624522D", 6 +#define _EC_GROUP_X9_62_CHAR2_239V3 \ + "800000000000000000000000000000000000000000000000001000000001", \ + "01238774666A67766D6676F778E676B66999176666E687666D8766C66A9F", \ + "6A941977BA9F6A435199ACFC51067ED587F519C5ECB541B8E44111DE1D40", \ + "70F6E9D04D289C4E89913CE3530BFDE903977D42B146D539BF1BDE4E9C92", \ + "2E5A0EAF6E5E1305B9004DCE5C0ED7FE59A35608F33837C816D80B79F461", \ + "0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCAC4912D2D9DF903EF9888B8A0E4CFF", 0xA +#define _EC_GROUP_X9_62_CHAR2_272W1 \ + "010000000000000000000000000000000000000000000000000000010000000000000B", \ + "91A091F03B5FBA4AB2CCF49C4EDD220FB028712D42BE752B2C40094DBACDB586FB20", \ + "7167EFC92BB2E3CE7C8AAAFF34E12A9C557003D7C73A6FAF003F99F6CC8482E540F7", \ + "6108BABB2CEEBCF787058A056CBE0CFE622D7723A289E08A07AE13EF0D10D171DD8D", \ + "10C7695716851EEF6BA7F6872E6142FBD241B830FF5EFCACECCAB05E02005DDE9D23", \ + "000100FAF51354E0E39E4892DF6E319C72C8161603FA45AA7B998A167B8F1E629521", 0xFF06 +#define _EC_GROUP_X9_62_CHAR2_304W1 \ + "010000000000000000000000000000000000000000000000000000000000000000000000000807", \ + "FD0D693149A118F651E6DCE6802085377E5F882D1B510B44160074C1288078365A0396C8E681", \ + "BDDB97E555A50A908E43B01C798EA5DAA6788F1EA2794EFCF57166B8C14039601E55827340BE", \ + "197B07845E9BE2D96ADB0F5F3C7F2CFFBD7A3EB8B6FEC35C7FD67F26DDF6285A644F740A2614", \ + "E19FBEB76E0DA171517ECF401B50289BF014103288527A9B416A105E80260B549FDC1B92C03B", \ + "000101D556572AABAC800101D556572AABAC8001022D5C91DD173F8FB561DA6899164443051D", 0xFE2E +#define _EC_GROUP_X9_62_CHAR2_359V1 \ + "800000000000000000000000000000000000000000000000000000000000000000000000100000000000000001", \ + "5667676A654B20754F356EA92017D946567C46675556F19556A04616B567D223A5E05656FB549016A96656A557", \ + "2472E2D0197C49363F1FE7F5B6DB075D52B6947D135D8CA445805D39BC345626089687742B6329E70680231988", \ + "3C258EF3047767E7EDE0F1FDAA79DAEE3841366A132E163ACED4ED2401DF9C6BDCDE98E8E707C07A2239B1B097", \ + "53D7E08529547048121E9C95F3791DD804963948F34FAE7BF44EA82365DC7868FE57E4AE2DE211305A407104BD", \ + "01AF286BCA1AF286BCA1AF286BCA1AF286BCA1AF286BC9FB8F6B85C556892C20A7EB964FE7719E74F490758D3B", 0x4C +#define _EC_GROUP_X9_62_CHAR2_368W1 \ + "0100000000000000000000000000000000000000000000000000000000000000000000002000000000000000000007", \ + "E0D2EE25095206F5E2A4F9ED229F1F256E79A0E2B455970D8D0D865BD94778C576D62F0AB7519CCD2A1A906AE30D", \ + "FC1217D4320A90452C760A58EDCD30C8DD069B3C34453837A34ED50CB54917E1C2112D84D164F444F8F74786046A", \ + "1085E2755381DCCCE3C1557AFA10C2F0C0C2825646C5B34A394CBCFA8BC16B22E7E789E927BE216F02E1FB136A5F", \ + "7B3EB1BDDCBA62D5D8B2059B525797FC73822C59059C623A45FF3843CEE8F87CD1855ADAA81E2A0750B80FDA2310", \ + "00010090512DA9AF72B08349D98A5DD4C7B0532ECA51CE03E2D10F3B7AC579BD87E909AE40A6F131E9CFCE5BD967", 0xFF70 +#define _EC_GROUP_X9_62_CHAR2_431R1 \ + "800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000001", \ + "1A827EF00DD6FC0E234CAF046C6A5D8A85395B236CC4AD2CF32A0CADBDC9DDF620B0EB9906D0957F6C6FEACD615468DF104DE296CD8F", \ + "10D9B4A3D9047D8B154359ABFB1B7F5485B04CEB868237DDC9DEDA982A679A5A919B626D4E50A8DD731B107A9962381FB5D807BF2618", \ + "120FC05D3C67A99DE161D2F4092622FECA701BE4F50F4758714E8A87BBF2A658EF8C21E7C5EFE965361F6C2999C0C247B0DBD70CE6B7", \ + "20D0AF8903A96F8D5FA2C255745D3C451B302C9346D9B7E485E7BCE41F6B591F3E8F6ADDCBB0BC4C2F947A7DE1A89B625D6A598B3760", \ + "0340340340340340340340340340340340340340340340340340340323C313FAB50589703B5EC68D3587FEC60D161CC149C1AD4A91", 0x2760 + +#define _EC_GROUP_WTLS_1 \ + "020000000000000000000000000201", \ + "1", \ + "1", \ + "01667979A40BA497E5D5C270780617", \ + "00F44B4AF1ECC2630E08785CEBCC15", \ + "00FFFFFFFFFFFFFFFDBF91AF6DEA73", 2 static EC_GROUP *ec_group_new_GFp_from_hex(const char *prime_in, const char *a_in, const char *b_in, @@ -256,6 +534,54 @@ err: return(group); } +static EC_GROUP *ec_group_new_GF2m_from_hex(const char *prime_in, + const char *a_in, const char *b_in, + const char *x_in, const char *y_in, const char *order_in, const BN_ULONG cofac_in) + { + EC_GROUP *group=NULL; + EC_POINT *P=NULL; + BN_CTX *ctx=NULL; + BIGNUM *prime=NULL,*a=NULL,*b=NULL,*x=NULL,*y=NULL,*order=NULL; + int ok=0; + + if ((ctx = BN_CTX_new()) == NULL) goto bn_err; + if ((prime = BN_new()) == NULL || (a = BN_new()) == NULL || (b = BN_new()) == NULL || + (x = BN_new()) == NULL || (y = BN_new()) == NULL || (order = BN_new()) == NULL) goto bn_err; + + if (!BN_hex2bn(&prime, prime_in)) goto bn_err; + if (!BN_hex2bn(&a, a_in)) goto bn_err; + if (!BN_hex2bn(&b, b_in)) goto bn_err; + + if ((group = EC_GROUP_new_curve_GF2m(prime, a, b, ctx)) == NULL) goto err; + if ((P = EC_POINT_new(group)) == NULL) goto err; + + if (!BN_hex2bn(&x, x_in)) goto bn_err; + if (!BN_hex2bn(&y, y_in)) goto bn_err; + if (!EC_POINT_set_affine_coordinates_GF2m(group, P, x, y, ctx)) goto err; + if (!BN_hex2bn(&order, order_in)) goto bn_err; + if (!BN_set_word(x, cofac_in)) goto bn_err; + if (!EC_GROUP_set_generator(group, P, order, x)) goto err; + ok=1; +bn_err: + if (!ok) + ECerr(EC_F_EC_GROUP_NEW_GF2M_FROM_HEX, ERR_R_BN_LIB); +err: + if (!ok) + { + EC_GROUP_free(group); + group = NULL; + } + if (P) EC_POINT_free(P); + if (ctx) BN_CTX_free(ctx); + if (prime) BN_free(prime); + if (a) BN_free(a); + if (b) BN_free(b); + if (order) BN_free(order); + if (x) BN_free(x); + if (y) BN_free(y); + return(group); + } + EC_GROUP *EC_GROUP_new_by_name(int name) { EC_GROUP *ret = NULL; @@ -263,86 +589,272 @@ EC_GROUP *EC_GROUP_new_by_name(int name) { case EC_GROUP_NO_CURVE: return NULL; - /* some nist curves */ - case EC_GROUP_NIST_PRIME_224: /* EC_GROUP_NIST_PRIME_224 == EC_GROUP_SECG_PRIME_224R1 */ - ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_224); - break; - case EC_GROUP_NIST_PRIME_384: /* EC_GROUP_NIST_PRIME_384 == EC_GROUP_SECG_PRIME_384R1 */ - ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_384); + /* prime field curves */ + /* prime field curves of degree 112 */ + case EC_GROUP_SECG_PRIME_112R1: + case EC_GROUP_WTLS_6: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_112R1); break; - - case EC_GROUP_NIST_PRIME_521: /* EC_GROUP_NIST_PRIME_521 == EC_GROUP_SECG_PRIME_521R1 */ - ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_521); + + case EC_GROUP_SECG_PRIME_112R2: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_112R2); + break; + + case EC_GROUP_WTLS_8: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_WTLS_8); + break; + + /* prime field curves of degree 128 */ + case EC_GROUP_SECG_PRIME_128R1: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_128R1); break; - /* x9.62 prime curves */ + + case EC_GROUP_SECG_PRIME_128R2: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_128R2); + break; + + /* prime field curves of degree 160 */ + case EC_GROUP_SECG_PRIME_160K1: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_160K1); + break; + + case EC_GROUP_SECG_PRIME_160R1: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_160R1); + break; + + case EC_GROUP_SECG_PRIME_160R2: + case EC_GROUP_WTLS_7: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_160R2); + break; + + case EC_GROUP_WTLS_9: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_WTLS_9); + break; + + /* prime field curves of degree 192 */ + case EC_GROUP_SECG_PRIME_192K1: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_192K1); + break; + case EC_GROUP_X9_62_PRIME_192V1: /* == EC_GROUP_NIST_PRIME_192 == EC_GROUP_SECG_PRIME_192R1 */ ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_192); break; - + case EC_GROUP_X9_62_PRIME_192V2: ret = ec_group_new_GFp_from_hex(_EC_GROUP_X9_62_PRIME_192V2); break; - + case EC_GROUP_X9_62_PRIME_192V3: ret = ec_group_new_GFp_from_hex(_EC_GROUP_X9_62_PRIME_192V3); break; - + + /* prime field curves of degree 224 */ + case EC_GROUP_SECG_PRIME_224K1: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_224K1); + break; + + case EC_GROUP_SECG_PRIME_224R1: /* == EC_GROUP_NIST_PRIME_224 */ + ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_224); + break; + + case EC_GROUP_WTLS_12: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_WTLS_12); + break; + + /* prime field curves of degree 239 */ case EC_GROUP_X9_62_PRIME_239V1: ret = ec_group_new_GFp_from_hex(_EC_GROUP_X9_62_PRIME_239V1); break; - + case EC_GROUP_X9_62_PRIME_239V2: ret = ec_group_new_GFp_from_hex(_EC_GROUP_X9_62_PRIME_239V2); break; - + case EC_GROUP_X9_62_PRIME_239V3: ret = ec_group_new_GFp_from_hex(_EC_GROUP_X9_62_PRIME_239V3); break; - - case EC_GROUP_X9_62_PRIME_256V1: /* == EC_GROUP_NIST_PRIME_256 == EC_GROUP_SECG_PRIME_256R1 */ + + /* prime field curves of degree 256 */ + case EC_GROUP_SECG_PRIME_256K1: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_256K1); + break; + + case EC_GROUP_SECG_PRIME_256R1: /* == EC_GROUP_NIST_PRIME_256 == EC_GROUP_X9_62_PRIME_256V1 */ ret = ec_group_new_GFp_from_hex(_EC_GROUP_X9_62_PRIME_256V1); break; - /* the remaining secg curves */ - case EC_GROUP_SECG_PRIME_112R1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_112R1); + + /* prime field curves of degree 384 */ + case EC_GROUP_SECG_PRIME_384R1: /* == EC_GROUP_NIST_PRIME_384 */ + ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_384); break; - case EC_GROUP_SECG_PRIME_112R2: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_112R2); + + /* prime field curves of degree 521 */ + case EC_GROUP_SECG_PRIME_521R1: /* == EC_GROUP_NIST_PRIME_521 */ + ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_521); break; - case EC_GROUP_SECG_PRIME_128R1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_128R1); + + /* characteristic two field curves */ + /* binary curves of degree 113 */ + case EC_GROUP_SECG_CHAR2_113R1: + case EC_GROUP_WTLS_4: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_113R1); break; - case EC_GROUP_SECG_PRIME_128R2: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_128R2); + + case EC_GROUP_SECG_CHAR2_113R2: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_113R2); break; - case EC_GROUP_SECG_PRIME_160K1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_160K1); + + case EC_GROUP_WTLS_1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_WTLS_1); break; - case EC_GROUP_SECG_PRIME_160R1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_160R1); + + /* binary curves of degree 131 */ + case EC_GROUP_SECG_CHAR2_131R1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_131R1); break; - case EC_GROUP_SECG_PRIME_160R2: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_160R2); + + case EC_GROUP_SECG_CHAR2_131R2: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_131R2); break; - case EC_GROUP_SECG_PRIME_192K1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_192K1); + + /* binary curves of degree 163 */ + case EC_GROUP_SECG_CHAR2_163K1: /* == EC_GROUP_NIST_CHAR2_K163 */ + case EC_GROUP_WTLS_3: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_163K1); break; - case EC_GROUP_SECG_PRIME_224K1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_224K1); + + case EC_GROUP_SECG_CHAR2_163R1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_163R1); break; - case EC_GROUP_SECG_PRIME_256K1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_256K1); + + case EC_GROUP_SECG_CHAR2_163R2: /* == EC_GROUP_NIST_CHAR2_B163 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_163R2); break; - /* some wap/wtls curves */ - case EC_GROUP_WTLS_6: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_WTLS_6); + + case EC_GROUP_X9_62_CHAR2_163V1: + case EC_GROUP_WTLS_5: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_163V1); break; - case EC_GROUP_WTLS_8: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_WTLS_8); + + case EC_GROUP_X9_62_CHAR2_163V2: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_163V2); break; - case EC_GROUP_WTLS_9: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_WTLS_9); + + case EC_GROUP_X9_62_CHAR2_163V3: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_163V3); + break; + + /* binary curves of degree 176 */ + case EC_GROUP_X9_62_CHAR2_176V1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_176V1); + break; + + /* binary curves of degree 191 */ + case EC_GROUP_X9_62_CHAR2_191V1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_191V1); + break; + + case EC_GROUP_X9_62_CHAR2_191V2: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_191V2); + break; + + case EC_GROUP_X9_62_CHAR2_191V3: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_191V3); + break; + + /* binary curves of degree 193 */ + case EC_GROUP_SECG_CHAR2_193R1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_193R1); + break; + + case EC_GROUP_SECG_CHAR2_193R2: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_193R2); + break; + + /* binary curves of degree 208 */ + case EC_GROUP_X9_62_CHAR2_208W1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_208W1); + break; + + /* binary curves of degree 233 */ + case EC_GROUP_SECG_CHAR2_233K1: /* == EC_GROUP_NIST_CHAR2_K233 */ + case EC_GROUP_WTLS_10: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_233K1); + break; + + case EC_GROUP_SECG_CHAR2_233R1: /* == EC_GROUP_NIST_CHAR2_B233 */ + case EC_GROUP_WTLS_11: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_233R1); + break; + + /* binary curves of degree 239 */ + case EC_GROUP_SECG_CHAR2_239K1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_239K1); + break; + + case EC_GROUP_X9_62_CHAR2_239V1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_239V1); + break; + + case EC_GROUP_X9_62_CHAR2_239V2: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_239V2); + break; + + case EC_GROUP_X9_62_CHAR2_239V3: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_239V3); + break; + + /* binary curves of degree 272 */ + case EC_GROUP_X9_62_CHAR2_272W1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_272W1); + break; + + /* binary curves of degree 283 */ + case EC_GROUP_SECG_CHAR2_283K1: /* == EC_GROUP_NIST_CHAR2_K283 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_283K1); + break; + + case EC_GROUP_SECG_CHAR2_283R1: /* == EC_GROUP_NIST_CHAR2_B283 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_283R1); + break; + + /* binary curves of degree 304 */ + case EC_GROUP_X9_62_CHAR2_304W1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_304W1); + break; + + /* binary curves of degree 359 */ + case EC_GROUP_X9_62_CHAR2_359V1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_359V1); + break; + + /* binary curves of degree 368 */ + case EC_GROUP_X9_62_CHAR2_368W1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_368W1); + break; + + /* binary curves of degree 409 */ + case EC_GROUP_SECG_CHAR2_409K1: /* == EC_GROUP_NIST_CHAR2_K409 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_409K1); + break; + + case EC_GROUP_SECG_CHAR2_409R1: /* == EC_GROUP_NIST_CHAR2_B409 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_409R1); + break; + + /* binary curves of degree 431 */ + case EC_GROUP_X9_62_CHAR2_431R1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_431R1); + break; + + /* binary curves of degree 571 */ + case EC_GROUP_SECG_CHAR2_571K1: /* == EC_GROUP_NIST_CHAR2_K571 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_571K1); + break; + + case EC_GROUP_SECG_CHAR2_571R1: /* == EC_GROUP_NIST_CHAR2_B571 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_571R1); break; } diff --git a/crypto/ec/ec_cvt.c b/crypto/ec/ec_cvt.c index 3daeb19509..22789a57e5 100644 --- a/crypto/ec/ec_cvt.c +++ b/crypto/ec/ec_cvt.c @@ -1,4 +1,7 @@ /* crypto/ec/ec_cvt.c */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,32 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #include "ec_lcl.h" @@ -78,3 +107,23 @@ EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM return ret; } + +EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) + { + const EC_METHOD *meth; + EC_GROUP *ret; + + meth = EC_GF2m_simple_method(); + + ret = EC_GROUP_new(meth); + if (ret == NULL) + return NULL; + + if (!EC_GROUP_set_curve_GF2m(ret, p, a, b, ctx)) + { + EC_GROUP_clear_free(ret); + return NULL; + } + + return ret; + } diff --git a/crypto/ec/ec_err.c b/crypto/ec/ec_err.c index bb517d90ac..8626ef0d3a 100644 --- a/crypto/ec/ec_err.c +++ b/crypto/ec/ec_err.c @@ -67,70 +67,97 @@ static ERR_STRING_DATA EC_str_functs[]= { {ERR_PACK(0,EC_F_COMPUTE_WNAF,0), "COMPUTE_WNAF"}, -{ERR_PACK(0,EC_F_D2I_ECDSAPARAMETERS,0), "d2i_ECDSAParameters"}, {ERR_PACK(0,EC_F_D2I_ECPARAMETERS,0), "d2i_ECParameters"}, {ERR_PACK(0,EC_F_D2I_ECPKPARAMETERS,0), "d2i_ECPKParameters"}, +{ERR_PACK(0,EC_F_D2I_ECPRIVATEKEY,0), "d2i_ECPrivateKey"}, +{ERR_PACK(0,EC_F_ECPARAMETERS_PRINT,0), "ECParameters_print"}, +{ERR_PACK(0,EC_F_ECPARAMETERS_PRINT_FP,0), "ECParameters_print_fp"}, {ERR_PACK(0,EC_F_ECPKPARAMETERS_PRINT,0), "ECPKParameters_print"}, {ERR_PACK(0,EC_F_ECPKPARAMETERS_PRINT_FP,0), "ECPKParameters_print_fp"}, +{ERR_PACK(0,EC_F_ECPUBLICKEY_GET_OCTET,0), "ECPUBLICKEY_GET_OCTET"}, +{ERR_PACK(0,EC_F_ECPUBLICKEY_SET_OCTET,0), "ECPUBLICKEY_SET_OCTET"}, {ERR_PACK(0,EC_F_EC_ASN1_GROUP2CURVE,0), "EC_ASN1_GROUP2CURVE"}, {ERR_PACK(0,EC_F_EC_ASN1_GROUP2FIELDID,0), "EC_ASN1_GROUP2FIELDID"}, {ERR_PACK(0,EC_F_EC_ASN1_GROUP2PARAMETERS,0), "EC_ASN1_GROUP2PARAMETERS"}, -{ERR_PACK(0,EC_F_EC_ASN1_GROUP2PKPARAMETERS,0), "EC_ASN1_group2pkparameters"}, +{ERR_PACK(0,EC_F_EC_ASN1_GROUP2PKPARAMETERS,0), "EC_ASN1_GROUP2PKPARAMETERS"}, {ERR_PACK(0,EC_F_EC_ASN1_PARAMETERS2GROUP,0), "EC_ASN1_PARAMETERS2GROUP"}, -{ERR_PACK(0,EC_F_EC_ASN1_PKPARAMETERS2GROUP,0), "EC_ASN1_pkparameters2group"}, +{ERR_PACK(0,EC_F_EC_ASN1_PKPARAMETERS2GROUP,0), "EC_ASN1_PKPARAMETERS2GROUP"}, +{ERR_PACK(0,EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT,0), "ec_GF2m_simple_group_check_discriminant"}, +{ERR_PACK(0,EC_F_EC_GF2M_SIMPLE_OCT2POINT,0), "ec_GF2m_simple_oct2point"}, +{ERR_PACK(0,EC_F_EC_GF2M_SIMPLE_POINT2OCT,0), "ec_GF2m_simple_point2oct"}, +{ERR_PACK(0,EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES,0), "ec_GF2m_simple_point_get_affine_coordinates"}, +{ERR_PACK(0,EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES,0), "ec_GF2m_simple_point_set_affine_coordinates"}, +{ERR_PACK(0,EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES,0), "ec_GF2m_simple_set_compressed_coordinates"}, {ERR_PACK(0,EC_F_EC_GFP_MONT_FIELD_DECODE,0), "ec_GFp_mont_field_decode"}, {ERR_PACK(0,EC_F_EC_GFP_MONT_FIELD_ENCODE,0), "ec_GFp_mont_field_encode"}, {ERR_PACK(0,EC_F_EC_GFP_MONT_FIELD_MUL,0), "ec_GFp_mont_field_mul"}, {ERR_PACK(0,EC_F_EC_GFP_MONT_FIELD_SQR,0), "ec_GFp_mont_field_sqr"}, {ERR_PACK(0,EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT,0), "ec_GFp_simple_group_check_discriminant"}, -{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP,0), "ec_GFp_simple_group_set_curve_GFp"}, +{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE,0), "ec_GFp_simple_group_set_curve"}, {ERR_PACK(0,EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR,0), "EC_GFP_SIMPLE_GROUP_SET_GENERATOR"}, {ERR_PACK(0,EC_F_EC_GFP_SIMPLE_MAKE_AFFINE,0), "ec_GFp_simple_make_affine"}, {ERR_PACK(0,EC_F_EC_GFP_SIMPLE_OCT2POINT,0), "ec_GFp_simple_oct2point"}, {ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINT2OCT,0), "ec_GFp_simple_point2oct"}, {ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE,0), "ec_GFp_simple_points_make_affine"}, -{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP,0), "ec_GFp_simple_point_get_affine_coordinates_GFp"}, -{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP,0), "ec_GFp_simple_point_set_affine_coordinates_GFp"}, -{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP,0), "ec_GFp_simple_set_compressed_coordinates_GFp"}, +{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES,0), "ec_GFp_simple_point_get_affine_coordinates"}, +{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES,0), "ec_GFp_simple_point_set_affine_coordinates"}, +{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES,0), "ec_GFp_simple_set_compressed_coordinates"}, {ERR_PACK(0,EC_F_EC_GROUP_CHECK,0), "EC_GROUP_check"}, {ERR_PACK(0,EC_F_EC_GROUP_CHECK_DISCRIMINANT,0), "EC_GROUP_check_discriminant"}, {ERR_PACK(0,EC_F_EC_GROUP_COPY,0), "EC_GROUP_copy"}, {ERR_PACK(0,EC_F_EC_GROUP_GET0_GENERATOR,0), "EC_GROUP_get0_generator"}, {ERR_PACK(0,EC_F_EC_GROUP_GET_COFACTOR,0), "EC_GROUP_get_cofactor"}, +{ERR_PACK(0,EC_F_EC_GROUP_GET_CURVE_GF2M,0), "EC_GROUP_get_curve_GF2m"}, {ERR_PACK(0,EC_F_EC_GROUP_GET_CURVE_GFP,0), "EC_GROUP_get_curve_GFp"}, +{ERR_PACK(0,EC_F_EC_GROUP_GET_DEGREE,0), "EC_GROUP_get_degree"}, {ERR_PACK(0,EC_F_EC_GROUP_GET_EXTRA_DATA,0), "EC_GROUP_get_extra_data"}, {ERR_PACK(0,EC_F_EC_GROUP_GET_ORDER,0), "EC_GROUP_get_order"}, {ERR_PACK(0,EC_F_EC_GROUP_GROUP2NID,0), "EC_GROUP_GROUP2NID"}, {ERR_PACK(0,EC_F_EC_GROUP_NEW,0), "EC_GROUP_new"}, {ERR_PACK(0,EC_F_EC_GROUP_NEW_BY_NAME,0), "EC_GROUP_new_by_name"}, {ERR_PACK(0,EC_F_EC_GROUP_NEW_BY_NID,0), "EC_GROUP_new_by_nid"}, +{ERR_PACK(0,EC_F_EC_GROUP_NEW_GF2M_FROM_HEX,0), "EC_GROUP_NEW_GF2M_FROM_HEX"}, {ERR_PACK(0,EC_F_EC_GROUP_NEW_GFP_FROM_HEX,0), "EC_GROUP_NEW_GFP_FROM_HEX"}, {ERR_PACK(0,EC_F_EC_GROUP_PRECOMPUTE_MULT,0), "EC_GROUP_precompute_mult"}, +{ERR_PACK(0,EC_F_EC_GROUP_SET_CURVE_GF2M,0), "EC_GROUP_set_curve_GF2m"}, {ERR_PACK(0,EC_F_EC_GROUP_SET_CURVE_GFP,0), "EC_GROUP_set_curve_GFp"}, {ERR_PACK(0,EC_F_EC_GROUP_SET_EXTRA_DATA,0), "EC_GROUP_set_extra_data"}, {ERR_PACK(0,EC_F_EC_GROUP_SET_GENERATOR,0), "EC_GROUP_set_generator"}, +{ERR_PACK(0,EC_F_EC_KEY_CHECK_KEY,0), "EC_KEY_check_key"}, +{ERR_PACK(0,EC_F_EC_KEY_COPY,0), "EC_KEY_copy"}, +{ERR_PACK(0,EC_F_EC_KEY_GENERATE_KEY,0), "EC_KEY_generate_key"}, +{ERR_PACK(0,EC_F_EC_KEY_PRINT,0), "EC_KEY_print"}, +{ERR_PACK(0,EC_F_EC_KEY_PRINT_FP,0), "EC_KEY_print_fp"}, +{ERR_PACK(0,EC_F_EC_NEW,0), "EC_NEW"}, {ERR_PACK(0,EC_F_EC_POINTS_MAKE_AFFINE,0), "EC_POINTs_make_affine"}, {ERR_PACK(0,EC_F_EC_POINTS_MUL,0), "EC_POINTs_mul"}, {ERR_PACK(0,EC_F_EC_POINT_ADD,0), "EC_POINT_add"}, {ERR_PACK(0,EC_F_EC_POINT_CMP,0), "EC_POINT_cmp"}, {ERR_PACK(0,EC_F_EC_POINT_COPY,0), "EC_POINT_copy"}, {ERR_PACK(0,EC_F_EC_POINT_DBL,0), "EC_POINT_dbl"}, +{ERR_PACK(0,EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M,0), "EC_POINT_get_affine_coordinates_GF2m"}, {ERR_PACK(0,EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP,0), "EC_POINT_get_affine_coordinates_GFp"}, {ERR_PACK(0,EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP,0), "EC_POINT_get_Jprojective_coordinates_GFp"}, {ERR_PACK(0,EC_F_EC_POINT_IS_AT_INFINITY,0), "EC_POINT_is_at_infinity"}, {ERR_PACK(0,EC_F_EC_POINT_IS_ON_CURVE,0), "EC_POINT_is_on_curve"}, {ERR_PACK(0,EC_F_EC_POINT_MAKE_AFFINE,0), "EC_POINT_make_affine"}, +{ERR_PACK(0,EC_F_EC_POINT_MUL,0), "EC_POINT_mul"}, {ERR_PACK(0,EC_F_EC_POINT_NEW,0), "EC_POINT_new"}, {ERR_PACK(0,EC_F_EC_POINT_OCT2POINT,0), "EC_POINT_oct2point"}, {ERR_PACK(0,EC_F_EC_POINT_POINT2OCT,0), "EC_POINT_point2oct"}, +{ERR_PACK(0,EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M,0), "EC_POINT_set_affine_coordinates_GF2m"}, {ERR_PACK(0,EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP,0), "EC_POINT_set_affine_coordinates_GFp"}, +{ERR_PACK(0,EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M,0), "EC_POINT_set_compressed_coordinates_GF2m"}, {ERR_PACK(0,EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP,0), "EC_POINT_set_compressed_coordinates_GFp"}, {ERR_PACK(0,EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP,0), "EC_POINT_set_Jprojective_coordinates_GFp"}, {ERR_PACK(0,EC_F_EC_POINT_SET_TO_INFINITY,0), "EC_POINT_set_to_infinity"}, -{ERR_PACK(0,EC_F_GFP_MONT_GROUP_SET_CURVE_GFP,0), "GFP_MONT_GROUP_SET_CURVE_GFP"}, -{ERR_PACK(0,EC_F_I2D_ECDSAPARAMETERS,0), "i2d_ECDSAParameters"}, +{ERR_PACK(0,EC_F_EC_WNAF_MUL,0), "ec_wNAF_mul"}, +{ERR_PACK(0,EC_F_EC_WNAF_PRECOMPUTE_MULT,0), "ec_wNAF_precompute_mult"}, +{ERR_PACK(0,EC_F_GFP_MONT_GROUP_SET_CURVE,0), "GFP_MONT_GROUP_SET_CURVE"}, +{ERR_PACK(0,EC_F_I2D_ECDSAPARAMETERS,0), "I2D_ECDSAPARAMETERS"}, {ERR_PACK(0,EC_F_I2D_ECPARAMETERS,0), "i2d_ECParameters"}, {ERR_PACK(0,EC_F_I2D_ECPKPARAMETERS,0), "i2d_ECPKParameters"}, +{ERR_PACK(0,EC_F_I2D_ECPRIVATEKEY,0), "i2d_ECPrivateKey"}, {0,NULL} }; @@ -156,7 +183,9 @@ static ERR_STRING_DATA EC_str_reasons[]= {EC_R_INVALID_FIELD ,"invalid field"}, {EC_R_INVALID_FORM ,"invalid form"}, {EC_R_INVALID_GROUP_ORDER ,"invalid group order"}, +{EC_R_INVALID_PRIVATE_KEY ,"invalid private key"}, {EC_R_MISSING_PARAMETERS ,"missing parameters"}, +{EC_R_MISSING_PRIVATE_KEY ,"missing private key"}, {EC_R_NOT_IMPLEMENTED ,"not implemented"}, {EC_R_NOT_INITIALIZED ,"not initialized"}, {EC_R_NO_SUCH_EXTRA_DATA ,"no such extra data"}, @@ -171,6 +200,7 @@ static ERR_STRING_DATA EC_str_reasons[]= {EC_R_UNKNOWN_NID ,"unknown nid"}, {EC_R_UNKNOWN_ORDER ,"unknown order"}, {EC_R_UNKNOWN_PARAMETERS_TYPE ,"unknown parameters type"}, +{EC_R_WRONG_ORDER ,"wrong order"}, {0,NULL} }; diff --git a/crypto/ec/ec_lcl.h b/crypto/ec/ec_lcl.h index 7457c423ff..247c985a23 100644 --- a/crypto/ec/ec_lcl.h +++ b/crypto/ec/ec_lcl.h @@ -1,4 +1,7 @@ /* crypto/ec/ec_lcl.h */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,32 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #include <stdlib.h> @@ -73,9 +102,13 @@ struct ec_method_st { void (*group_clear_finish)(EC_GROUP *); int (*group_copy)(EC_GROUP *, const EC_GROUP *); - /* used by EC_GROUP_set_curve_GFp and EC_GROUP_get_curve_GFp: */ - int (*group_set_curve_GFp)(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); - int (*group_get_curve_GFp)(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); + /* used by EC_GROUP_set_curve_GFp, EC_GROUP_get_curve_GFp, */ + /* EC_GROUP_set_curve_GF2m, and EC_GROUP_get_curve_GF2m: */ + int (*group_set_curve)(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); + int (*group_get_curve)(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); + + /* used by EC_GROUP_get_degree: */ + int (*group_get_degree)(const EC_GROUP *); /* used by EC_GROUP_check: */ int (*group_check_discriminant)(const EC_GROUP *, BN_CTX *); @@ -87,20 +120,22 @@ struct ec_method_st { int (*point_copy)(EC_POINT *, const EC_POINT *); /* used by EC_POINT_set_to_infinity, - * EC_POINT_set_Jprojective_coordinates_GFp, EC_POINT_get_Jprojective_coordinates_GFp, - * EC_POINT_set_affine_coordinates_GFp, EC_POINT_get_affine_coordinates_GFp, - * EC_POINT_set_compressed_coordinates_GFp: + * EC_POINT_set_Jprojective_coordinates_GFp, + * EC_POINT_get_Jprojective_coordinates_GFp, + * EC_POINT_set_affine_coordinates_GFp, ..._GF2m, + * EC_POINT_get_affine_coordinates_GFp, ..._GF2m, + * EC_POINT_set_compressed_coordinates_GFp, ..._GF2m: */ int (*point_set_to_infinity)(const EC_GROUP *, EC_POINT *); int (*point_set_Jprojective_coordinates_GFp)(const EC_GROUP *, EC_POINT *, const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *); int (*point_get_Jprojective_coordinates_GFp)(const EC_GROUP *, const EC_POINT *, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *); - int (*point_set_affine_coordinates_GFp)(const EC_GROUP *, EC_POINT *, + int (*point_set_affine_coordinates)(const EC_GROUP *, EC_POINT *, const BIGNUM *x, const BIGNUM *y, BN_CTX *); - int (*point_get_affine_coordinates_GFp)(const EC_GROUP *, const EC_POINT *, + int (*point_get_affine_coordinates)(const EC_GROUP *, const EC_POINT *, BIGNUM *x, BIGNUM *y, BN_CTX *); - int (*point_set_compressed_coordinates_GFp)(const EC_GROUP *, EC_POINT *, + int (*point_set_compressed_coordinates)(const EC_GROUP *, EC_POINT *, const BIGNUM *x, int y_bit, BN_CTX *); /* used by EC_POINT_point2oct, EC_POINT_oct2point: */ @@ -114,6 +149,11 @@ struct ec_method_st { int (*dbl)(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *); int (*invert)(const EC_GROUP *, EC_POINT *, BN_CTX *); + /* used by EC_POINTs_mul, EC_POINT_mul, EC_POINT_precompute_mult: */ + int (*mul)(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, + size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *); + int (*precompute_mult)(EC_GROUP *group, BN_CTX *); + /* used by EC_POINT_is_at_infinity, EC_POINT_is_on_curve, EC_POINT_cmp: */ int (*is_at_infinity)(const EC_GROUP *, const EC_POINT *); int (*is_on_curve)(const EC_GROUP *, const EC_POINT *, BN_CTX *); @@ -126,11 +166,12 @@ struct ec_method_st { /* internal functions */ - /* 'field_mul' and 'field_sqr' can be used by 'add' and 'dbl' so that + /* 'field_mul', 'field_sqr', and 'field_div' can be used by 'add' and 'dbl' so that * the same implementations of point operations can be used with different * optimized implementations of expensive field operations: */ int (*field_mul)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *); int (*field_sqr)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *); + int (*field_div)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *); int (*field_encode)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *); /* e.g. to Montgomery */ int (*field_decode)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *); /* e.g. from Montgomery */ @@ -165,6 +206,12 @@ struct ec_group_st { * irreducible polynomial defining the field. */ + unsigned int poly[5]; /* Field specification for curves over GF(2^m). + * The irreducible f(t) is then of the form: + * t^poly[0] + t^poly[1] + ... + t^poly[k] + * where m = poly[0] > poly[1] > ... > poly[k] = 0. + */ + BIGNUM a, b; /* Curve coefficients. * (Here the assumption is that BIGNUMs can be used * or abused for all kinds of fields, not just GF(p).) @@ -213,13 +260,19 @@ struct ec_point_st { +/* method functions in ec_mult.c */ +int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, + size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *); +int ec_wNAF_precompute_mult(EC_GROUP *group, BN_CTX *); + /* method functions in ecp_smpl.c */ int ec_GFp_simple_group_init(EC_GROUP *); void ec_GFp_simple_group_finish(EC_GROUP *); void ec_GFp_simple_group_clear_finish(EC_GROUP *); int ec_GFp_simple_group_copy(EC_GROUP *, const EC_GROUP *); -int ec_GFp_simple_group_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); -int ec_GFp_simple_group_get_curve_GFp(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); +int ec_GFp_simple_group_set_curve(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int ec_GFp_simple_group_get_curve(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); +int ec_GFp_simple_group_get_degree(const EC_GROUP *); int ec_GFp_simple_group_check_discriminant(const EC_GROUP *, BN_CTX *); int ec_GFp_simple_point_init(EC_POINT *); void ec_GFp_simple_point_finish(EC_POINT *); @@ -230,11 +283,11 @@ int ec_GFp_simple_set_Jprojective_coordinates_GFp(const EC_GROUP *, EC_POINT *, const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *); int ec_GFp_simple_get_Jprojective_coordinates_GFp(const EC_GROUP *, const EC_POINT *, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *); -int ec_GFp_simple_point_set_affine_coordinates_GFp(const EC_GROUP *, EC_POINT *, +int ec_GFp_simple_point_set_affine_coordinates(const EC_GROUP *, EC_POINT *, const BIGNUM *x, const BIGNUM *y, BN_CTX *); -int ec_GFp_simple_point_get_affine_coordinates_GFp(const EC_GROUP *, const EC_POINT *, +int ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP *, const EC_POINT *, BIGNUM *x, BIGNUM *y, BN_CTX *); -int ec_GFp_simple_set_compressed_coordinates_GFp(const EC_GROUP *, EC_POINT *, +int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *, EC_POINT *, const BIGNUM *x, int y_bit, BN_CTX *); size_t ec_GFp_simple_point2oct(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *); @@ -254,7 +307,7 @@ int ec_GFp_simple_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX /* method functions in ecp_mont.c */ int ec_GFp_mont_group_init(EC_GROUP *); -int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int ec_GFp_mont_group_set_curve(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); void ec_GFp_mont_group_finish(EC_GROUP *); void ec_GFp_mont_group_clear_finish(EC_GROUP *); int ec_GFp_mont_group_copy(EC_GROUP *, const EC_GROUP *); @@ -267,7 +320,7 @@ int ec_GFp_mont_field_set_to_one(const EC_GROUP *, BIGNUM *r, BN_CTX *); /* method functions in ecp_recp.c */ int ec_GFp_recp_group_init(EC_GROUP *); -int ec_GFp_recp_group_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int ec_GFp_recp_group_set_curve(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); void ec_GFp_recp_group_finish(EC_GROUP *); void ec_GFp_recp_group_clear_finish(EC_GROUP *); int ec_GFp_recp_group_copy(EC_GROUP *, const EC_GROUP *); @@ -277,9 +330,52 @@ int ec_GFp_recp_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX * /* method functions in ecp_nist.c */ int ec_GFp_nist_group_init(EC_GROUP *); -int ec_GFp_nist_group_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int ec_GFp_nist_group_set_curve(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); void ec_GFp_nist_group_finish(EC_GROUP *); void ec_GFp_nist_group_clear_finish(EC_GROUP *); int ec_GFp_nist_group_copy(EC_GROUP *, const EC_GROUP *); int ec_GFp_nist_field_mul(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *); int ec_GFp_nist_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *); + + +/* method functions in ec2_smpl.c */ +int ec_GF2m_simple_group_init(EC_GROUP *); +void ec_GF2m_simple_group_finish(EC_GROUP *); +void ec_GF2m_simple_group_clear_finish(EC_GROUP *); +int ec_GF2m_simple_group_copy(EC_GROUP *, const EC_GROUP *); +int ec_GF2m_simple_group_set_curve(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int ec_GF2m_simple_group_get_curve(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); +int ec_GF2m_simple_group_get_degree(const EC_GROUP *); +int ec_GF2m_simple_group_check_discriminant(const EC_GROUP *, BN_CTX *); +int ec_GF2m_simple_point_init(EC_POINT *); +void ec_GF2m_simple_point_finish(EC_POINT *); +void ec_GF2m_simple_point_clear_finish(EC_POINT *); +int ec_GF2m_simple_point_copy(EC_POINT *, const EC_POINT *); +int ec_GF2m_simple_point_set_to_infinity(const EC_GROUP *, EC_POINT *); +int ec_GF2m_simple_point_set_affine_coordinates(const EC_GROUP *, EC_POINT *, + const BIGNUM *x, const BIGNUM *y, BN_CTX *); +int ec_GF2m_simple_point_get_affine_coordinates(const EC_GROUP *, const EC_POINT *, + BIGNUM *x, BIGNUM *y, BN_CTX *); +int ec_GF2m_simple_set_compressed_coordinates(const EC_GROUP *, EC_POINT *, + const BIGNUM *x, int y_bit, BN_CTX *); +size_t ec_GF2m_simple_point2oct(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form, + unsigned char *buf, size_t len, BN_CTX *); +int ec_GF2m_simple_oct2point(const EC_GROUP *, EC_POINT *, + const unsigned char *buf, size_t len, BN_CTX *); +int ec_GF2m_simple_add(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *); +int ec_GF2m_simple_dbl(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *); +int ec_GF2m_simple_invert(const EC_GROUP *, EC_POINT *, BN_CTX *); +int ec_GF2m_simple_is_at_infinity(const EC_GROUP *, const EC_POINT *); +int ec_GF2m_simple_is_on_curve(const EC_GROUP *, const EC_POINT *, BN_CTX *); +int ec_GF2m_simple_cmp(const EC_GROUP *, const EC_POINT *a, const EC_POINT *b, BN_CTX *); +int ec_GF2m_simple_make_affine(const EC_GROUP *, EC_POINT *, BN_CTX *); +int ec_GF2m_simple_points_make_affine(const EC_GROUP *, size_t num, EC_POINT *[], BN_CTX *); +int ec_GF2m_simple_field_mul(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int ec_GF2m_simple_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *); +int ec_GF2m_simple_field_div(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *); + + +/* method functions in ec2_mult.c */ +int ec_GF2m_mont_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, + size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *); +int ec_GF2m_mont_precompute_mult(EC_GROUP *group, BN_CTX *ctx); diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c index 751f8c99e0..9669f42aab 100644 --- a/crypto/ec/ec_lib.c +++ b/crypto/ec/ec_lib.c @@ -1,4 +1,7 @@ /* crypto/ec/ec_lib.c */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Binary polynomial ECC support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <string.h> @@ -243,6 +251,28 @@ int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) } +EC_GROUP *EC_GROUP_dup(const EC_GROUP *a) + { + EC_GROUP *t = NULL; + int ok = 0; + + if (a == NULL) return NULL; + + if ((t = EC_GROUP_new(a->meth)) == NULL) return(NULL); + if (!EC_GROUP_copy(t, a)) goto err; + + ok = 1; + + err: + if (!ok) + { + if (t) EC_GROUP_free(t); + return NULL; + } + else return t; + } + + const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group) { return group->meth; @@ -380,23 +410,56 @@ size_t EC_GROUP_get_seed_len(const EC_GROUP *group) int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) { - if (group->meth->group_set_curve_GFp == 0) + if (group->meth->group_set_curve == 0) { ECerr(EC_F_EC_GROUP_SET_CURVE_GFP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; } - return group->meth->group_set_curve_GFp(group, p, a, b, ctx); + return group->meth->group_set_curve(group, p, a, b, ctx); } int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) { - if (group->meth->group_get_curve_GFp == 0) + if (group->meth->group_get_curve == 0) { ECerr(EC_F_EC_GROUP_GET_CURVE_GFP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; } - return group->meth->group_get_curve_GFp(group, p, a, b, ctx); + return group->meth->group_get_curve(group, p, a, b, ctx); + } + + +int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) + { + if (group->meth->group_set_curve == 0) + { + ECerr(EC_F_EC_GROUP_SET_CURVE_GF2M, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; + } + return group->meth->group_set_curve(group, p, a, b, ctx); + } + + +int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) + { + if (group->meth->group_get_curve == 0) + { + ECerr(EC_F_EC_GROUP_GET_CURVE_GF2M, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; + } + return group->meth->group_get_curve(group, p, a, b, ctx); + } + + +int EC_GROUP_get_degree(const EC_GROUP *group) + { + if (group->meth->group_get_degree == 0) + { + ECerr(EC_F_EC_GROUP_GET_DEGREE, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; + } + return group->meth->group_get_degree(group); } @@ -551,6 +614,25 @@ int EC_POINT_copy(EC_POINT *dest, const EC_POINT *src) } +EC_POINT *EC_POINT_dup(const EC_POINT *a, const EC_GROUP *group) + { + EC_POINT *t; + int r; + + if (a == NULL) return NULL; + + t = EC_POINT_new(group); + if (t == NULL) return(NULL); + r = EC_POINT_copy(t, a); + if (!r) + { + EC_POINT_free(t); + return NULL; + } + else return t; + } + + const EC_METHOD *EC_POINT_method_of(const EC_POINT *point) { return point->meth; @@ -610,7 +692,7 @@ int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, const EC_POI int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx) { - if (group->meth->point_set_affine_coordinates_GFp == 0) + if (group->meth->point_set_affine_coordinates == 0) { ECerr(EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; @@ -620,14 +702,31 @@ int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, ECerr(EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP, EC_R_INCOMPATIBLE_OBJECTS); return 0; } - return group->meth->point_set_affine_coordinates_GFp(group, point, x, y, ctx); + return group->meth->point_set_affine_coordinates(group, point, x, y, ctx); + } + + +int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *point, + const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx) + { + if (group->meth->point_set_affine_coordinates == 0) + { + ECerr(EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; + } + if (group->meth != point->meth) + { + ECerr(EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M, EC_R_INCOMPATIBLE_OBJECTS); + return 0; + } + return group->meth->point_set_affine_coordinates(group, point, x, y, ctx); } int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point, BIGNUM *x, BIGNUM *y, BN_CTX *ctx) { - if (group->meth->point_get_affine_coordinates_GFp == 0) + if (group->meth->point_get_affine_coordinates == 0) { ECerr(EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; @@ -637,14 +736,31 @@ int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *p ECerr(EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP, EC_R_INCOMPATIBLE_OBJECTS); return 0; } - return group->meth->point_get_affine_coordinates_GFp(group, point, x, y, ctx); + return group->meth->point_get_affine_coordinates(group, point, x, y, ctx); + } + + +int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group, const EC_POINT *point, + BIGNUM *x, BIGNUM *y, BN_CTX *ctx) + { + if (group->meth->point_get_affine_coordinates == 0) + { + ECerr(EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; + } + if (group->meth != point->meth) + { + ECerr(EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M, EC_R_INCOMPATIBLE_OBJECTS); + return 0; + } + return group->meth->point_get_affine_coordinates(group, point, x, y, ctx); } int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, int y_bit, BN_CTX *ctx) { - if (group->meth->point_set_compressed_coordinates_GFp == 0) + if (group->meth->point_set_compressed_coordinates == 0) { ECerr(EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; @@ -654,7 +770,24 @@ int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *poi ECerr(EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP, EC_R_INCOMPATIBLE_OBJECTS); return 0; } - return group->meth->point_set_compressed_coordinates_GFp(group, point, x, y_bit, ctx); + return group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx); + } + + +int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group, EC_POINT *point, + const BIGNUM *x, int y_bit, BN_CTX *ctx) + { + if (group->meth->point_set_compressed_coordinates == 0) + { + ECerr(EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; + } + if (group->meth != point->meth) + { + ECerr(EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M, EC_R_INCOMPATIBLE_OBJECTS); + return 0; + } + return group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx); } diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c index 74e1a962df..4978a54352 100644 --- a/crypto/ec/ec_mult.c +++ b/crypto/ec/ec_mult.c @@ -1,4 +1,7 @@ /* crypto/ec/ec_mult.c */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Portions of this software developed by SUN MICROSYSTEMS, INC., + * and contributed to the OpenSSL project. + */ #include <openssl/err.h> @@ -209,7 +217,7 @@ static signed char *compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len) * scalar*generator * in the addition if scalar != NULL */ -int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, +int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *ctx) { BN_CTX *new_ctx = NULL; @@ -235,7 +243,7 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, generator = EC_GROUP_get0_generator(group); if (generator == NULL) { - ECerr(EC_F_EC_POINTS_MUL, EC_R_UNDEFINED_GENERATOR); + ECerr(EC_F_EC_WNAF_MUL, EC_R_UNDEFINED_GENERATOR); return 0; } } @@ -244,7 +252,7 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, { if (group->meth != points[i]->meth) { - ECerr(EC_F_EC_POINTS_MUL, EC_R_INCOMPATIBLE_OBJECTS); + ECerr(EC_F_EC_WNAF_MUL, EC_R_INCOMPATIBLE_OBJECTS); return 0; } } @@ -294,7 +302,7 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, } if (!(v == val + num_val)) { - ECerr(EC_F_EC_POINTS_MUL, ERR_R_INTERNAL_ERROR); + ECerr(EC_F_EC_WNAF_MUL, ERR_R_INTERNAL_ERROR); goto err; } @@ -438,6 +446,20 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, } +/* Generic multiplication method. + * If group->meth does not provide a multiplication method, default to ec_wNAF_mul; + * otherwise use the group->meth's multiplication. + */ +int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, + size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *ctx) + { + if (group->meth->mul == 0) + return ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx); + else + return group->meth->mul(group, r, scalar, num, points, scalars, ctx); + } + + int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, const EC_POINT *point, const BIGNUM *p_scalar, BN_CTX *ctx) { const EC_POINT *points[1]; @@ -450,7 +472,7 @@ int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, con } -int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx) +int ec_wNAF_precompute_mult(EC_GROUP *group, BN_CTX *ctx) { const EC_POINT *generator; BN_CTX *new_ctx = NULL; @@ -460,7 +482,7 @@ int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx) generator = EC_GROUP_get0_generator(group); if (generator == NULL) { - ECerr(EC_F_EC_GROUP_PRECOMPUTE_MULT, EC_R_UNDEFINED_GENERATOR); + ECerr(EC_F_EC_WNAF_PRECOMPUTE_MULT, EC_R_UNDEFINED_GENERATOR); return 0; } @@ -478,7 +500,7 @@ int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx) if (!EC_GROUP_get_order(group, order, ctx)) return 0; if (BN_is_zero(order)) { - ECerr(EC_F_EC_GROUP_PRECOMPUTE_MULT, EC_R_UNKNOWN_ORDER); + ECerr(EC_F_EC_WNAF_PRECOMPUTE_MULT, EC_R_UNKNOWN_ORDER); goto err; } @@ -492,3 +514,18 @@ int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx) BN_CTX_free(new_ctx); return ret; } + + +/* Generic multiplicaiton precomputation method. + * If group->meth does not provide a multiplication method, default to ec_wNAF_mul and do its + * precomputation; otherwise use the group->meth's precomputation if it exists. + */ +int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx) + { + if (group->meth->mul == 0) + return ec_wNAF_precompute_mult(group, ctx); + else if (group->meth->precompute_mult != 0) + return group->meth->precompute_mult(group, ctx); + else + return 1; + } diff --git a/crypto/ec/ecp_mont.c b/crypto/ec/ecp_mont.c index 75c9f6ed15..900228d8af 100644 --- a/crypto/ec/ecp_mont.c +++ b/crypto/ec/ecp_mont.c @@ -1,4 +1,7 @@ /* crypto/ec/ecp_mont.c */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Portions of this software developed by SUN MICROSYSTEMS, INC., + * and contributed to the OpenSSL project. + */ #include <openssl/err.h> @@ -66,8 +74,9 @@ const EC_METHOD *EC_GFp_mont_method(void) ec_GFp_mont_group_finish, ec_GFp_mont_group_clear_finish, ec_GFp_mont_group_copy, - ec_GFp_mont_group_set_curve_GFp, - ec_GFp_simple_group_get_curve_GFp, + ec_GFp_mont_group_set_curve, + ec_GFp_simple_group_get_curve, + ec_GFp_simple_group_get_degree, ec_GFp_simple_group_check_discriminant, ec_GFp_simple_point_init, ec_GFp_simple_point_finish, @@ -76,14 +85,16 @@ const EC_METHOD *EC_GFp_mont_method(void) ec_GFp_simple_point_set_to_infinity, ec_GFp_simple_set_Jprojective_coordinates_GFp, ec_GFp_simple_get_Jprojective_coordinates_GFp, - ec_GFp_simple_point_set_affine_coordinates_GFp, - ec_GFp_simple_point_get_affine_coordinates_GFp, - ec_GFp_simple_set_compressed_coordinates_GFp, + ec_GFp_simple_point_set_affine_coordinates, + ec_GFp_simple_point_get_affine_coordinates, + ec_GFp_simple_set_compressed_coordinates, ec_GFp_simple_point2oct, ec_GFp_simple_oct2point, ec_GFp_simple_add, ec_GFp_simple_dbl, ec_GFp_simple_invert, + 0 /* mul */, + 0 /* precompute_mult */, ec_GFp_simple_is_at_infinity, ec_GFp_simple_is_on_curve, ec_GFp_simple_cmp, @@ -91,6 +102,7 @@ const EC_METHOD *EC_GFp_mont_method(void) ec_GFp_simple_points_make_affine, ec_GFp_mont_field_mul, ec_GFp_mont_field_sqr, + 0 /* field_div */, ec_GFp_mont_field_encode, ec_GFp_mont_field_decode, ec_GFp_mont_field_set_to_one }; @@ -110,7 +122,7 @@ int ec_GFp_mont_group_init(EC_GROUP *group) } -int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) +int ec_GFp_mont_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) { BN_CTX *new_ctx = NULL; BN_MONT_CTX *mont = NULL; @@ -139,7 +151,7 @@ int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGN if (mont == NULL) goto err; if (!BN_MONT_CTX_set(mont, p, ctx)) { - ECerr(EC_F_GFP_MONT_GROUP_SET_CURVE_GFP, ERR_R_BN_LIB); + ECerr(EC_F_GFP_MONT_GROUP_SET_CURVE, ERR_R_BN_LIB); goto err; } one = BN_new(); @@ -151,7 +163,7 @@ int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGN group->field_data2 = one; one = NULL; - ret = ec_GFp_simple_group_set_curve_GFp(group, p, a, b, ctx); + ret = ec_GFp_simple_group_set_curve(group, p, a, b, ctx); if (!ret) { diff --git a/crypto/ec/ecp_nist.c b/crypto/ec/ecp_nist.c index 4e37c33cf3..b1c4024c2a 100644 --- a/crypto/ec/ecp_nist.c +++ b/crypto/ec/ecp_nist.c @@ -52,6 +52,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Portions of this software developed by SUN MICROSYSTEMS, INC., + * and contributed to the OpenSSL project. + */ #include "ec_lcl.h" @@ -63,8 +68,9 @@ const EC_METHOD *EC_GFp_nist_method(void) ec_GFp_nist_group_finish, ec_GFp_nist_group_clear_finish, ec_GFp_nist_group_copy, - ec_GFp_nist_group_set_curve_GFp, - ec_GFp_simple_group_get_curve_GFp, + ec_GFp_nist_group_set_curve, + ec_GFp_simple_group_get_curve, + ec_GFp_simple_group_get_degree, ec_GFp_simple_group_set_generator, ec_GFp_simple_group_get0_generator, ec_GFp_simple_group_get_order, @@ -77,14 +83,16 @@ const EC_METHOD *EC_GFp_nist_method(void) ec_GFp_simple_point_set_to_infinity, ec_GFp_simple_set_Jprojective_coordinates_GFp, ec_GFp_simple_get_Jprojective_coordinates_GFp, - ec_GFp_simple_point_set_affine_coordinates_GFp, - ec_GFp_simple_point_get_affine_coordinates_GFp, - ec_GFp_simple_set_compressed_coordinates_GFp, + ec_GFp_simple_point_set_affine_coordinates, + ec_GFp_simple_point_get_affine_coordinates, + ec_GFp_simple_set_compressed_coordinates, ec_GFp_simple_point2oct, ec_GFp_simple_oct2point, ec_GFp_simple_add, ec_GFp_simple_dbl, ec_GFp_simple_invert, + 0 /* mul */, + 0 /* precompute_mult */, ec_GFp_simple_is_at_infinity, ec_GFp_simple_is_on_curve, ec_GFp_simple_cmp, @@ -92,6 +100,7 @@ const EC_METHOD *EC_GFp_nist_method(void) ec_GFp_simple_points_make_affine, ec_GFp_nist_field_mul, ec_GFp_nist_field_sqr, + 0 /* field_div */, 0 /* field_encode */, 0 /* field_decode */, 0 /* field_set_to_one */ }; @@ -111,7 +120,7 @@ int ec_GFp_nist_group_init(EC_GROUP *group) } -int ec_GFp_nist_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); +int ec_GFp_nist_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* TODO */ diff --git a/crypto/ec/ecp_recp.c b/crypto/ec/ecp_recp.c index 54d3b83ec4..bf456dbc47 100644 --- a/crypto/ec/ecp_recp.c +++ b/crypto/ec/ecp_recp.c @@ -52,6 +52,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Portions of this software developed by SUN MICROSYSTEMS, INC., + * and contributed to the OpenSSL project. + */ #include "ec_lcl.h" @@ -63,8 +68,9 @@ const EC_METHOD *EC_GFp_recp_method(void) ec_GFp_recp_group_finish, ec_GFp_recp_group_clear_finish, ec_GFp_recp_group_copy, - ec_GFp_recp_group_set_curve_GFp, - ec_GFp_simple_group_get_curve_GFp, + ec_GFp_recp_group_set_curve, + ec_GFp_simple_group_get_curve, + ec_GFp_simple_group_get_degree, ec_GFp_simple_group_set_generator, ec_GFp_simple_group_get0_generator, ec_GFp_simple_group_get_order, @@ -77,14 +83,16 @@ const EC_METHOD *EC_GFp_recp_method(void) ec_GFp_simple_point_set_to_infinity, ec_GFp_simple_set_Jprojective_coordinates_GFp, ec_GFp_simple_get_Jprojective_coordinates_GFp, - ec_GFp_simple_point_set_affine_coordinates_GFp, - ec_GFp_simple_point_get_affine_coordinates_GFp, - ec_GFp_simple_set_compressed_coordinates_GFp, + ec_GFp_simple_point_set_affine_coordinates, + ec_GFp_simple_point_get_affine_coordinates, + ec_GFp_simple_set_compressed_coordinates, ec_GFp_simple_point2oct, ec_GFp_simple_oct2point, ec_GFp_simple_add, ec_GFp_simple_dbl, ec_GFp_simple_invert, + 0 /* mul */, + 0 /* precompute_mult */, ec_GFp_simple_is_at_infinity, ec_GFp_simple_is_on_curve, ec_GFp_simple_cmp, @@ -92,6 +100,7 @@ const EC_METHOD *EC_GFp_recp_method(void) ec_GFp_simple_points_make_affine, ec_GFp_recp_field_mul, ec_GFp_recp_field_sqr, + 0 /* field_div */, 0 /* field_encode */, 0 /* field_decode */, 0 /* field_set_to_one */ }; @@ -110,7 +119,7 @@ int ec_GFp_recp_group_init(EC_GROUP *group) } -int ec_GFp_recp_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); +int ec_GFp_recp_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* TODO */ diff --git a/crypto/ec/ecp_smpl.c b/crypto/ec/ecp_smpl.c index a453f4f451..97ff8eb61a 100644 --- a/crypto/ec/ecp_smpl.c +++ b/crypto/ec/ecp_smpl.c @@ -1,6 +1,8 @@ /* crypto/ec/ecp_smpl.c */ /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> - * for the OpenSSL project. */ + * for the OpenSSL project. + * Includes code written by Bodo Moeller for the OpenSSL project. +*/ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -54,6 +56,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Portions of this software developed by SUN MICROSYSTEMS, INC., + * and contributed to the OpenSSL project. + */ #include <openssl/err.h> #include <openssl/symhacks.h> @@ -68,8 +75,9 @@ const EC_METHOD *EC_GFp_simple_method(void) ec_GFp_simple_group_finish, ec_GFp_simple_group_clear_finish, ec_GFp_simple_group_copy, - ec_GFp_simple_group_set_curve_GFp, - ec_GFp_simple_group_get_curve_GFp, + ec_GFp_simple_group_set_curve, + ec_GFp_simple_group_get_curve, + ec_GFp_simple_group_get_degree, ec_GFp_simple_group_check_discriminant, ec_GFp_simple_point_init, ec_GFp_simple_point_finish, @@ -78,14 +86,16 @@ const EC_METHOD *EC_GFp_simple_method(void) ec_GFp_simple_point_set_to_infinity, ec_GFp_simple_set_Jprojective_coordinates_GFp, ec_GFp_simple_get_Jprojective_coordinates_GFp, - ec_GFp_simple_point_set_affine_coordinates_GFp, - ec_GFp_simple_point_get_affine_coordinates_GFp, - ec_GFp_simple_set_compressed_coordinates_GFp, + ec_GFp_simple_point_set_affine_coordinates, + ec_GFp_simple_point_get_affine_coordinates, + ec_GFp_simple_set_compressed_coordinates, ec_GFp_simple_point2oct, ec_GFp_simple_oct2point, ec_GFp_simple_add, ec_GFp_simple_dbl, ec_GFp_simple_invert, + 0 /* mul */, + 0 /* precompute_mult */, ec_GFp_simple_is_at_infinity, ec_GFp_simple_is_on_curve, ec_GFp_simple_cmp, @@ -93,6 +103,7 @@ const EC_METHOD *EC_GFp_simple_method(void) ec_GFp_simple_points_make_affine, ec_GFp_simple_field_mul, ec_GFp_simple_field_sqr, + 0 /* field_div */, 0 /* field_encode */, 0 /* field_decode */, 0 /* field_set_to_one */ }; @@ -139,7 +150,7 @@ int ec_GFp_simple_group_copy(EC_GROUP *dest, const EC_GROUP *src) } -int ec_GFp_simple_group_set_curve_GFp(EC_GROUP *group, +int ec_GFp_simple_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) { int ret = 0; @@ -149,7 +160,7 @@ int ec_GFp_simple_group_set_curve_GFp(EC_GROUP *group, /* p must be a prime > 3 */ if (BN_num_bits(p) <= 2 || !BN_is_odd(p)) { - ECerr(EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP, EC_R_INVALID_FIELD); + ECerr(EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE, EC_R_INVALID_FIELD); return 0; } @@ -194,7 +205,7 @@ int ec_GFp_simple_group_set_curve_GFp(EC_GROUP *group, } -int ec_GFp_simple_group_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) +int ec_GFp_simple_group_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) { int ret = 0; BN_CTX *new_ctx = NULL; @@ -245,6 +256,12 @@ int ec_GFp_simple_group_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM * } +int ec_GFp_simple_group_get_degree(const EC_GROUP *group) + { + return BN_num_bits(&group->field); + } + + int ec_GFp_simple_group_check_discriminant(const EC_GROUP *group, BN_CTX *ctx) { int ret = 0; @@ -470,13 +487,13 @@ int ec_GFp_simple_get_Jprojective_coordinates_GFp(const EC_GROUP *group, const E } -int ec_GFp_simple_point_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, +int ec_GFp_simple_point_set_affine_coordinates(const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx) { if (x == NULL || y == NULL) { /* unlike for projective coordinates, we do not tolerate this */ - ECerr(EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP, ERR_R_PASSED_NULL_PARAMETER); + ECerr(EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES, ERR_R_PASSED_NULL_PARAMETER); return 0; } @@ -484,7 +501,7 @@ int ec_GFp_simple_point_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POI } -int ec_GFp_simple_point_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point, +int ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *point, BIGNUM *x, BIGNUM *y, BN_CTX *ctx) { BN_CTX *new_ctx = NULL; @@ -494,7 +511,7 @@ int ec_GFp_simple_point_get_affine_coordinates_GFp(const EC_GROUP *group, const if (EC_POINT_is_at_infinity(group, point)) { - ECerr(EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP, EC_R_POINT_AT_INFINITY); + ECerr(EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES, EC_R_POINT_AT_INFINITY); return 0; } @@ -545,7 +562,7 @@ int ec_GFp_simple_point_get_affine_coordinates_GFp(const EC_GROUP *group, const { if (!BN_mod_inverse(Z_1, Z_, &group->field, ctx)) { - ECerr(EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP, ERR_R_BN_LIB); + ECerr(EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES, ERR_R_BN_LIB); goto err; } @@ -599,7 +616,7 @@ int ec_GFp_simple_point_get_affine_coordinates_GFp(const EC_GROUP *group, const } -int ec_GFp_simple_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, +int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *point, const BIGNUM *x_, int y_bit, BN_CTX *ctx) { BN_CTX *new_ctx = NULL; @@ -682,14 +699,12 @@ int ec_GFp_simple_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT if (ERR_GET_LIB(err) == ERR_LIB_BN && ERR_GET_REASON(err) == BN_R_NOT_A_SQUARE) { (void)ERR_get_error(); - ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP, EC_R_INVALID_COMPRESSED_POINT); + ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES, EC_R_INVALID_COMPRESSED_POINT); } else - ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP, ERR_R_BN_LIB); + ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES, ERR_R_BN_LIB); goto err; } - /* If tmp1 is not a square (i.e. there is no point on the curve with - * our x), then y now is a nonsense value too */ if (y_bit != BN_is_odd(y)) { @@ -701,16 +716,17 @@ int ec_GFp_simple_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT if (kron == -2) goto err; if (kron == 1) - ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP, EC_R_INVALID_COMPRESSION_BIT); + ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES, EC_R_INVALID_COMPRESSION_BIT); else - ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP, EC_R_INVALID_COMPRESSED_POINT); + /* BN_mod_sqrt() should have cought this error (not a square) */ + ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES, EC_R_INVALID_COMPRESSED_POINT); goto err; } if (!BN_usub(y, &group->field, y)) goto err; } if (y_bit != BN_is_odd(y)) { - ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP, ERR_R_INTERNAL_ERROR); + ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES, ERR_R_INTERNAL_ERROR); goto err; } diff --git a/crypto/ec/ectest.c b/crypto/ec/ectest.c index eab46cc080..adf7c94bdb 100644 --- a/crypto/ec/ectest.c +++ b/crypto/ec/ectest.c @@ -1,4 +1,7 @@ /* crypto/ec/ectest.c */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,32 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #include <stdio.h> #include <stdlib.h> @@ -67,6 +96,7 @@ int main(int argc, char * argv[]) { puts("Elliptic curves are disabled."); retur #include <openssl/ec.h> #include <openssl/engine.h> #include <openssl/err.h> +#include <openssl/obj_mac.h> #define ABORT do { \ fflush(stdout); \ @@ -75,42 +105,48 @@ int main(int argc, char * argv[]) { puts("Elliptic curves are disabled."); retur exit(1); \ } while (0) +void prime_field_tests(void); +void char2_field_tests(void); + #if 0 static void timings(EC_GROUP *group, int multi, BN_CTX *ctx) { clock_t clck; int i, j; - BIGNUM *s, *s0; + BIGNUM *s; + BIGNUM *r[10], *r0[10]; EC_POINT *P; s = BN_new(); - s0 = BN_new(); - if (s == NULL || s0 == NULL) ABORT; + if (s == NULL) ABORT; - if (!EC_GROUP_get_curve_GFp(group, s, NULL, NULL, ctx)) ABORT; - fprintf(stdout, "Timings for %d bit prime, ", (int)BN_num_bits(s)); + fprintf(stdout, "Timings for %d-bit field, ", EC_GROUP_get_degree(group)); if (!EC_GROUP_get_order(group, s, ctx)) ABORT; - fprintf(stdout, "%d bit scalars ", (int)BN_num_bits(s)); + fprintf(stdout, "%d-bit scalars ", (int)BN_num_bits(s)); fflush(stdout); P = EC_POINT_new(group); if (P == NULL) ABORT; EC_POINT_copy(P, EC_GROUP_get0_generator(group)); - clck = clock(); for (i = 0; i < 10; i++) { - if (!BN_pseudo_rand(s, BN_num_bits(s), 0, 0)) ABORT; + if ((r[i] = BN_new()) == NULL) ABORT; + if (!BN_pseudo_rand(r[i], BN_num_bits(s), 0, 0)) ABORT; if (multi) { - if (!BN_pseudo_rand(s0, BN_num_bits(s), 0, 0)) ABORT; + if ((r0[i] = BN_new()) == NULL) ABORT; + if (!BN_pseudo_rand(r0[i], BN_num_bits(s), 0, 0)) ABORT; } + } + + clck = clock(); + for (i = 0; i < 10; i++) + { for (j = 0; j < 10; j++) { - if (!EC_POINT_mul(group, P, s, multi ? P : NULL, multi ? s0 : NULL, ctx)) ABORT; + if (!EC_POINT_mul(group, P, r[i], multi ? P : NULL, multi ? r0[i] : NULL, ctx)) ABORT; } - fprintf(stdout, "."); - fflush(stdout); } fprintf(stdout, "\n"); @@ -136,11 +172,15 @@ static void timings(EC_GROUP *group, int multi, BN_CTX *ctx) EC_POINT_free(P); BN_free(s); - BN_free(s0); + for (i = 0; i < 10; i++) + { + BN_free(r[i]); + if (multi) BN_free(r0[i]); + } } #endif -int main(int argc, char *argv[]) +void prime_field_tests() { BN_CTX *ctx = NULL; BIGNUM *p, *a, *b; @@ -152,20 +192,6 @@ int main(int argc, char *argv[]) size_t i, len; int k; - /* enable memory leak checking unless explicitly disabled */ - if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))) - { - CRYPTO_malloc_debug_init(); - CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); - } - else - { - /* OPENSSL_DEBUG_MEMORY=off */ - CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0); - } - CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); - ERR_load_crypto_strings(); - #if 1 /* optional */ ctx = BN_CTX_new(); if (!ctx) ABORT; @@ -333,6 +359,10 @@ int main(int argc, char *argv[]) /* G_y value taken from the standard: */ if (!BN_hex2bn(&z, "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811")) ABORT; if (0 != BN_cmp(y, z)) ABORT; + + fprintf(stdout, "verify degree ..."); + if (EC_GROUP_get_degree(group) != 192) ABORT; + fprintf(stdout, " ok\n"); fprintf(stdout, "verify group order ..."); fflush(stdout); @@ -374,6 +404,10 @@ int main(int argc, char *argv[]) if (!BN_hex2bn(&z, "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34")) ABORT; if (0 != BN_cmp(y, z)) ABORT; + fprintf(stdout, "verify degree ..."); + if (EC_GROUP_get_degree(group) != 224) ABORT; + fprintf(stdout, " ok\n"); + fprintf(stdout, "verify group order ..."); fflush(stdout); if (!EC_GROUP_get_order(group, z, ctx)) ABORT; @@ -415,6 +449,10 @@ int main(int argc, char *argv[]) if (!BN_hex2bn(&z, "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5")) ABORT; if (0 != BN_cmp(y, z)) ABORT; + fprintf(stdout, "verify degree ..."); + if (EC_GROUP_get_degree(group) != 256) ABORT; + fprintf(stdout, " ok\n"); + fprintf(stdout, "verify group order ..."); fflush(stdout); if (!EC_GROUP_get_order(group, z, ctx)) ABORT; @@ -461,6 +499,10 @@ int main(int argc, char *argv[]) "7CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F")) ABORT; if (0 != BN_cmp(y, z)) ABORT; + fprintf(stdout, "verify degree ..."); + if (EC_GROUP_get_degree(group) != 384) ABORT; + fprintf(stdout, " ok\n"); + fprintf(stdout, "verify group order ..."); fflush(stdout); if (!EC_GROUP_get_order(group, z, ctx)) ABORT; @@ -513,6 +555,10 @@ int main(int argc, char *argv[]) "7086A272C24088BE94769FD16650")) ABORT; if (0 != BN_cmp(y, z)) ABORT; + fprintf(stdout, "verify degree ..."); + if (EC_GROUP_get_degree(group) != 521) ABORT; + fprintf(stdout, " ok\n"); + fprintf(stdout, "verify group order ..."); fflush(stdout); if (!EC_GROUP_get_order(group, z, ctx)) ABORT; @@ -623,6 +669,514 @@ int main(int argc, char *argv[]) if (P_384) EC_GROUP_free(P_384); if (P_521) EC_GROUP_free(P_521); + } + +/* Change test based on whether binary point compression is enabled or not. */ +#ifdef OPENSSL_EC_BIN_PT_COMP +#define CHAR2_CURVE_TEST_INTERNAL(_name, _p, _a, _b, _x, _y, _y_bit, _order, _cof, _degree, _variable) \ + if (!BN_hex2bn(&x, _x)) ABORT; \ + if (!EC_POINT_set_compressed_coordinates_GF2m(group, P, x, _y_bit, ctx)) ABORT; \ + if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT; \ + if (!BN_hex2bn(&z, _order)) ABORT; \ + if (!BN_hex2bn(&cof, _cof)) ABORT; \ + if (!EC_GROUP_set_generator(group, P, z, cof)) ABORT; \ + if (!EC_POINT_get_affine_coordinates_GF2m(group, P, x, y, ctx)) ABORT; \ + fprintf(stdout, "\n%s -- Generator:\n x = 0x", _name); \ + BN_print_fp(stdout, x); \ + fprintf(stdout, "\n y = 0x"); \ + BN_print_fp(stdout, y); \ + fprintf(stdout, "\n"); \ + /* G_y value taken from the standard: */ \ + if (!BN_hex2bn(&z, _y)) ABORT; \ + if (0 != BN_cmp(y, z)) ABORT; +#else +#define CHAR2_CURVE_TEST_INTERNAL(_name, _p, _a, _b, _x, _y, _y_bit, _order, _cof, _degree, _variable) \ + if (!BN_hex2bn(&x, _x)) ABORT; \ + if (!BN_hex2bn(&y, _y)) ABORT; \ + if (!EC_POINT_set_affine_coordinates_GF2m(group, P, x, y, ctx)) ABORT; \ + if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT; \ + if (!BN_hex2bn(&z, _order)) ABORT; \ + if (!BN_hex2bn(&cof, _cof)) ABORT; \ + if (!EC_GROUP_set_generator(group, P, z, cof)) ABORT; \ + fprintf(stdout, "\n%s -- Generator:\n x = 0x", _name); \ + BN_print_fp(stdout, x); \ + fprintf(stdout, "\n y = 0x"); \ + BN_print_fp(stdout, y); \ + fprintf(stdout, "\n"); +#endif + +#define CHAR2_CURVE_TEST(_name, _p, _a, _b, _x, _y, _y_bit, _order, _cof, _degree, _variable) \ + if (!BN_hex2bn(&p, _p)) ABORT; \ + if (!BN_hex2bn(&a, _a)) ABORT; \ + if (!BN_hex2bn(&b, _b)) ABORT; \ + if (!EC_GROUP_set_curve_GF2m(group, p, a, b, ctx)) ABORT; \ + CHAR2_CURVE_TEST_INTERNAL(_name, _p, _a, _b, _x, _y, _y_bit, _order, _cof, _degree, _variable) \ + fprintf(stdout, "verify degree ..."); \ + if (EC_GROUP_get_degree(group) != _degree) ABORT; \ + fprintf(stdout, " ok\n"); \ + fprintf(stdout, "verify group order ..."); \ + fflush(stdout); \ + if (!EC_GROUP_get_order(group, z, ctx)) ABORT; \ + if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; \ + if (!EC_POINT_is_at_infinity(group, Q)) ABORT; \ + fprintf(stdout, "."); \ + fflush(stdout); \ + if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; \ + if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; \ + if (!EC_POINT_is_at_infinity(group, Q)) ABORT; \ + fprintf(stdout, " ok\n"); \ + if (!(_variable = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT; \ + if (!EC_GROUP_copy(_variable, group)) ABORT; + +void char2_field_tests() + { + BN_CTX *ctx = NULL; + BIGNUM *p, *a, *b; + EC_GROUP *group; + EC_GROUP *C2_K163 = NULL, *C2_K233 = NULL, *C2_K283 = NULL, *C2_K409 = NULL, *C2_K571 = NULL; + EC_GROUP *C2_B163 = NULL, *C2_B233 = NULL, *C2_B283 = NULL, *C2_B409 = NULL, *C2_B571 = NULL; + EC_POINT *P, *Q, *R; + BIGNUM *x, *y, *z, *cof; + unsigned char buf[100]; + size_t i, len; + int k; + +#if 1 /* optional */ + ctx = BN_CTX_new(); + if (!ctx) ABORT; +#endif + + p = BN_new(); + a = BN_new(); + b = BN_new(); + if (!p || !a || !b) ABORT; + + if (!BN_hex2bn(&p, "13")) ABORT; + if (!BN_hex2bn(&a, "3")) ABORT; + if (!BN_hex2bn(&b, "1")) ABORT; + + group = EC_GROUP_new(EC_GF2m_simple_method()); /* applications should use EC_GROUP_new_curve_GF2m + * so that the library gets to choose the EC_METHOD */ + if (!group) ABORT; + if (!EC_GROUP_set_curve_GF2m(group, p, a, b, ctx)) ABORT; + + { + EC_GROUP *tmp; + tmp = EC_GROUP_new(EC_GROUP_method_of(group)); + if (!tmp) ABORT; + if (!EC_GROUP_copy(tmp, group)); + EC_GROUP_free(group); + group = tmp; + } + + if (!EC_GROUP_get_curve_GF2m(group, p, a, b, ctx)) ABORT; + + fprintf(stdout, "Curve defined by Weierstrass equation\n y^2 + x*y = x^3 + a*x^2 + b (mod 0x"); + BN_print_fp(stdout, p); + fprintf(stdout, ")\n a = 0x"); + BN_print_fp(stdout, a); + fprintf(stdout, "\n b = 0x"); + BN_print_fp(stdout, b); + fprintf(stdout, "\n(0x... means binary polynomial)\n"); + + P = EC_POINT_new(group); + Q = EC_POINT_new(group); + R = EC_POINT_new(group); + if (!P || !Q || !R) ABORT; + + if (!EC_POINT_set_to_infinity(group, P)) ABORT; + if (!EC_POINT_is_at_infinity(group, P)) ABORT; + + buf[0] = 0; + if (!EC_POINT_oct2point(group, Q, buf, 1, ctx)) ABORT; + + if (!EC_POINT_add(group, P, P, Q, ctx)) ABORT; + if (!EC_POINT_is_at_infinity(group, P)) ABORT; + + x = BN_new(); + y = BN_new(); + z = BN_new(); + cof = BN_new(); + if (!x || !y || !z || !cof) ABORT; + + if (!BN_hex2bn(&x, "6")) ABORT; +/* Change test based on whether binary point compression is enabled or not. */ +#ifdef OPENSSL_EC_BIN_PT_COMP + if (!EC_POINT_set_compressed_coordinates_GF2m(group, Q, x, 1, ctx)) ABORT; +#else + if (!BN_hex2bn(&y, "8")) ABORT; + if (!EC_POINT_set_affine_coordinates_GF2m(group, Q, x, y, ctx)) ABORT; +#endif + if (!EC_POINT_is_on_curve(group, Q, ctx)) + { +/* Change test based on whether binary point compression is enabled or not. */ +#ifdef OPENSSL_EC_BIN_PT_COMP + if (!EC_POINT_get_affine_coordinates_GF2m(group, Q, x, y, ctx)) ABORT; +#endif + fprintf(stderr, "Point is not on curve: x = 0x"); + BN_print_fp(stderr, x); + fprintf(stderr, ", y = 0x"); + BN_print_fp(stderr, y); + fprintf(stderr, "\n"); + ABORT; + } + + fprintf(stdout, "A cyclic subgroup:\n"); + k = 100; + do + { + if (k-- == 0) ABORT; + + if (EC_POINT_is_at_infinity(group, P)) + fprintf(stdout, " point at infinity\n"); + else + { + if (!EC_POINT_get_affine_coordinates_GF2m(group, P, x, y, ctx)) ABORT; + + fprintf(stdout, " x = 0x"); + BN_print_fp(stdout, x); + fprintf(stdout, ", y = 0x"); + BN_print_fp(stdout, y); + fprintf(stdout, "\n"); + } + + if (!EC_POINT_copy(R, P)) ABORT; + if (!EC_POINT_add(group, P, P, Q, ctx)) ABORT; + } + while (!EC_POINT_is_at_infinity(group, P)); + + if (!EC_POINT_add(group, P, Q, R, ctx)) ABORT; + if (!EC_POINT_is_at_infinity(group, P)) ABORT; + +/* Change test based on whether binary point compression is enabled or not. */ +#ifdef OPENSSL_EC_BIN_PT_COMP + len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_COMPRESSED, buf, sizeof buf, ctx); + if (len == 0) ABORT; + if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT; + if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT; + fprintf(stdout, "Generator as octet string, compressed form:\n "); + for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]); +#endif + + len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_UNCOMPRESSED, buf, sizeof buf, ctx); + if (len == 0) ABORT; + if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT; + if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT; + fprintf(stdout, "\nGenerator as octet string, uncompressed form:\n "); + for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]); + +/* Change test based on whether binary point compression is enabled or not. */ +#ifdef OPENSSL_EC_BIN_PT_COMP + len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_HYBRID, buf, sizeof buf, ctx); + if (len == 0) ABORT; + if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT; + if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT; + fprintf(stdout, "\nGenerator as octet string, hybrid form:\n "); + for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]); +#endif + + fprintf(stdout, "\n"); + + if (!EC_POINT_invert(group, P, ctx)) ABORT; + if (0 != EC_POINT_cmp(group, P, R, ctx)) ABORT; + + + /* Curve K-163 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve K-163", + "0800000000000000000000000000000000000000C9", + "1", + "1", + "02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8", + "0289070FB05D38FF58321F2E800536D538CCDAA3D9", + 1, + "04000000000000000000020108A2E0CC0D99F8A5EF", + "2", + 163, + C2_K163 + ); + + /* Curve B-163 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve B-163", + "0800000000000000000000000000000000000000C9", + "1", + "020A601907B8C953CA1481EB10512F78744A3205FD", + "03F0EBA16286A2D57EA0991168D4994637E8343E36", + "00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1", + 1, + "040000000000000000000292FE77E70C12A4234C33", + "2", + 163, + C2_B163 + ); + + /* Curve K-233 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve K-233", + "020000000000000000000000000000000000000004000000000000000001", + "0", + "1", + "017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126", + "01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3", + 0, + "008000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF", + "4", + 233, + C2_K233 + ); + + /* Curve B-233 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve B-233", + "020000000000000000000000000000000000000004000000000000000001", + "000000000000000000000000000000000000000000000000000000000001", + "0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD", + "00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B", + "01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052", + 1, + "01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7", + "2", + 233, + C2_B233 + ); + + /* Curve K-283 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve K-283", + "0800000000000000000000000000000000000000000000000000000000000000000010A1", + "0", + "1", + "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836", + "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259", + 0, + "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61", + "4", + 283, + C2_K283 + ); + + /* Curve B-283 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve B-283", + "0800000000000000000000000000000000000000000000000000000000000000000010A1", + "000000000000000000000000000000000000000000000000000000000000000000000001", + "027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E313B79A2F5", + "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053", + "03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4", + 1, + "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7CEFADB307", + "2", + 283, + C2_B283 + ); + + /* Curve K-409 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve K-409", + "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001", + "0", + "1", + "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746", + "01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B", + 1, + "007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF", + "4", + 409, + C2_K409 + ); + + /* Curve B-409 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve B-409", + "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001", + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F", + "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7", + "0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706", + 1, + "010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173", + "2", + 409, + C2_B409 + ); + + /* Curve K-571 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve K-571", + "80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425", + "0", + "1", + "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972", + "0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3", + 0, + "020000000000000000000000000000000000000000000000000000000000000000000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB45CFE778F637C1001", + "4", + 571, + C2_K571 + ); + + /* Curve B-571 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve B-571", + "80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425", + "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A", + "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19", + "037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B", + 1, + "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47", + "2", + 571, + C2_B571 + ); + + /* more tests using the last curve */ + + if (!EC_POINT_copy(Q, P)) ABORT; + if (EC_POINT_is_at_infinity(group, Q)) ABORT; + if (!EC_POINT_dbl(group, P, P, ctx)) ABORT; + if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT; + if (!EC_POINT_invert(group, Q, ctx)) ABORT; /* P = -2Q */ + + if (!EC_POINT_add(group, R, P, Q, ctx)) ABORT; + if (!EC_POINT_add(group, R, R, Q, ctx)) ABORT; + if (!EC_POINT_is_at_infinity(group, R)) ABORT; /* R = P + 2Q */ + + { + const EC_POINT *points[3]; + const BIGNUM *scalars[3]; + + if (EC_POINT_is_at_infinity(group, Q)) ABORT; + points[0] = Q; + points[1] = Q; + points[2] = Q; + + if (!BN_add(y, z, BN_value_one())) ABORT; + if (BN_is_odd(y)) ABORT; + if (!BN_rshift1(y, y)) ABORT; + scalars[0] = y; /* (group order + 1)/2, so y*Q + y*Q = Q */ + scalars[1] = y; + + fprintf(stdout, "combined multiplication ..."); + fflush(stdout); + + /* z is still the group order */ + if (!EC_POINTs_mul(group, P, NULL, 2, points, scalars, ctx)) ABORT; + if (!EC_POINTs_mul(group, R, z, 2, points, scalars, ctx)) ABORT; + if (0 != EC_POINT_cmp(group, P, R, ctx)) ABORT; + if (0 != EC_POINT_cmp(group, R, Q, ctx)) ABORT; + + fprintf(stdout, "."); + fflush(stdout); + + if (!BN_pseudo_rand(y, BN_num_bits(y), 0, 0)) ABORT; + if (!BN_add(z, z, y)) ABORT; + z->neg = 1; + scalars[0] = y; + scalars[1] = z; /* z = -(order + y) */ + + if (!EC_POINTs_mul(group, P, NULL, 2, points, scalars, ctx)) ABORT; + if (!EC_POINT_is_at_infinity(group, P)) ABORT; + + fprintf(stdout, "."); + fflush(stdout); + + if (!BN_pseudo_rand(x, BN_num_bits(y) - 1, 0, 0)) ABORT; + if (!BN_add(z, x, y)) ABORT; + z->neg = 1; + scalars[0] = x; + scalars[1] = y; + scalars[2] = z; /* z = -(x+y) */ + + if (!EC_POINTs_mul(group, P, NULL, 3, points, scalars, ctx)) ABORT; + if (!EC_POINT_is_at_infinity(group, P)) ABORT; + + fprintf(stdout, " ok\n\n"); + } + + +#if 0 + timings(C2_K163, 0, ctx); + timings(C2_K163, 1, ctx); + timings(C2_B163, 0, ctx); + timings(C2_B163, 1, ctx); + timings(C2_K233, 0, ctx); + timings(C2_K233, 1, ctx); + timings(C2_B233, 0, ctx); + timings(C2_B233, 1, ctx); + timings(C2_K283, 0, ctx); + timings(C2_K283, 1, ctx); + timings(C2_B283, 0, ctx); + timings(C2_B283, 1, ctx); + timings(C2_K409, 0, ctx); + timings(C2_K409, 1, ctx); + timings(C2_B409, 0, ctx); + timings(C2_B409, 1, ctx); + timings(C2_K571, 0, ctx); + timings(C2_K571, 1, ctx); + timings(C2_B571, 0, ctx); + timings(C2_B571, 1, ctx); +#endif + + + if (ctx) + BN_CTX_free(ctx); + BN_free(p); BN_free(a); BN_free(b); + EC_GROUP_free(group); + EC_POINT_free(P); + EC_POINT_free(Q); + EC_POINT_free(R); + BN_free(x); BN_free(y); BN_free(z); BN_free(cof); + + if (C2_K163) EC_GROUP_free(C2_K163); + if (C2_B163) EC_GROUP_free(C2_B163); + if (C2_K233) EC_GROUP_free(C2_K233); + if (C2_B233) EC_GROUP_free(C2_B233); + if (C2_K283) EC_GROUP_free(C2_K283); + if (C2_B283) EC_GROUP_free(C2_B283); + if (C2_K409) EC_GROUP_free(C2_K409); + if (C2_B409) EC_GROUP_free(C2_B409); + if (C2_K571) EC_GROUP_free(C2_K571); + if (C2_B571) EC_GROUP_free(C2_B571); + + } + +static const char rnd_seed[] = "string to make the random number generator think it has entropy"; + +int main(int argc, char *argv[]) + { + + /* enable memory leak checking unless explicitly disabled */ + if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))) + { + CRYPTO_malloc_debug_init(); + CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); + } + else + { + /* OPENSSL_DEBUG_MEMORY=off */ + CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0); + } + CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); + ERR_load_crypto_strings(); + + RAND_seed(rnd_seed, sizeof rnd_seed); /* or BN_generate_prime may fail */ + + prime_field_tests(); + puts(""); + char2_field_tests(); + ENGINE_cleanup(); CRYPTO_cleanup_all_ex_data(); ERR_free_strings(); diff --git a/crypto/ecdsa/Makefile.ssl b/crypto/ecdsa/Makefile.ssl index 85049bc39b..35e42803a9 100644 --- a/crypto/ecdsa/Makefile.ssl +++ b/crypto/ecdsa/Makefile.ssl @@ -23,11 +23,9 @@ TEST=ecdsatest.c APPS= LIB=$(TOP)/libcrypto.a -LIBSRC= ecs_lib.c ecs_gen.c ecs_asn1.c ecs_ossl.c ecs_sign.c ecs_vrf.c \ - ecs_key.c ecs_err.c +LIBSRC= ecs_lib.c ecs_asn1.c ecs_ossl.c ecs_sign.c ecs_vrf.c ecs_err.c -LIBOBJ= ecs_lib.o ecs_gen.o ecs_asn1.o ecs_ossl.o ecs_sign.o ecs_vrf.o \ - ecs_key.o ecs_err.o +LIBOBJ= ecs_lib.o ecs_asn1.o ecs_ossl.o ecs_sign.o ecs_vrf.o ecs_err.o SRC= $(LIBSRC) @@ -82,80 +80,63 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. -ecs_asn1.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ecs_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ecs_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +ecs_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h ecs_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h ecs_asn1.o: ../../include/openssl/ec.h ../../include/openssl/err.h ecs_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h ecs_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ecs_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h ecdsa.h ecs_asn1.c -ecs_err.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -ecs_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -ecs_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -ecs_err.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -ecs_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h -ecs_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -ecs_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h -ecs_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -ecs_err.o: ecs_err.c -ecs_gen.o: ecs_gen.c -ecs_key.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_key.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ecs_key.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ecs_key.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -ecs_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -ecs_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h -ecs_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -ecs_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h -ecs_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -ecs_key.o: ../cryptlib.h ecs_key.c -ecs_lib.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ecs_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ecs_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -ecs_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ecs_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ecs_asn1.o: ../../include/openssl/symhacks.h ecdsa.h ecs_asn1.c +ecs_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ecs_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_err.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +ecs_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ecs_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ecs_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ecs_err.o: ../../include/openssl/symhacks.h ecs_err.c +ecs_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_lib.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ecs_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ecs_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ecs_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h ecs_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h ecs_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h ecs_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ecs_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -ecs_lib.o: ../cryptlib.h ecdsa.h ecs_lib.c -ecs_ossl.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_ossl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ecs_ossl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ecs_ossl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -ecs_ossl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ecs_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h ecdsa.h +ecs_lib.o: ecs_lib.c +ecs_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_ossl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ecs_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h ecs_ossl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h -ecs_ossl.o: ../../include/openssl/opensslconf.h +ecs_ossl.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h ecs_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_ossl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ecs_ossl.o: ../../include/openssl/symhacks.h ../cryptlib.h ecs_ossl.c -ecs_sign.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_sign.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ecs_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ecs_sign.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -ecs_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ecs_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ecs_ossl.o: ../../include/openssl/symhacks.h ecdsa.h ecs_ossl.c +ecs_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_sign.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ecs_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ecs_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ecs_sign.o: ../../include/openssl/engine.h ../../include/openssl/err.h ecs_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h ecs_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_sign.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h ecs_sign.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ecs_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -ecs_sign.o: ../cryptlib.h ecs_sign.c -ecs_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -ecs_vrf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -ecs_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -ecs_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ecs_vrf.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ecs_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h ecdsa.h +ecs_sign.o: ecs_sign.c +ecs_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_vrf.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ecs_vrf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ecs_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_vrf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ecs_vrf.o: ../../include/openssl/engine.h ../../include/openssl/err.h ecs_vrf.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h ecs_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_vrf.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h ecs_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ecs_vrf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ecs_vrf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h ecdsa.h ecs_vrf.o: ecs_vrf.c diff --git a/crypto/ecdsa/ecdsa.h b/crypto/ecdsa/ecdsa.h index f9a34f14ae..d72d0b1363 100644 --- a/crypto/ecdsa/ecdsa.h +++ b/crypto/ecdsa/ecdsa.h @@ -59,22 +59,14 @@ #error ECDSA is disabled. #endif -#ifndef OPENSSL_NO_BIO -#include <openssl/bio.h> -#endif #include <openssl/bn.h> #include <openssl/ec.h> -#include <openssl/crypto.h> #include <openssl/ossl_typ.h> -#include <openssl/asn1.h> -#include <openssl/asn1t.h> #ifdef __cplusplus extern "C" { #endif -typedef struct ecdsa_st ECDSA; - typedef struct ECDSA_SIG_st { BIGNUM *r; @@ -84,111 +76,70 @@ typedef struct ECDSA_SIG_st typedef struct ecdsa_method { const char *name; - ECDSA_SIG *(*ecdsa_do_sign)(const unsigned char *dgst, int dgst_len, ECDSA *ecdsa); - int (*ecdsa_sign_setup)(ECDSA *ecdsa, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **r); - int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, ECDSA_SIG *sig, ECDSA *ecdsa); - int (*init)(ECDSA *ecdsa); - int (*finish)(ECDSA *ecdsa); + ECDSA_SIG *(*ecdsa_do_sign)(const unsigned char *dgst, int dgst_len, + EC_KEY *eckey); + int (*ecdsa_sign_setup)(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, + BIGNUM **r); + int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, + ECDSA_SIG *sig, EC_KEY *eckey); +#if 0 + int (*init)(EC_KEY *eckey); + int (*finish)(EC_KEY *eckey); +#endif int flags; char *app_data; } ECDSA_METHOD; -struct ecdsa_st -{ - int version; - point_conversion_form_t conversion_form; - - EC_GROUP *group; - - EC_POINT *pub_key; - BIGNUM *priv_key; - - BIGNUM *kinv; /* signing pre-calc */ - BIGNUM *r; /* signing pre-calc */ - - int references; +typedef struct ecdsa_data_st { + /* EC_KEY_METH_DATA part */ + int (*init)(EC_KEY *); + void (*finish)(EC_KEY *); + /* method specific part */ + BIGNUM *kinv; /* signing pre-calc */ + BIGNUM *r; /* signing pre-calc */ + ENGINE *engine; int flags; - CRYPTO_EX_DATA ex_data; const ECDSA_METHOD *meth; - struct engine_st *engine; -}; + CRYPTO_EX_DATA ex_data; +} ECDSA_DATA; +/* signature functions */ ECDSA_SIG *ECDSA_SIG_new(void); void ECDSA_SIG_free(ECDSA_SIG *a); int i2d_ECDSA_SIG(const ECDSA_SIG *a, unsigned char **pp); ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **v, const unsigned char **pp, long length); -ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len, ECDSA *ecdsa); -int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG *sig, ECDSA* ecdsa); -int ECDSA_generate_key(ECDSA *ecdsa); -int ECDSA_check_key(ECDSA *ecdsa); +/* ECDSA_DATA functions */ +ECDSA_DATA *ECDSA_DATA_new(void); +ECDSA_DATA *ECDSA_DATA_new_method(ENGINE *); +void ECDSA_DATA_free(ECDSA_DATA *); + +ECDSA_DATA *ecdsa_check(EC_KEY *); + +ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len, EC_KEY *); +int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG + *sig, EC_KEY* eckey); const ECDSA_METHOD *ECDSA_OpenSSL(void); void ECDSA_set_default_method(const ECDSA_METHOD *); const ECDSA_METHOD *ECDSA_get_default_method(void); -int ECDSA_set_method(ECDSA *, const ECDSA_METHOD *); - -ECDSA *ECDSA_new(void); -ECDSA *ECDSA_new_method(ENGINE *engine); -int ECDSA_size(const ECDSA *); -int ECDSA_sign_setup(ECDSA *ecdsa, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp); -int ECDSA_sign(int type, const unsigned char *dgst, int dgst_len, unsigned char *sig, - unsigned int *siglen, ECDSA *ecdsa); -int ECDSA_verify(int type, const unsigned char *dgst, int dgst_len, const unsigned char *sig, - int sig_len, ECDSA *ecdsa); -int ECDSA_up_ref(ECDSA *ecdsa); -void ECDSA_free(ECDSA *a); -int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int ECDSA_set_ex_data(ECDSA *d, int idx, void *arg); -void *ECDSA_get_ex_data(ECDSA *d, int idx); - -#ifndef OPENSSL_NO_BIO -int ECDSAParameters_print(BIO *bp, const ECDSA *x); -int ECDSA_print(BIO *bp, const ECDSA *x, int off); -#endif -#ifndef OPENSSL_NO_FP_API -int ECDSAParameters_print_fp(FILE *fp, const ECDSA *x); -int ECDSA_print_fp(FILE *fp, const ECDSA *x, int off); -#endif - -/* The ECDSA_{set|get}_conversion_type() functions set/get the - * conversion form for ec-points (see ec.h) in a ECDSA-structure */ -void ECDSA_set_conversion_form(ECDSA *, const point_conversion_form_t); -point_conversion_form_t ECDSA_get_conversion_form(const ECDSA *); -/* The ECDSA_{set|get}_default_conversion_form() functions set/get the - * default conversion form */ -void ECDSA_set_default_conversion_form(const point_conversion_form_t); -point_conversion_form_t ECDSA_get_default_conversion_form(void); - -/* the basic de- and encode functions ( see ecs_asn1.c ) */ -ECDSA *d2i_ECDSAParameters(ECDSA **a, const unsigned char **in, long len); -int i2d_ECDSAParameters(ECDSA *a, unsigned char **out); +int ECDSA_set_method(EC_KEY *, const ECDSA_METHOD *); -ECDSA *d2i_ECDSAPrivateKey(ECDSA **a, const unsigned char **in, long len); -int i2d_ECDSAPrivateKey(ECDSA *a, unsigned char **out); +int ECDSA_size(const EC_KEY *); +int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, + BIGNUM **rp); +int ECDSA_sign(int type, const unsigned char *dgst, int dgst_len, + unsigned char *sig, unsigned int *siglen, EC_KEY *eckey); +int ECDSA_verify(int type, const unsigned char *dgst, int dgst_len, + const unsigned char *sig, int sig_len, EC_KEY *eckey); -/* ECDSAPublicKey_set_octet_string() sets the public key in the ECDSA-structure. - * (*a) must be a pointer to a ECDSA-structure with (*a)->group not zero - * (e.g. a ECDSA-structure with a valid EC_GROUP-structure) */ -ECDSA *ECDSAPublicKey_set_octet_string(ECDSA **a, const unsigned char **in, long len); -/* ECDSAPublicKey_get_octet_string() returns the length of the octet string encoding - * of the public key. If out != NULL then the function returns in *out - * a pointer to the octet string */ -int ECDSAPublicKey_get_octet_string(ECDSA *a, unsigned char **out); +int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new + *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); +int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg); +void *ECDSA_get_ex_data(EC_KEY *d, int idx); -#define ECDSAParameters_dup(x) (ECDSA *)ASN1_dup((int (*)())i2d_ECDSAParameters, \ - (char *(*)())d2i_ECDSAParameters,(char *)(x)) -#define d2i_ECDSAParameters_fp(fp,x) (ECDSA *)ASN1_d2i_fp((char *(*)())ECDSA_new, \ - (char *(*)())d2i_ECDSAParameters,(fp),(unsigned char **)(x)) -#define i2d_ECDSAParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECDSAParameters,(fp), \ - (unsigned char *)(x)) -#define d2i_ECDSAParameters_bio(bp,x) (ECDSA *)ASN1_d2i_bio((char *(*)())ECDSA_new, \ - (char *(*)())d2i_ECDSAParameters,(bp),(unsigned char **)(x)) -#define i2d_ECDSAParameters_bio(bp,x) ASN1_i2d_bio(i2d_ECDSAParameters,(bp), \ - (unsigned char *)(x)) /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes @@ -199,72 +150,18 @@ void ERR_load_ECDSA_strings(void); /* Error codes for the ECDSA functions. */ /* Function codes. */ -#define ECDSA_F_D2I_ECDSAPARAMETERS 100 -#define ECDSA_F_D2I_ECDSAPRIVATEKEY 101 -#define ECDSA_F_ECDSAPARAMETERS_PRINT 102 -#define ECDSA_F_ECDSAPARAMETERS_PRINT_FP 103 -#define ECDSA_F_ECDSA_DO_SIGN 104 -#define ECDSA_F_ECDSA_DO_VERIFY 105 -#define ECDSA_F_ECDSA_GENERATE_KEY 106 -#define ECDSA_F_ECDSA_GET 107 -#define ECDSA_F_ECDSA_GET_CURVE_NID 120 -#define ECDSA_F_ECDSA_GET_ECDSA 121 -#define ECDSA_F_ECDSA_GET_EC_PARAMETERS 122 -#define ECDSA_F_ECDSA_GET_X9_62_CURVE 108 -#define ECDSA_F_ECDSA_GET_X9_62_EC_PARAMETERS 109 -#define ECDSA_F_ECDSA_GET_X9_62_FIELDID 110 -#define ECDSA_F_ECDSA_NEW 111 -#define ECDSA_F_ECDSA_PRINT 112 -#define ECDSA_F_ECDSA_PRINT_FP 113 -#define ECDSA_F_ECDSA_SET_GROUP_P 114 -#define ECDSA_F_ECDSA_SET_PRIME_GROUP 123 -#define ECDSA_F_ECDSA_SIGN_SETUP 115 -#define ECDSA_F_I2D_ECDSAPARAMETERS 116 -#define ECDSA_F_I2D_ECDSAPRIVATEKEY 117 -#define ECDSA_F_I2D_ECDSAPUBLICKEY 118 -#define ECDSA_F_SIG_CB 119 +#define ECDSA_F_ECDSA_DATA_NEW 100 +#define ECDSA_F_ECDSA_DO_SIGN 101 +#define ECDSA_F_ECDSA_DO_VERIFY 102 +#define ECDSA_F_ECDSA_SIGN_SETUP 103 /* Reason codes. */ #define ECDSA_R_BAD_SIGNATURE 100 -#define ECDSA_R_CAN_NOT_GET_GENERATOR 101 -#define ECDSA_R_D2I_ECDSAPRIVATEKEY_MISSING_PRIVATE_KEY 102 -#define ECDSA_R_D2I_ECDSA_PRIVATEKEY_FAILURE 103 -#define ECDSA_R_D2I_EC_PARAMETERS_FAILURE 133 -#define ECDSA_R_D2I_X9_62_EC_PARAMETERS_FAILURE 104 -#define ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 105 -#define ECDSA_R_ECDSAPRIVATEKEY_NEW_FAILURE 106 -#define ECDSA_R_ECDSA_F_ECDSA_NEW 107 -#define ECDSA_R_ECDSA_GET_EC_PARAMETERS_FAILURE 134 -#define ECDSA_R_ECDSA_GET_FAILURE 108 -#define ECDSA_R_ECDSA_GET_X9_62_CURVE_FAILURE 109 -#define ECDSA_R_ECDSA_GET_X9_62_EC_PARAMETERS_FAILURE 110 -#define ECDSA_R_ECDSA_GET_X9_62_FIELDID_FAILURE 111 -#define ECDSA_R_ECDSA_NEW_FAILURE 112 -#define ECDSA_R_ECDSA_R_D2I_EC_PARAMETERS_FAILURE 135 -#define ECDSA_R_ECDSA_R_D2I_X9_62_EC_PARAMETERS_FAILURE 113 -#define ECDSA_R_ECPARAMETERS2ECDSA_FAILURE 138 -#define ECDSA_R_EC_GROUP_NID2CURVE_FAILURE 136 -#define ECDSA_R_ERR_EC_LIB 114 -#define ECDSA_R_I2D_ECDSA_PRIVATEKEY 115 -#define ECDSA_R_I2D_ECDSA_PUBLICKEY 116 -#define ECDSA_R_MISSING_PARAMETERS 117 -#define ECDSA_R_MISSING_PRIVATE_KEY 139 -#define ECDSA_R_NOT_SUPPORTED 118 -#define ECDSA_R_NO_CURVE_PARAMETER_A_SPECIFIED 119 -#define ECDSA_R_NO_CURVE_PARAMETER_B_SPECIFIED 120 -#define ECDSA_R_NO_CURVE_SPECIFIED 121 -#define ECDSA_R_NO_FIELD_SPECIFIED 122 -#define ECDSA_R_PRIME_MISSING 123 -#define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED 124 -#define ECDSA_R_SIGNATURE_MALLOC_FAILED 125 -#define ECDSA_R_UNEXPECTED_ASN1_TYPE 126 -#define ECDSA_R_UNEXPECTED_PARAMETER 127 -#define ECDSA_R_UNEXPECTED_PARAMETER_LENGTH 128 -#define ECDSA_R_UNEXPECTED_VERSION_NUMER 129 -#define ECDSA_R_UNKNOWN_PARAMETERS_TYPE 137 -#define ECDSA_R_WRONG_FIELD_IDENTIFIER 130 -#define ECDSA_R_X9_62_CURVE_NEW_FAILURE 131 -#define ECDSA_R_X9_62_EC_PARAMETERS_NEW_FAILURE 132 +#define ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 101 +#define ECDSA_R_ERR_EC_LIB 102 +#define ECDSA_R_MISSING_PARAMETERS 103 +#define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED 104 +#define ECDSA_R_SIGNATURE_MALLOC_FAILED 105 #ifdef __cplusplus } diff --git a/crypto/ecdsa/ecdsatest.c b/crypto/ecdsa/ecdsatest.c index cffc194928..b410fd68af 100644 --- a/crypto/ecdsa/ecdsatest.c +++ b/crypto/ecdsa/ecdsatest.c @@ -52,6 +52,33 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -89,7 +116,16 @@ static const char rnd_seed[] = "string to make the random number generator think ECDSA_SIG* signatures[ECDSA_NIST_TESTS]; unsigned char digest[ECDSA_NIST_TESTS][20]; -void clear_ecdsa(ECDSA *ecdsa) +/* some declarations */ +void clear_ecdsa(EC_KEY *); +int set_p192_param(EC_KEY *); +int set_p239_param(EC_KEY *); +int test_sig_vrf(EC_KEY *, const unsigned char *); +int test_x962_sig_vrf(EC_KEY *, const unsigned char *, + const char *, const char *, const char *); +int ecdsa_cmp(const EC_KEY *, const EC_KEY *); + +void clear_ecdsa(EC_KEY *ecdsa) { if (!ecdsa) return; @@ -110,7 +146,7 @@ void clear_ecdsa(ECDSA *ecdsa) } } -int set_p192_param(ECDSA *ecdsa) +int set_p192_param(EC_KEY *ecdsa) { BN_CTX *ctx=NULL; int ret=0; @@ -143,7 +179,7 @@ err : if (ctx) BN_CTX_free(ctx); return ret; } -int set_p239_param(ECDSA *ecdsa) +int set_p239_param(EC_KEY *ecdsa) { BN_CTX *ctx=NULL; int ret=0; @@ -176,7 +212,7 @@ err : if (ctx) BN_CTX_free(ctx); return ret; } -int test_sig_vrf(ECDSA *ecdsa, const unsigned char* dgst) +int test_sig_vrf(EC_KEY *ecdsa, const unsigned char* dgst) { int ret=0,type=0; unsigned char *buffer=NULL; @@ -216,7 +252,7 @@ err: OPENSSL_free(buffer); return(ret == 1); } -int test_x962_sig_vrf(ECDSA *ecdsa, const unsigned char *dgst, +int test_x962_sig_vrf(EC_KEY *eckey, const unsigned char *dgst, const char *k_in, const char *r_in, const char *s_in) { int ret=0; @@ -225,23 +261,28 @@ int test_x962_sig_vrf(ECDSA *ecdsa, const unsigned char *dgst, BIGNUM *r=NULL,*s=NULL,*k=NULL,*x=NULL,*y=NULL,*m=NULL,*ord=NULL; BN_CTX *ctx=NULL; char *tmp_char=NULL; - - if (!ecdsa || !ecdsa->group || !ecdsa->pub_key || !ecdsa->priv_key) + ECDSA_DATA *ecdsa = ecdsa_check(eckey);; + + if (!eckey || !eckey->group || !eckey->pub_key || !eckey->priv_key + || !ecdsa) return 0; - if ((point = EC_POINT_new(ecdsa->group)) == NULL) goto err; - if ((r = BN_new()) == NULL || (s = BN_new()) == NULL || (k = BN_new()) == NULL || - (x = BN_new()) == NULL || (y = BN_new()) == NULL || (m = BN_new()) == NULL || - (ord = BN_new()) == NULL) goto err; + if ((point = EC_POINT_new(eckey->group)) == NULL) goto err; + if ((r = BN_new()) == NULL || (s = BN_new()) == NULL + || (k = BN_new()) == NULL || (x = BN_new()) == NULL || + (y = BN_new()) == NULL || (m = BN_new()) == NULL || + (ord = BN_new()) == NULL) goto err; if ((ctx = BN_CTX_new()) == NULL) goto err; if (!BN_bin2bn(dgst, 20, m)) goto err; if (!BN_dec2bn(&k, k_in)) goto err; - if (!EC_POINT_mul(ecdsa->group, point, k, NULL, NULL, ctx)) goto err; - if (!EC_POINT_get_affine_coordinates_GFp(ecdsa->group, point, x, y, ctx)) goto err; - if (!EC_GROUP_get_order(ecdsa->group, ord, ctx)) goto err; + if (!EC_POINT_mul(eckey->group, point, k, NULL, NULL, ctx)) goto err; + if (!EC_POINT_get_affine_coordinates_GFp(eckey->group, point, x, y, + ctx)) goto err; + if (!EC_GROUP_get_order(eckey->group, ord, ctx)) goto err; if ((ecdsa->r = BN_dup(x)) == NULL) goto err; - if ((ecdsa->kinv = BN_mod_inverse(NULL, k, ord, ctx)) == NULL) goto err; + if ((ecdsa->kinv = BN_mod_inverse(NULL, k, ord, ctx)) == NULL) + goto err; - if ((sig = ECDSA_do_sign(dgst, 20, ecdsa)) == NULL) + if ((sig = ECDSA_do_sign(dgst, 20, eckey)) == NULL) { BIO_printf(bio_err,"ECDSA_do_sign() failed \n"); goto err; @@ -260,7 +301,7 @@ int test_x962_sig_vrf(ECDSA *ecdsa, const unsigned char *dgst, BIO_printf(bio_err,"sig->s = %s\n",tmp_char); goto err; } - ret = ECDSA_do_verify(dgst, 20, sig, ecdsa); + ret = ECDSA_do_verify(dgst, 20, sig, eckey); if (ret != 1) { BIO_printf(bio_err,"ECDSA_do_verify : signature verification failed \n"); @@ -282,7 +323,7 @@ err : if (r) BN_free(r); return(ret == 1); } -int ecdsa_cmp(const ECDSA *a, const ECDSA *b) +int ecdsa_cmp(const EC_KEY *a, const EC_KEY *b) { int ret=1; BN_CTX *ctx=NULL; @@ -316,7 +357,7 @@ err: if (tmp_a1) BN_free(tmp_a1); int main(void) { - ECDSA *ecdsa=NULL, *ret_ecdsa=NULL; + EC_KEY *ecdsa=NULL, *ret_ecdsa=NULL; BIGNUM *d=NULL; X509_PUBKEY *x509_pubkey=NULL; PKCS8_PRIV_KEY_INFO *pkcs8=NULL; @@ -351,41 +392,41 @@ int main(void) RAND_seed(rnd_seed, sizeof(rnd_seed)); - if ((ecdsa = ECDSA_new()) == NULL) goto err; + if ((ecdsa = EC_KEY_new()) == NULL) goto err; set_p192_param(ecdsa); - ECDSA_print(bio_err, ecdsa, 0); + EC_KEY_print(bio_err, ecdsa, 0); /* en- decode tests */ - /* i2d_ - d2i_ECDSAParameters() */ + /* i2d_ - d2i_ECParameters() */ BIO_printf(bio_err, "\nTesting i2d_ - d2i_ECDSAParameters \n"); - buf_len = i2d_ECDSAParameters(ecdsa, NULL); + buf_len = i2d_ECParameters(ecdsa, NULL); if (!buf_len || (buffer = OPENSSL_malloc(buf_len)) == NULL) goto err; pp = buffer; - if (!i2d_ECDSAParameters(ecdsa, &pp)) goto err; + if (!i2d_ECParameters(ecdsa, &pp)) goto err; pp = buffer; - if ((ret_ecdsa = d2i_ECDSAParameters(&ret_ecdsa, (const unsigned char **)&pp, + if ((ret_ecdsa = d2i_ECParameters(&ret_ecdsa, (const unsigned char **)&pp, buf_len)) == NULL) goto err; - ECDSAParameters_print(bio_err, ret_ecdsa); + ECParameters_print(bio_err, ret_ecdsa); if (ecdsa_cmp(ecdsa, ret_ecdsa)) goto err; OPENSSL_free(buffer); buffer = NULL; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; - /* i2d_ - d2i_ECDSAPrivateKey() */ + /* i2d_ - d2i_ECPrivateKey() */ BIO_printf(bio_err, "\nTesting i2d_ - d2i_ECDSAPrivateKey \n"); - buf_len = i2d_ECDSAPrivateKey(ecdsa, NULL); + buf_len = i2d_ECPrivateKey(ecdsa, NULL); if (!buf_len || (buffer = OPENSSL_malloc(buf_len)) == NULL) goto err; pp = buffer; - if (!i2d_ECDSAPrivateKey(ecdsa, &pp)) goto err; + if (!i2d_ECPrivateKey(ecdsa, &pp)) goto err; pp = buffer; - if ((ret_ecdsa = d2i_ECDSAPrivateKey(&ret_ecdsa, (const unsigned char**)&pp, + if ((ret_ecdsa = d2i_ECPrivateKey(&ret_ecdsa, (const unsigned char**)&pp, buf_len)) == NULL) goto err; - ECDSA_print(bio_err, ret_ecdsa, 0); + EC_KEY_print(bio_err, ret_ecdsa, 0); if (ecdsa_cmp(ecdsa, ret_ecdsa)) goto err; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; OPENSSL_free(buffer); buffer = NULL; @@ -394,12 +435,12 @@ int main(void) BIO_printf(bio_err, "\nTesting X509_PUBKEY_{get,set} : "); if ((pkey = EVP_PKEY_new()) == NULL) goto err; - EVP_PKEY_assign_ECDSA(pkey, ecdsa); + EVP_PKEY_assign_EC_KEY(pkey, ecdsa); if ((x509_pubkey = X509_PUBKEY_new()) == NULL) goto err; if (!X509_PUBKEY_set(&x509_pubkey, pkey)) goto err; if ((ret_pkey = X509_PUBKEY_get(x509_pubkey)) == NULL) goto err; - ret_ecdsa = EVP_PKEY_get1_ECDSA(ret_pkey); + ret_ecdsa = EVP_PKEY_get1_EC_KEY(ret_pkey); EVP_PKEY_free(ret_pkey); ret_pkey = NULL; @@ -411,7 +452,7 @@ int main(void) else BIO_printf(bio_err, "TEST OK \n"); X509_PUBKEY_free(x509_pubkey); x509_pubkey = NULL; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; /* Testing PKCS8_PRIV_KEY_INFO <-> EVP_PKEY */ @@ -419,7 +460,7 @@ int main(void) BIO_printf(bio_err, "PKCS8_OK : "); if ((pkcs8 = EVP_PKEY2PKCS8_broken(pkey, PKCS8_OK)) == NULL) goto err; if ((ret_pkey = EVP_PKCS82PKEY(pkcs8)) == NULL) goto err; - ret_ecdsa = EVP_PKEY_get1_ECDSA(ret_pkey); + ret_ecdsa = EVP_PKEY_get1_EC_KEY(ret_pkey); if (ecdsa_cmp(ecdsa, ret_ecdsa)) { BIO_printf(bio_err, "TEST FAILED \n"); @@ -428,13 +469,13 @@ int main(void) else BIO_printf(bio_err, "TEST OK \n"); EVP_PKEY_free(ret_pkey); ret_pkey = NULL; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; PKCS8_PRIV_KEY_INFO_free(pkcs8); BIO_printf(bio_err, "PKCS8_NO_OCTET : "); if ((pkcs8 = EVP_PKEY2PKCS8_broken(pkey, PKCS8_NO_OCTET)) == NULL) goto err; if ((ret_pkey = EVP_PKCS82PKEY(pkcs8)) == NULL) goto err; - ret_ecdsa = EVP_PKEY_get1_ECDSA(ret_pkey); + ret_ecdsa = EVP_PKEY_get1_EC_KEY(ret_pkey); if (ecdsa_cmp(ecdsa, ret_ecdsa)) { BIO_printf(bio_err, "TEST FAILED \n"); @@ -443,13 +484,13 @@ int main(void) else BIO_printf(bio_err, "TEST OK \n"); EVP_PKEY_free(ret_pkey); ret_pkey = NULL; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; PKCS8_PRIV_KEY_INFO_free(pkcs8); BIO_printf(bio_err, "PKCS8_EMBEDDED_PARAM : "); if ((pkcs8 = EVP_PKEY2PKCS8_broken(pkey, PKCS8_EMBEDDED_PARAM)) == NULL) goto err; if ((ret_pkey = EVP_PKCS82PKEY(pkcs8)) == NULL) goto err; - ret_ecdsa = EVP_PKEY_get1_ECDSA(ret_pkey); + ret_ecdsa = EVP_PKEY_get1_EC_KEY(ret_pkey); if (ecdsa_cmp(ecdsa, ret_ecdsa)) { BIO_printf(bio_err, "TEST FAILED \n"); @@ -458,13 +499,13 @@ int main(void) else BIO_printf(bio_err, "TEST OK \n"); EVP_PKEY_free(ret_pkey); ret_pkey = NULL; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; PKCS8_PRIV_KEY_INFO_free(pkcs8); BIO_printf(bio_err, "PKCS8_NS_DB : "); if ((pkcs8 = EVP_PKEY2PKCS8_broken(pkey, PKCS8_NS_DB)) == NULL) goto err; if ((ret_pkey = EVP_PKCS82PKEY(pkcs8)) == NULL) goto err; - ret_ecdsa = EVP_PKEY_get1_ECDSA(ret_pkey); + ret_ecdsa = EVP_PKEY_get1_EC_KEY(ret_pkey); if (ecdsa_cmp(ecdsa, ret_ecdsa)) { BIO_printf(bio_err, "TEST FAILED \n"); @@ -473,7 +514,7 @@ int main(void) else BIO_printf(bio_err, "TEST OK \n"); EVP_PKEY_free(ret_pkey); ret_pkey = NULL; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; EVP_PKEY_free(pkey); pkey = NULL; @@ -492,7 +533,7 @@ int main(void) BIO_printf(bio_err, "Performing tests based on examples H.3.1 and H.3.2 of X9.62 \n"); BIO_printf(bio_err, "PRIME_192_V1 : "); - if ((ecdsa = ECDSA_new()) == NULL) goto err; + if ((ecdsa = EC_KEY_new()) == NULL) goto err; if (!set_p192_param(ecdsa)) goto err; if (!test_x962_sig_vrf(ecdsa, dgst, "6140507067065001063065065565667405560006161556565665656654", "3342403536405981729393488334694600415596881826869351677613", @@ -510,153 +551,68 @@ int main(void) else BIO_printf(bio_err, "OK\n"); - ECDSA_free(ecdsa); + EC_KEY_free(ecdsa); ecdsa = NULL; OPENSSL_free(dgst); dgst = NULL; - - /* NIST PRIME CURVES TESTS */ - /* EC_GROUP_NIST_PRIME_192 */ for (i=0; i<ECDSA_NIST_TESTS; i++) - if (!RAND_bytes(digest[i], 20)) goto err; - - BIO_printf(bio_err, "\nTesting sign & verify with NIST Prime-Curve P-192 : \n"); - ECDSA_free(ecdsa); - if ((ecdsa = ECDSA_new()) == NULL) goto err; - if ((ecdsa->group = EC_GROUP_new_by_name(EC_GROUP_NIST_PRIME_192)) == NULL) goto err; - if (!ECDSA_generate_key(ecdsa)) goto err; - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if ((signatures[i] = ECDSA_do_sign(digest[i], 20, ecdsa)) == NULL) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_sign() in %.2f"UNIT" => average time for ECDSA_do_sign() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d / ECDSA_NIST_TESTS); - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if (!ECDSA_do_verify(digest[i], 20, signatures[i], ecdsa)) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_verify() in %.2f"UNIT" => average time for ECDSA_do_verify() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d/ECDSA_NIST_TESTS); - for (i=0; i<ECDSA_NIST_TESTS; i++) - { - ECDSA_SIG_free(signatures[i]); - signatures[i] = NULL; - } - - /* EC_GROUP_NIST_PRIME_224 */ - BIO_printf(bio_err, "Testing sign & verify with NIST Prime-Curve P-224 : \n"); - ECDSA_free(ecdsa); - if ((ecdsa = ECDSA_new()) == NULL) goto err; - if ((ecdsa->group = EC_GROUP_new_by_name(EC_GROUP_NIST_PRIME_224)) == NULL) goto err; - if (!ECDSA_generate_key(ecdsa)) goto err; - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if ((signatures[i] = ECDSA_do_sign(digest[i], 20, ecdsa)) == NULL) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_sign() in %.2f"UNIT" => average time for ECDSA_do_sign() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d / ECDSA_NIST_TESTS); - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if (!ECDSA_do_verify(digest[i], 20, signatures[i], ecdsa)) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_verify() in %.2f"UNIT" => average time for ECDSA_do_verify() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d/ECDSA_NIST_TESTS); - for (i=0; i<ECDSA_NIST_TESTS; i++) - { - ECDSA_SIG_free(signatures[i]); - signatures[i] = NULL; + if (!RAND_bytes(digest[i], 20)) goto err; + + BIO_printf(bio_err, "\n"); + +/* Macro for each test */ +#define ECDSA_GROUP_TEST(text, curve) \ + BIO_printf(bio_err, "Testing sign & verify with %s : \n", text); \ + EC_KEY_free(ecdsa); \ + if ((ecdsa = EC_KEY_new()) == NULL) goto err; \ + if ((ecdsa->group = EC_GROUP_new_by_name(curve)) == NULL) goto err; \ + if (!EC_KEY_generate_key(ecdsa)) goto err; \ + tim = clock(); \ + for (i=0; i<ECDSA_NIST_TESTS; i++) \ + if ((signatures[i] = ECDSA_do_sign(digest[i], 20, ecdsa)) == NULL) goto err; \ + tim = clock() - tim; \ + tim_d = (double)tim / CLOCKS_PER_SEC; \ + BIO_printf(bio_err, "%d x ECDSA_do_sign() in %.2f"UNIT" => average time for ECDSA_do_sign() %.4f"UNIT"\n" \ + , ECDSA_NIST_TESTS, tim_d, tim_d / ECDSA_NIST_TESTS); \ + tim = clock(); \ + for (i=0; i<ECDSA_NIST_TESTS; i++) \ + if (!ECDSA_do_verify(digest[i], 20, signatures[i], ecdsa)) goto err; \ + tim = clock() - tim; \ + tim_d = (double)tim / CLOCKS_PER_SEC; \ + BIO_printf(bio_err, "%d x ECDSA_do_verify() in %.2f"UNIT" => average time for ECDSA_do_verify() %.4f"UNIT"\n" \ + , ECDSA_NIST_TESTS, tim_d, tim_d/ECDSA_NIST_TESTS); \ + for (i=0; i<ECDSA_NIST_TESTS; i++) \ + { \ + ECDSA_SIG_free(signatures[i]); \ + signatures[i] = NULL; \ } - - /* EC_GROUP_NIST_PRIME_256 */ - BIO_printf(bio_err, "Testing sign & verify with NIST Prime-Curve P-256 : \n"); - ECDSA_free(ecdsa); - if ((ecdsa = ECDSA_new()) == NULL) goto err; - if ((ecdsa->group = EC_GROUP_new_by_name(EC_GROUP_NIST_PRIME_256)) == NULL) goto err; - if (!ECDSA_generate_key(ecdsa)) goto err; - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if ((signatures[i] = ECDSA_do_sign(digest[i], 20, ecdsa)) == NULL) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_sign() in %.2f"UNIT" => average time for ECDSA_do_sign() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d / ECDSA_NIST_TESTS); - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if (!ECDSA_do_verify(digest[i], 20, signatures[i], ecdsa)) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_verify() in %.2f"UNIT" => average time for ECDSA_do_verify() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d/ECDSA_NIST_TESTS); - for (i=0; i<ECDSA_NIST_TESTS; i++) - { - ECDSA_SIG_free(signatures[i]); - signatures[i] = NULL; - } - - /* EC_GROUP_NIST_PRIME_384 */ - BIO_printf(bio_err, "Testing sign & verify with NIST Prime-Curve P-384 : \n"); - ECDSA_free(ecdsa); - if ((ecdsa = ECDSA_new()) == NULL) goto err; - if ((ecdsa->group = EC_GROUP_new_by_name(EC_GROUP_NIST_PRIME_384)) == NULL) goto err; - if (!ECDSA_generate_key(ecdsa)) goto err; - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if ((signatures[i] = ECDSA_do_sign(digest[i], 20, ecdsa)) == NULL) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_sign() in %.2f"UNIT" => average time for ECDSA_do_sign() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d / ECDSA_NIST_TESTS); - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if (!ECDSA_do_verify(digest[i], 20, signatures[i], ecdsa)) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_verify() in %.2f"UNIT" => average time for ECDSA_do_verify() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d/ECDSA_NIST_TESTS); - for (i=0; i<ECDSA_NIST_TESTS; i++) - { - ECDSA_SIG_free(signatures[i]); - signatures[i] = NULL; - } - - /* EC_GROUP_NIST_PRIME_521 */ - BIO_printf(bio_err, "Testing sign & verify with NIST Prime-Curve P-521 : \n"); - ECDSA_free(ecdsa); - if ((ecdsa = ECDSA_new()) == NULL) goto err; - if ((ecdsa->group = EC_GROUP_new_by_name(EC_GROUP_NIST_PRIME_521)) == NULL) goto err; - if (!ECDSA_generate_key(ecdsa)) goto err; - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if ((signatures[i] = ECDSA_do_sign(digest[i], 20, ecdsa)) == NULL) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_sign() in %.2f"UNIT" => average time for ECDSA_do_sign() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d / ECDSA_NIST_TESTS); - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if (!ECDSA_do_verify(digest[i], 20, signatures[i], ecdsa)) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_verify() in %.2f"UNIT" => average time for ECDSA_do_verify() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d/ECDSA_NIST_TESTS); - ECDSA_free(ecdsa); + + /* NIST PRIME CURVES TESTS */ + ECDSA_GROUP_TEST("NIST Prime-Curve P-192", EC_GROUP_NIST_PRIME_192); + ECDSA_GROUP_TEST("NIST Prime-Curve P-224", EC_GROUP_NIST_PRIME_224); + ECDSA_GROUP_TEST("NIST Prime-Curve P-256", EC_GROUP_NIST_PRIME_256); + ECDSA_GROUP_TEST("NIST Prime-Curve P-384", EC_GROUP_NIST_PRIME_384); + ECDSA_GROUP_TEST("NIST Prime-Curve P-521", EC_GROUP_NIST_PRIME_521); + /* NIST BINARY CURVES TESTS */ + ECDSA_GROUP_TEST("NIST Binary-Curve K-163", EC_GROUP_NIST_CHAR2_K163); + ECDSA_GROUP_TEST("NIST Binary-Curve B-163", EC_GROUP_NIST_CHAR2_B163); + ECDSA_GROUP_TEST("NIST Binary-Curve K-233", EC_GROUP_NIST_CHAR2_K233); + ECDSA_GROUP_TEST("NIST Binary-Curve B-233", EC_GROUP_NIST_CHAR2_B233); + ECDSA_GROUP_TEST("NIST Binary-Curve K-283", EC_GROUP_NIST_CHAR2_K283); + ECDSA_GROUP_TEST("NIST Binary-Curve B-283", EC_GROUP_NIST_CHAR2_B283); + ECDSA_GROUP_TEST("NIST Binary-Curve K-409", EC_GROUP_NIST_CHAR2_K409); + ECDSA_GROUP_TEST("NIST Binary-Curve B-409", EC_GROUP_NIST_CHAR2_B409); + ECDSA_GROUP_TEST("NIST Binary-Curve K-571", EC_GROUP_NIST_CHAR2_K571); + ECDSA_GROUP_TEST("NIST Binary-Curve B-571", EC_GROUP_NIST_CHAR2_B571); +#undef ECDSA_GROUP_TEST + + EC_KEY_free(ecdsa); ecdsa = NULL; - for (i=0; i<ECDSA_NIST_TESTS; i++) - { - ECDSA_SIG_free(signatures[i]); - signatures[i] = NULL; - } - OPENSSL_free(buffer); buffer = NULL; EVP_PKEY_free(pkey); pkey = NULL; - ecdsa = NULL; ret = 1; err: if (!ret) @@ -665,10 +621,11 @@ err: if (!ret) BIO_printf(bio_err, "TEST PASSED \n"); if (!ret) ERR_print_errors(bio_err); - if (ecdsa) ECDSA_free(ecdsa); + if (ecdsa) EC_KEY_free(ecdsa); if (d) BN_free(d); if (dgst) OPENSSL_free(dgst); if (md_ctx) EVP_MD_CTX_destroy(md_ctx); + if (pkey) EVP_PKEY_free(pkey); CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); ERR_free_strings(); diff --git a/crypto/ecdsa/ecs_asn1.c b/crypto/ecdsa/ecs_asn1.c index 38b27592bd..e9e1c2b51e 100644 --- a/crypto/ecdsa/ecs_asn1.c +++ b/crypto/ecdsa/ecs_asn1.c @@ -54,18 +54,9 @@ */ #include "ecdsa.h" -#include "cryptlib.h" -#include <openssl/asn1.h> +#include <openssl/err.h> #include <openssl/asn1t.h> -typedef struct ecdsa_priv_key_st { - int version; - ECPKPARAMETERS *parameters; - ASN1_OBJECT *named_curve; - ASN1_OCTET_STRING *pub_key; - BIGNUM *priv_key; - } ECDSAPrivateKey; - ASN1_SEQUENCE(ECDSA_SIG) = { ASN1_SIMPLE(ECDSA_SIG, r, CBIGNUM), ASN1_SIMPLE(ECDSA_SIG, s, CBIGNUM) @@ -74,283 +65,3 @@ ASN1_SEQUENCE(ECDSA_SIG) = { DECLARE_ASN1_FUNCTIONS_const(ECDSA_SIG) DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECDSA_SIG, ECDSA_SIG) IMPLEMENT_ASN1_FUNCTIONS_const(ECDSA_SIG) - -ASN1_SEQUENCE(ECDSAPrivateKey) = { - ASN1_SIMPLE(ECDSAPrivateKey, version, LONG), - ASN1_SIMPLE(ECDSAPrivateKey, parameters, ECPKPARAMETERS), - ASN1_SIMPLE(ECDSAPrivateKey, pub_key, ASN1_OCTET_STRING), - ASN1_SIMPLE(ECDSAPrivateKey, priv_key, BIGNUM) -} ASN1_SEQUENCE_END(ECDSAPrivateKey) - -DECLARE_ASN1_FUNCTIONS_const(ECDSAPrivateKey) -DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECDSAPrivateKey, ecdsaPrivateKey) -IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(ECDSAPrivateKey, ECDSAPrivateKey, ECDSAPrivateKey) -IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(ECDSAPrivateKey, ECDSAPrivateKey, ecdsaPrivateKey) - -int i2d_ECDSAParameters(ECDSA *a, unsigned char **out) - { - if (a == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPARAMETERS, - ERR_R_PASSED_NULL_PARAMETER); - return 0; - } - return i2d_ECPKParameters(a->group, out); - } - -ECDSA *d2i_ECDSAParameters(ECDSA **a, const unsigned char **in, long len) - { - EC_GROUP *group; - ECDSA *ret; - - if (in == NULL || *in == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPARAMETERS, - ERR_R_PASSED_NULL_PARAMETER); - return NULL; - } - - group = d2i_ECPKParameters(NULL, in, len); - - if (group == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPARAMETERS, - ERR_R_EC_LIB); - return NULL; - } - - if (a == NULL || *a == NULL) - { - if ((ret = ECDSA_new()) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPARAMETERS, - ERR_R_MALLOC_FAILURE); - return NULL; - } - if (a) - *a = ret; - } - else - ret = *a; - - if (ret->group) - EC_GROUP_clear_free(ret->group); - - ret->group = group; - - return ret; - } - -ECDSA *d2i_ECDSAPrivateKey(ECDSA **a, const unsigned char **in, long len) - { - int ok=0; - ECDSA *ret=NULL; - ECDSAPrivateKey *priv_key=NULL; - - if ((priv_key = ECDSAPrivateKey_new()) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ERR_R_MALLOC_FAILURE); - return NULL; - } - - if ((priv_key = d2i_ecdsaPrivateKey(&priv_key, in, len)) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, - ECDSA_R_D2I_ECDSA_PRIVATEKEY_FAILURE); - ECDSAPrivateKey_free(priv_key); - return NULL; - } - - if (a == NULL || *a == NULL) - { - if ((ret = ECDSA_new()) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, - ERR_R_MALLOC_FAILURE); - goto err; - } - if (a) - *a = ret; - } - else - ret = *a; - - if (ret->group) - EC_GROUP_clear_free(ret->group); - - ret->group = EC_ASN1_pkparameters2group(priv_key->parameters); - if (ret->group == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ERR_R_EC_LIB); - goto err; - } - - ret->version = priv_key->version; - if (priv_key->priv_key) - { - if ((ret->priv_key = BN_dup(priv_key->priv_key)) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, - ERR_R_BN_LIB); - goto err; - } - } - else - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, - ECDSA_R_MISSING_PRIVATE_KEY); - goto err; - } - - if ((ret->pub_key = EC_POINT_new(ret->group)) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ERR_R_EC_LIB); - goto err; - } - - if (!EC_POINT_oct2point(ret->group, ret->pub_key, - priv_key->pub_key->data, priv_key->pub_key->length, NULL)) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ERR_R_EC_LIB); - goto err; - } - - ok = 1; - -err : if (!ok) - { - if (ret) ECDSA_free(ret); - ret = NULL; - } - if (priv_key) - ECDSAPrivateKey_free(priv_key); - return(ret); -} - -int i2d_ECDSAPrivateKey(ECDSA *a, unsigned char **out) -{ - int ret=0, ok=0; - unsigned char *buffer=NULL; - size_t buf_len=0; - ECDSAPrivateKey *priv_key=NULL; - - if (a == NULL || a->group == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, - ERR_R_PASSED_NULL_PARAMETER); - goto err; - } - - if ((priv_key = ECDSAPrivateKey_new()) == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, - ERR_R_MALLOC_FAILURE); - goto err; - } - - if ((priv_key->parameters = EC_ASN1_group2pkparameters(a->group, - priv_key->parameters)) == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, ERR_R_EC_LIB); - goto err; - } - - priv_key->version = a->version; - - if (BN_copy(priv_key->priv_key, a->priv_key) == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, ERR_R_BN_LIB); - goto err; - } - - buf_len = EC_POINT_point2oct(a->group, a->pub_key, - ECDSA_get_conversion_form(a), NULL, 0, NULL); - if ((buffer = OPENSSL_malloc(buf_len)) == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, ERR_R_MALLOC_FAILURE); - goto err; - } - if (!EC_POINT_point2oct(a->group, a->pub_key, - ECDSA_get_conversion_form(a), buffer, buf_len, NULL)) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, ERR_R_EC_LIB); - goto err; - } - if (!M_ASN1_OCTET_STRING_set(priv_key->pub_key, buffer, buf_len)) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, ERR_R_ASN1_LIB); - goto err; - } - if ((ret = i2d_ecdsaPrivateKey(priv_key, out)) == 0) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, - ECDSA_R_I2D_ECDSA_PRIVATEKEY); - goto err; - } - ok=1; - -err: - if (buffer) - OPENSSL_free(buffer); - if (priv_key) - ECDSAPrivateKey_free(priv_key); - return(ok?ret:0); -} - - -ECDSA *ECDSAPublicKey_set_octet_string(ECDSA **a, const unsigned char **in, long len) -{ - ECDSA *ret=NULL; - - if (a == NULL || (*a) == NULL || (*a)->group == NULL) - { - /* sorry, but a EC_GROUP-structur is necessary - * to set the public key */ - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ECDSA_R_MISSING_PARAMETERS); - return 0; - } - ret = *a; - if (ret->pub_key == NULL && (ret->pub_key = EC_POINT_new(ret->group)) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ERR_R_MALLOC_FAILURE); - return 0; - } - if (!EC_POINT_oct2point(ret->group, ret->pub_key, *in, len, NULL)) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ERR_R_EC_LIB); - return 0; - } - ECDSA_set_conversion_form(ret, (point_conversion_form_t)(*in[0] & ~0x01)); - return ret; -} - -int ECDSAPublicKey_get_octet_string(ECDSA *a, unsigned char **out) -{ - size_t buf_len=0; - - if (a == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPUBLICKEY, ECDSA_R_MISSING_PARAMETERS); - return 0; - } - buf_len = EC_POINT_point2oct(a->group, a->pub_key, - ECDSA_get_conversion_form(a), NULL, 0, NULL); - if (out == NULL || buf_len == 0) - /* out == NULL => just return the length of the octet string */ - return buf_len; - if (*out == NULL) - if ((*out = OPENSSL_malloc(buf_len)) == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPUBLICKEY, ERR_R_MALLOC_FAILURE); - return 0; - } - if (!EC_POINT_point2oct(a->group, a->pub_key, ECDSA_get_conversion_form(a), - *out, buf_len, NULL)) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPUBLICKEY, ERR_R_EC_LIB); - OPENSSL_free(*out); - *out = NULL; - return 0; - } - return buf_len; -} diff --git a/crypto/ecdsa/ecs_err.c b/crypto/ecdsa/ecs_err.c index b8a9edd759..75c789448c 100644 --- a/crypto/ecdsa/ecs_err.c +++ b/crypto/ecdsa/ecs_err.c @@ -66,75 +66,21 @@ #ifndef OPENSSL_NO_ERR static ERR_STRING_DATA ECDSA_str_functs[]= { -{ERR_PACK(0,ECDSA_F_D2I_ECDSAPARAMETERS,0), "d2i_ECDSAParameters"}, -{ERR_PACK(0,ECDSA_F_D2I_ECDSAPRIVATEKEY,0), "d2i_ECDSAPrivateKey"}, -{ERR_PACK(0,ECDSA_F_ECDSAPARAMETERS_PRINT,0), "ECDSAParameters_print"}, -{ERR_PACK(0,ECDSA_F_ECDSAPARAMETERS_PRINT_FP,0), "ECDSAParameters_print_fp"}, +{ERR_PACK(0,ECDSA_F_ECDSA_DATA_NEW,0), "ECDSA_DATA_new"}, {ERR_PACK(0,ECDSA_F_ECDSA_DO_SIGN,0), "ECDSA_do_sign"}, {ERR_PACK(0,ECDSA_F_ECDSA_DO_VERIFY,0), "ECDSA_do_verify"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GENERATE_KEY,0), "ECDSA_generate_key"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET,0), "ECDSA_GET"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET_CURVE_NID,0), "ECDSA_GET_CURVE_NID"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET_ECDSA,0), "ECDSA_GET_ECDSA"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET_EC_PARAMETERS,0), "ECDSA_GET_EC_PARAMETERS"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET_X9_62_CURVE,0), "ECDSA_GET_X9_62_CURVE"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET_X9_62_EC_PARAMETERS,0), "ECDSA_GET_X9_62_EC_PARAMETERS"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET_X9_62_FIELDID,0), "ECDSA_GET_X9_62_FIELDID"}, -{ERR_PACK(0,ECDSA_F_ECDSA_NEW,0), "ECDSA_new"}, -{ERR_PACK(0,ECDSA_F_ECDSA_PRINT,0), "ECDSA_print"}, -{ERR_PACK(0,ECDSA_F_ECDSA_PRINT_FP,0), "ECDSA_print_fp"}, -{ERR_PACK(0,ECDSA_F_ECDSA_SET_GROUP_P,0), "ECDSA_SET_GROUP_P"}, -{ERR_PACK(0,ECDSA_F_ECDSA_SET_PRIME_GROUP,0), "ECDSA_SET_PRIME_GROUP"}, {ERR_PACK(0,ECDSA_F_ECDSA_SIGN_SETUP,0), "ECDSA_sign_setup"}, -{ERR_PACK(0,ECDSA_F_I2D_ECDSAPARAMETERS,0), "i2d_ECDSAParameters"}, -{ERR_PACK(0,ECDSA_F_I2D_ECDSAPRIVATEKEY,0), "i2d_ECDSAPrivateKey"}, -{ERR_PACK(0,ECDSA_F_I2D_ECDSAPUBLICKEY,0), "I2D_ECDSAPUBLICKEY"}, -{ERR_PACK(0,ECDSA_F_SIG_CB,0), "SIG_CB"}, {0,NULL} }; static ERR_STRING_DATA ECDSA_str_reasons[]= { {ECDSA_R_BAD_SIGNATURE ,"bad signature"}, -{ECDSA_R_CAN_NOT_GET_GENERATOR ,"can not get generator"}, -{ECDSA_R_D2I_ECDSAPRIVATEKEY_MISSING_PRIVATE_KEY,"d2i ecdsaprivatekey missing private key"}, -{ECDSA_R_D2I_ECDSA_PRIVATEKEY_FAILURE ,"d2i ecdsa privatekey failure"}, -{ECDSA_R_D2I_EC_PARAMETERS_FAILURE ,"d2i ec parameters failure"}, -{ECDSA_R_D2I_X9_62_EC_PARAMETERS_FAILURE ,"d2i x9 62 ec parameters failure"}, {ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE ,"data too large for key size"}, -{ECDSA_R_ECDSAPRIVATEKEY_NEW_FAILURE ,"ecdsaprivatekey new failure"}, -{ECDSA_R_ECDSA_F_ECDSA_NEW ,"ecdsa f ecdsa new"}, -{ECDSA_R_ECDSA_GET_EC_PARAMETERS_FAILURE ,"ecdsa get ec parameters failure"}, -{ECDSA_R_ECDSA_GET_FAILURE ,"ecdsa get failure"}, -{ECDSA_R_ECDSA_GET_X9_62_CURVE_FAILURE ,"ecdsa get x9 62 curve failure"}, -{ECDSA_R_ECDSA_GET_X9_62_EC_PARAMETERS_FAILURE,"ecdsa get x9 62 ec parameters failure"}, -{ECDSA_R_ECDSA_GET_X9_62_FIELDID_FAILURE ,"ecdsa get x9 62 fieldid failure"}, -{ECDSA_R_ECDSA_NEW_FAILURE ,"ecdsa new failure"}, -{ECDSA_R_ECDSA_R_D2I_EC_PARAMETERS_FAILURE,"ecdsa r d2i ec parameters failure"}, -{ECDSA_R_ECDSA_R_D2I_X9_62_EC_PARAMETERS_FAILURE,"ecdsa r d2i x9 62 ec parameters failure"}, -{ECDSA_R_ECPARAMETERS2ECDSA_FAILURE ,"ecparameters2ecdsa failure"}, -{ECDSA_R_EC_GROUP_NID2CURVE_FAILURE ,"ec group nid2curve failure"}, {ECDSA_R_ERR_EC_LIB ,"err ec lib"}, -{ECDSA_R_I2D_ECDSA_PRIVATEKEY ,"i2d ecdsa privatekey"}, -{ECDSA_R_I2D_ECDSA_PUBLICKEY ,"i2d ecdsa publickey"}, {ECDSA_R_MISSING_PARAMETERS ,"missing parameters"}, -{ECDSA_R_MISSING_PRIVATE_KEY ,"missing private key"}, -{ECDSA_R_NOT_SUPPORTED ,"not supported"}, -{ECDSA_R_NO_CURVE_PARAMETER_A_SPECIFIED ,"no curve parameter a specified"}, -{ECDSA_R_NO_CURVE_PARAMETER_B_SPECIFIED ,"no curve parameter b specified"}, -{ECDSA_R_NO_CURVE_SPECIFIED ,"no curve specified"}, -{ECDSA_R_NO_FIELD_SPECIFIED ,"no field specified"}, -{ECDSA_R_PRIME_MISSING ,"prime missing"}, {ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED ,"random number generation failed"}, {ECDSA_R_SIGNATURE_MALLOC_FAILED ,"signature malloc failed"}, -{ECDSA_R_UNEXPECTED_ASN1_TYPE ,"unexpected asn1 type"}, -{ECDSA_R_UNEXPECTED_PARAMETER ,"unexpected parameter"}, -{ECDSA_R_UNEXPECTED_PARAMETER_LENGTH ,"unexpected parameter length"}, -{ECDSA_R_UNEXPECTED_VERSION_NUMER ,"unexpected version numer"}, -{ECDSA_R_UNKNOWN_PARAMETERS_TYPE ,"unknown parameters type"}, -{ECDSA_R_WRONG_FIELD_IDENTIFIER ,"wrong field identifier"}, -{ECDSA_R_X9_62_CURVE_NEW_FAILURE ,"x9 62 curve new failure"}, -{ECDSA_R_X9_62_EC_PARAMETERS_NEW_FAILURE ,"x9 62 ec parameters new failure"}, {0,NULL} }; diff --git a/crypto/ecdsa/ecs_gen.c b/crypto/ecdsa/ecs_gen.c deleted file mode 100644 index e82b9b6e2f..0000000000 --- a/crypto/ecdsa/ecs_gen.c +++ /dev/null @@ -1,83 +0,0 @@ -/* crypto/ecdsa/ecs_gen.c */ -/* ==================================================================== - * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* TODO: implementation of ecdsa parameter generation - */ -#if 0 -#include <stdio.h> -#include <time.h> -#include "cryptlib.h" -#include <openssl/evp.h> -#include <openssl/bn.h> -#include <openssl/ecdsa.h> -#include <openssl/rand.h> -#include <openssl/sha.h> - -#ifdef __cplusplus -extern "C" { -#endif -ECDSA *ECDSA_generate_parameters(int bits, - unsigned char *seed_in, int seed_len, - int *counter_ret, unsigned long *h_ret, - void (*callback)(int, int, void *), - void *cb_arg) - { - return NULL; - } -#ifdef __cplusplus -} -#endif -#else -static void *dummy=&dummy; -#endif diff --git a/crypto/ecdsa/ecs_key.c b/crypto/ecdsa/ecs_key.c deleted file mode 100644 index 03916eac61..0000000000 --- a/crypto/ecdsa/ecs_key.c +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -#include "cryptlib.h" -#include <openssl/ecdsa.h> - -int ECDSA_generate_key(ECDSA *ecdsa) -{ - int ok=0; - BN_CTX *ctx=NULL; - BIGNUM *priv_key=NULL,*order=NULL; - EC_POINT *pub_key=NULL; - - if (!ecdsa || !ecdsa->group) - { - ECDSAerr(ECDSA_F_ECDSA_GENERATE_KEY,ECDSA_R_MISSING_PARAMETERS); - return 0; - } - - if ((order = BN_new()) == NULL) goto err; - if ((ctx = BN_CTX_new()) == NULL) goto err; - - if (ecdsa->priv_key == NULL) - { - if ((priv_key = BN_new()) == NULL) goto err; - } - else - priv_key = ecdsa->priv_key; - - if (!EC_GROUP_get_order(ecdsa->group, order, ctx)) goto err; - do - if (!BN_rand_range(priv_key, order)) goto err; - while (BN_is_zero(priv_key)); - - if (ecdsa->pub_key == NULL) - { - if ((pub_key = EC_POINT_new(ecdsa->group)) == NULL) goto err; - } - else - pub_key = ecdsa->pub_key; - - if (!EC_POINT_mul(ecdsa->group, pub_key, priv_key, NULL, NULL, ctx)) goto err; - - ecdsa->priv_key = priv_key; - ecdsa->pub_key = pub_key; - ok=1; -err: if (order) BN_free(order); - if ((pub_key != NULL) && (ecdsa->pub_key == NULL)) EC_POINT_free(pub_key); - if ((priv_key != NULL) && (ecdsa->priv_key == NULL)) BN_free(priv_key); - if (ctx != NULL) BN_CTX_free(ctx); - return(ok); -} - -int ECDSA_check_key(ECDSA *ecdsa) -{ - int ok=0; - BN_CTX *ctx=NULL; - BIGNUM *order=NULL; - EC_POINT *point=NULL; - - if (!ecdsa || !ecdsa->group || !ecdsa->pub_key) - return 0; - - if ((ctx = BN_CTX_new()) == NULL) goto err; - if ((order = BN_new()) == NULL) goto err; - if ((point = EC_POINT_new(ecdsa->group)) == NULL) goto err; - - /* testing whether pub_key is a valid point on the elliptic curve */ - if (!EC_POINT_is_on_curve(ecdsa->group,ecdsa->pub_key,ctx)) goto err; - /* testing whether pub_key * order is the point at infinity */ - if (!EC_GROUP_get_order(ecdsa->group,order,ctx)) goto err; - if (!EC_POINT_copy(point,ecdsa->pub_key)) goto err; - if (!EC_POINT_mul(ecdsa->group,point,order,NULL,NULL,ctx)) goto err; - if (!EC_POINT_is_at_infinity(ecdsa->group,point)) goto err; - /* in case the priv_key is present : check if generator * priv_key == pub_key */ - if (ecdsa->priv_key) - { - if (BN_cmp(ecdsa->priv_key,order) >= 0) goto err; - if (!EC_POINT_mul(ecdsa->group,point,ecdsa->priv_key,NULL,NULL,ctx)) goto err; - if (EC_POINT_cmp(ecdsa->group,point,ecdsa->pub_key,ctx) != 0) goto err; - } - ok = 1; -err: - if (ctx != NULL) BN_CTX_free(ctx); - if (order != NULL) BN_free(order); - if (point != NULL) EC_POINT_free(point); - return(ok); -} diff --git a/crypto/ecdsa/ecs_lib.c b/crypto/ecdsa/ecs_lib.c index 5f10c2ede7..fbec1bd343 100644 --- a/crypto/ecdsa/ecs_lib.c +++ b/crypto/ecdsa/ecs_lib.c @@ -52,69 +52,15 @@ * Hudson (tjh@cryptsoft.com). * */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -#include "cryptlib.h" +#include <string.h> #include "ecdsa.h" #include <openssl/engine.h> const char *ECDSA_version="ECDSA" OPENSSL_VERSION_PTEXT; +static void ecdsa_finish(EC_KEY *); + static const ECDSA_METHOD *default_ECDSA_method = NULL; void ECDSA_set_default_method(const ECDSA_METHOD *meth) @@ -137,29 +83,53 @@ ECDSA *ECDSA_new(void) int ECDSA_set_method(ECDSA *ecdsa, const ECDSA_METHOD *meth) { const ECDSA_METHOD *mtmp; + ECDSA_DATA *ecdsa; + + ecdsa = ecdsa_check(eckey); + + if (ecdsa == NULL) + return 0; + mtmp = ecdsa->meth; - if (mtmp->finish) mtmp->finish(ecdsa); +#if 0 + if (mtmp->finish) + mtmp->finish(eckey); +#endif if (ecdsa->engine) { ENGINE_finish(ecdsa->engine); ecdsa->engine = NULL; } ecdsa->meth = meth; - if (meth->init) meth->init(ecdsa); +#if 0 + if (meth->init) + meth->init(eckey); +#endif return 1; } -ECDSA *ECDSA_new_method(ENGINE *engine) +ECDSA_DATA *ECDSA_DATA_new(void) +{ + return ECDSA_DATA_new_method(NULL); +} + +ECDSA_DATA *ECDSA_DATA_new_method(ENGINE *engine) { - ECDSA *ret; + ECDSA_DATA *ret; - ret=(ECDSA *)OPENSSL_malloc(sizeof(ECDSA)); + ret=(ECDSA_DATA *)OPENSSL_malloc(sizeof(ECDSA_DATA)); if (ret == NULL) { - ECDSAerr(ECDSA_F_ECDSA_NEW,ERR_R_MALLOC_FAILURE); + ECDSAerr(ECDSA_F_ECDSA_DATA_NEW, ERR_R_MALLOC_FAILURE); return(NULL); } + ret->init = NULL; + ret->finish = ecdsa_finish; + + ret->kinv = NULL; + ret->r = NULL; + ret->meth = ECDSA_get_default_method(); ret->engine = engine; if (!ret->engine) @@ -169,71 +139,69 @@ ECDSA *ECDSA_new_method(ENGINE *engine) ret->meth = ENGINE_get_ECDSA(ret->engine); if (!ret->meth) { - ECDSAerr(ECDSA_R_ECDSA_F_ECDSA_NEW, ERR_R_ENGINE_LIB); + ECDSAerr(ECDSA_F_ECDSA_DATA_NEW, ERR_R_ENGINE_LIB); ENGINE_finish(ret->engine); OPENSSL_free(ret); return NULL; } } - ret->version = 1; - ret->conversion_form = ECDSA_get_default_conversion_form(); - ret->group = NULL; - - ret->pub_key = NULL; - ret->priv_key = NULL; - - ret->kinv = NULL; - ret->r = NULL; - - ret->references = 1; ret->flags = ret->meth->flags; CRYPTO_new_ex_data(CRYPTO_EX_INDEX_ECDSA, ret, &ret->ex_data); +#if 0 if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { CRYPTO_free_ex_data(CRYPTO_EX_INDEX_ECDSA, ret, &ret->ex_data); OPENSSL_free(ret); ret=NULL; } - +#endif return(ret); } -void ECDSA_free(ECDSA *r) +void ECDSA_DATA_free(ECDSA_DATA *r) { - int i; - - if (r == NULL) return; - - i=CRYPTO_add(&r->references,-1,CRYPTO_LOCK_ECDSA); -#ifdef REF_PRINT - REF_PRINT("ECDSA",r); -#endif - if (i > 0) return; -#ifdef REF_CHECK - if (i < 0) - { - fprintf(stderr,"ECDSA_free, bad reference count\n"); - abort(); - } -#endif + if (r->kinv) + BN_clear_free(r->kinv); + if (r->r) + BN_clear_free(r->r); +#if 0 if (r->meth->finish) r->meth->finish(r); +#endif if (r->engine) ENGINE_finish(r->engine); CRYPTO_free_ex_data(CRYPTO_EX_INDEX_ECDSA, r, &r->ex_data); - if (r->group != NULL) EC_GROUP_free(r->group); - if (r->pub_key != NULL) EC_POINT_free(r->pub_key); - if (r->priv_key != NULL) BN_clear_free(r->priv_key); - if (r->kinv != NULL) BN_clear_free(r->kinv); - if (r->r != NULL) BN_clear_free(r->r); + memset((void *)r, 0x0, sizeof(ECDSA_DATA)); + OPENSSL_free(r); } -int ECDSA_size(const ECDSA *r) +ECDSA_DATA *ecdsa_check(EC_KEY *key) +{ + if (key->meth_data) + { + if (key->meth_data->finish != ecdsa_finish) + { + key->meth_data->finish(key); + key->meth_data = (EC_KEY_METH_DATA *)ECDSA_DATA_new(); + } + } + else + key->meth_data = (EC_KEY_METH_DATA *)ECDSA_DATA_new(); + return (ECDSA_DATA *)key->meth_data; +} + +static void ecdsa_finish(EC_KEY *key) +{ + if (key->meth_data && key->meth_data->finish == ecdsa_finish) + ECDSA_DATA_free((ECDSA_DATA *)key->meth_data); +} + +int ECDSA_size(const EC_KEY *r) { int ret,i; ASN1_INTEGER bs; @@ -262,6 +230,7 @@ int ECDSA_size(const ECDSA *r) return(ret); } + int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) { @@ -269,50 +238,20 @@ int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, new_func, dup_func, free_func); } -int ECDSA_set_ex_data(ECDSA *d, int idx, void *arg) +int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg) { - return(CRYPTO_set_ex_data(&d->ex_data,idx,arg)); -} - -void *ECDSA_get_ex_data(ECDSA *d, int idx) -{ - return(CRYPTO_get_ex_data(&d->ex_data,idx)); -} - -int ECDSA_up_ref(ECDSA *ecdsa) -{ - int i = CRYPTO_add(&ecdsa->references, 1, CRYPTO_LOCK_ECDSA); -#ifdef REF_PRINT - REF_PRINT("ECDSA",r); -#endif -#ifdef REF_CHECK - if (i < 2) - { - fprintf(stderr, "ECDSA_up_ref, bad reference count\n"); - abort(); - } -#endif - return ((i > 1) ? 1 : 0); -} - -void ECDSA_set_conversion_form(ECDSA *ecdsa, const point_conversion_form_t form) -{ - if (ecdsa) ecdsa->conversion_form = form; -} - -point_conversion_form_t ECDSA_get_conversion_form(const ECDSA *ecdsa) -{ - return ecdsa ? ecdsa->conversion_form : 0; -} - -static point_conversion_form_t default_conversion_form = POINT_CONVERSION_UNCOMPRESSED; - -void ECDSA_set_default_conversion_form(const point_conversion_form_t form) -{ - default_conversion_form = form; + ECDSA_DATA *ecdsa; + ecdsa = ecdsa_check(d); + if (ecdsa == NULL) + return 0; + return(CRYPTO_set_ex_data(&ecdsa->ex_data,idx,arg)); } -point_conversion_form_t ECDSA_get_default_conversion_form(void) +void *ECDSA_get_ex_data(EC_KEY *d, int idx) { - return default_conversion_form; + ECDSA_DATA *ecdsa; + ecdsa = ecdsa_check(d); + if (ecdsa == NULL) + return NULL; + return(CRYPTO_get_ex_data(&ecdsa->ex_data,idx)); } diff --git a/crypto/ecdsa/ecs_ossl.c b/crypto/ecdsa/ecs_ossl.c index 96797f332b..f36df31ad7 100644 --- a/crypto/ecdsa/ecs_ossl.c +++ b/crypto/ecdsa/ecs_ossl.c @@ -52,67 +52,17 @@ * Hudson (tjh@cryptsoft.com). * */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -#include "cryptlib.h" -#include <openssl/ecdsa.h> -/* TODO : general case */ -#define EC_POINT_get_affine_coordinates EC_POINT_get_affine_coordinates_GFp +#include "ecdsa.h" +#include <openssl/err.h> +#include <openssl/obj_mac.h> + +static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dlen, + EC_KEY *eckey); +static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, + BIGNUM **rp); +static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, + ECDSA_SIG *sig, EC_KEY *eckey); static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dlen, ECDSA *ecdsa); static int ecdsa_sign_setup(ECDSA *ecdsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp); @@ -120,12 +70,16 @@ static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG *s ECDSA *ecdsa); static ECDSA_METHOD openssl_ecdsa_meth = { -"OpenSSL ECDSA method", -ecdsa_do_sign, -ecdsa_sign_setup, -ecdsa_do_verify, -0, -NULL + "OpenSSL ECDSA method", + ecdsa_do_sign, + ecdsa_sign_setup, + ecdsa_do_verify, +#if 0 + NULL, /* init */ + NULL, /* finish */ +#endif + 0, /* flags */ + NULL /* app_data */ }; const ECDSA_METHOD *ECDSA_OpenSSL(void) @@ -133,35 +87,52 @@ const ECDSA_METHOD *ECDSA_OpenSSL(void) return &openssl_ecdsa_meth; } -static int ecdsa_sign_setup(ECDSA *ecdsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) +static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, + BIGNUM **rp) { BN_CTX *ctx = NULL; BIGNUM k,*kinv=NULL,*r=NULL,*order=NULL,*X=NULL; EC_POINT *tmp_point=NULL; - int ret = 0,reason = ERR_R_BN_LIB; - if (!ecdsa || !ecdsa->group || !ecdsa->pub_key || !ecdsa->priv_key) + int ret = 0; + if (!eckey || !eckey->group || !eckey->pub_key || !eckey->priv_key) { - reason = ECDSA_R_MISSING_PARAMETERS; + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_PASSED_NULL_PARAMETER); return 0; } if (ctx_in == NULL) { - if ((ctx=BN_CTX_new()) == NULL) goto err; + if ((ctx=BN_CTX_new()) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_MALLOC_FAILURE); + goto err; + } } else ctx=ctx_in; - if ((r = BN_new()) == NULL) goto err; - if ((order = BN_new()) == NULL) goto err; - if ((X = BN_new()) == NULL) goto err; - if ((tmp_point = EC_POINT_new(ecdsa->group)) == NULL) + if ((r = BN_new()) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB); + goto err; + } + if ((order = BN_new()) == NULL) { - reason = ERR_R_EC_LIB; + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB); + goto err; + } + if ((X = BN_new()) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB); + goto err; + } + if ((tmp_point = EC_POINT_new(eckey->group)) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB); goto err; } - if (!EC_GROUP_get_order(ecdsa->group,order,ctx)) + if (!EC_GROUP_get_order(eckey->group,order,ctx)) { - reason = ERR_R_EC_LIB; + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB); goto err; } @@ -172,24 +143,53 @@ static int ecdsa_sign_setup(ECDSA *ecdsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM do if (!BN_rand_range(&k,order)) { - reason = ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED; + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, + ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED); goto err; } while (BN_is_zero(&k)); /* compute r the x-coordinate of generator * k */ - if (!EC_POINT_mul(ecdsa->group,tmp_point,&k,NULL,NULL,ctx) - || !EC_POINT_get_affine_coordinates(ecdsa->group,tmp_point,X,NULL,ctx)) + if (!EC_POINT_mul(eckey->group, tmp_point, &k, NULL, NULL, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB); + goto err; + } + if (EC_METHOD_get_field_type(EC_GROUP_method_of(eckey->group)) + == NID_X9_62_prime_field) + { + if (!EC_POINT_get_affine_coordinates_GFp(eckey->group, + tmp_point, X, NULL, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, + ERR_R_EC_LIB); + goto err; + } + } + else /* NID_X9_62_characteristic_two_field */ + { + if (!EC_POINT_get_affine_coordinates_GF2m(eckey->group, + tmp_point, X, NULL, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, + ERR_R_EC_LIB); + goto err; + } + } + if (!BN_nnmod(r,X,order,ctx)) { - reason = ERR_R_EC_LIB; + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB); goto err; } - if (!BN_nnmod(r,X,order,ctx)) goto err; } while (BN_is_zero(r)); /* compute the inverse of k */ - if ((kinv = BN_mod_inverse(NULL,&k,order,ctx)) == NULL) goto err; + if ((kinv = BN_mod_inverse(NULL,&k,order,ctx)) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB); + goto err; + } if (*rp == NULL) BN_clear_free(*rp); @@ -202,7 +202,6 @@ static int ecdsa_sign_setup(ECDSA *ecdsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM err: if (!ret) { - ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP,reason); if (kinv != NULL) BN_clear_free(kinv); if (r != NULL) BN_clear_free(r); } @@ -220,44 +219,60 @@ err: } -static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len, ECDSA *ecdsa) +static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len, + EC_KEY *eckey) { BIGNUM *kinv=NULL,*r=NULL,*s=NULL,*m=NULL,*tmp=NULL,*order=NULL; BIGNUM xr; BN_CTX *ctx=NULL; - int reason=ERR_R_BN_LIB; ECDSA_SIG *ret=NULL; + ECDSA_DATA *ecdsa; + + ecdsa = ecdsa_check(eckey); - if (!ecdsa || !ecdsa->group || !ecdsa->pub_key || !ecdsa->priv_key) + if (!eckey || !eckey->group || !eckey->pub_key || !eckey->priv_key + || !ecdsa) { - reason = ECDSA_R_MISSING_PARAMETERS; + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); goto err; } BN_init(&xr); - if ((ctx = BN_CTX_new()) == NULL) goto err; - if ((order = BN_new()) == NULL) goto err; - if ((tmp = BN_new()) == NULL) goto err; - if ((m = BN_new()) == NULL) goto err; - if ((s = BN_new()) == NULL) goto err; + if ((ctx = BN_CTX_new()) == NULL || (order = BN_new()) == NULL || + (tmp = BN_new()) == NULL || (m = BN_new()) == NULL || + (s = BN_new()) == NULL ) + { + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; + } - if (!EC_GROUP_get_order(ecdsa->group,order,ctx)) + if (!EC_GROUP_get_order(eckey->group,order,ctx)) { - reason = ECDSA_R_ERR_EC_LIB; + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); goto err; } if (dgst_len > BN_num_bytes(order)) { - reason = ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE; + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, + ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); goto err; } - if (BN_bin2bn(dgst,dgst_len,m) == NULL) goto err; + if (BN_bin2bn(dgst,dgst_len,m) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); + goto err; + } do { - if ((ecdsa->kinv == NULL) || (ecdsa->r == NULL)) + if (ecdsa->kinv == NULL || ecdsa->r == NULL) { - if (!ECDSA_sign_setup(ecdsa,ctx,&kinv,&r)) goto err; + if (!ECDSA_sign_setup(eckey,ctx,&kinv,&r)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, + ERR_R_ECDSA_LIB); + goto err; + } } else { @@ -267,109 +282,174 @@ static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len, ECDSA * ecdsa->r = NULL; } - if (!BN_mod_mul(tmp,ecdsa->priv_key,r,order,ctx)) goto err; - if (!BN_add(s,tmp,m)) goto err; + if (!BN_mod_mul(tmp,eckey->priv_key,r,order,ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); + goto err; + } + if (!BN_add(s,tmp,m)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); + goto err; + } if (BN_cmp(s,order) > 0) BN_sub(s,s,order); - if (!BN_mod_mul(s,s,kinv,order,ctx)) goto err; + if (!BN_mod_mul(s,s,kinv,order,ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); + goto err; + } } while (BN_is_zero(s)); if ((ret = ECDSA_SIG_new()) == NULL) { - reason = ECDSA_R_SIGNATURE_MALLOC_FAILED; + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); goto err; } if (BN_copy(ret->r, r) == NULL || BN_copy(ret->s, s) == NULL) { ECDSA_SIG_free(ret); ret = NULL; - reason = ERR_R_BN_LIB; + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); } err: - if (!ret) - { - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN,reason); - } - if (r != NULL) BN_clear_free(r); - if (s != NULL) BN_clear_free(s); - if (ctx != NULL) BN_CTX_free(ctx); - if (m != NULL) BN_clear_free(m); - if (tmp != NULL) BN_clear_free(tmp); - if (order != NULL) BN_clear_free(order); - if (kinv != NULL) BN_clear_free(kinv); + if (r) + BN_clear_free(r); + if (s) + BN_clear_free(s); + if (ctx) + BN_CTX_free(ctx); + if (m) + BN_clear_free(m); + if (tmp) + BN_clear_free(tmp); + if (order) + BN_clear_free(order); + if (kinv) + BN_clear_free(kinv); return(ret); } -static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG *sig, - ECDSA *ecdsa) +static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, + ECDSA_SIG *sig, EC_KEY *eckey) { BN_CTX *ctx; BIGNUM *order=NULL,*u1=NULL,*u2=NULL,*m=NULL,*X=NULL; EC_POINT *point=NULL; - int ret = -1,reason = ERR_R_BN_LIB; - if (!ecdsa || !ecdsa->group || !ecdsa->pub_key || !sig) + int ret = -1; + if (!eckey || !eckey->group || !eckey->pub_key || !sig) { - reason = ECDSA_R_MISSING_PARAMETERS; + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_MISSING_PARAMETERS); return -1; } - if ((ctx = BN_CTX_new()) == NULL) goto err; - if ((order = BN_new()) == NULL) goto err; - if ((u1 = BN_new()) == NULL) goto err; - if ((u2 = BN_new()) == NULL) goto err; - if ((m = BN_new()) == NULL) goto err; - if ((X = BN_new()) == NULL) goto err; - if (!EC_GROUP_get_order(ecdsa->group,order,ctx)) goto err; + if ((ctx = BN_CTX_new()) == NULL || (order = BN_new()) == NULL || + (u1 = BN_new()) == NULL || (u2 = BN_new()) == NULL || + (m = BN_new()) == NULL || (X = BN_new()) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; + } + if (!EC_GROUP_get_order(eckey->group, order, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); + goto err; + } if (BN_is_zero(sig->r) || sig->r->neg || BN_ucmp(sig->r, order) >= 0) { - reason = ECDSA_R_BAD_SIGNATURE; + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_BAD_SIGNATURE); ret = 0; goto err; } if (BN_is_zero(sig->s) || sig->s->neg || BN_ucmp(sig->s, order) >= 0) { - reason = ECDSA_R_BAD_SIGNATURE; + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_BAD_SIGNATURE); ret = 0; goto err; } /* calculate tmp1 = inv(S) mod order */ - if ((BN_mod_inverse(u2,sig->s,order,ctx)) == NULL) goto err; + if ((BN_mod_inverse(u2,sig->s,order,ctx)) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); + goto err; + } /* digest -> m */ - if (BN_bin2bn(dgst,dgst_len,m) == NULL) goto err; + if (BN_bin2bn(dgst,dgst_len,m) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); + goto err; + } /* u1 = m * tmp mod order */ - if (!BN_mod_mul(u1,m,u2,order,ctx)) goto err; + if (!BN_mod_mul(u1,m,u2,order,ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); + goto err; + } /* u2 = r * w mod q */ - if (!BN_mod_mul(u2,sig->r,u2,order,ctx)) goto err; + if (!BN_mod_mul(u2,sig->r,u2,order,ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); + goto err; + } - if ((point = EC_POINT_new(ecdsa->group)) == NULL) + if ((point = EC_POINT_new(eckey->group)) == NULL) { - reason = ERR_R_EC_LIB; + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); goto err; } - if (!EC_POINT_mul(ecdsa->group,point,u1,ecdsa->pub_key,u2,ctx) - || !EC_POINT_get_affine_coordinates(ecdsa->group,point,X,NULL,ctx)) + if (!EC_POINT_mul(eckey->group, point, u1, eckey->pub_key, u2, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); + goto err; + } + if (EC_METHOD_get_field_type(EC_GROUP_method_of(eckey->group)) + == NID_X9_62_prime_field) + { + if (!EC_POINT_get_affine_coordinates_GFp(eckey->group, + point, X, NULL, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB); + goto err; + } + } + else /* NID_X9_62_characteristic_two_field */ { - reason = ERR_R_EC_LIB; + if (!EC_POINT_get_affine_coordinates_GF2m(eckey->group, + point, X, NULL, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB); + goto err; + } + } + + if (!BN_nnmod(u1,X,order,ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); goto err; } - if (!BN_nnmod(u1,X,order,ctx)) goto err; /* is now in u1. If the signature is correct, it will be * equal to R. */ ret = (BN_ucmp(u1,sig->r) == 0); err: - if (ret != 1) ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY,reason); - if (ctx != NULL) BN_CTX_free(ctx); - if (u1 != NULL) BN_clear_free(u1); - if (u2 != NULL) BN_clear_free(u2); - if (m != NULL) BN_clear_free(m); - if (X != NULL) BN_clear_free(X); - if (order != NULL) BN_clear_free(order); - if (point != NULL) EC_POINT_free(point); + if (ctx) + BN_CTX_free(ctx); + if (u1) + BN_clear_free(u1); + if (u2) + BN_clear_free(u2); + if (m) + BN_clear_free(m); + if (X) + BN_clear_free(X); + if (order) + BN_clear_free(order); + if (point) + EC_POINT_free(point); return(ret); } diff --git a/crypto/ecdsa/ecs_sign.c b/crypto/ecdsa/ecs_sign.c index eb18685e37..215da1211a 100644 --- a/crypto/ecdsa/ecs_sign.c +++ b/crypto/ecdsa/ecs_sign.c @@ -52,76 +52,23 @@ * Hudson (tjh@cryptsoft.com). * */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -#include "cryptlib.h" -#include <openssl/ecdsa.h> + +#include "ecdsa.h" #include <openssl/engine.h> -ECDSA_SIG * ECDSA_do_sign(const unsigned char *dgst, int dlen, ECDSA *ecdsa) +ECDSA_SIG * ECDSA_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey) { - return ecdsa->meth->ecdsa_do_sign(dgst, dlen, ecdsa); + ECDSA_DATA *ecdsa = ecdsa_check(eckey); + if (ecdsa == NULL) + return NULL; + return ecdsa->meth->ecdsa_do_sign(dgst, dlen, eckey); } -int ECDSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, - unsigned int *siglen, ECDSA *ecdsa) +int ECDSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char + *sig, unsigned int *siglen, EC_KEY *eckey) { ECDSA_SIG *s; - s=ECDSA_do_sign(dgst,dlen,ecdsa); + s=ECDSA_do_sign(dgst,dlen,eckey); if (s == NULL) { *siglen=0; @@ -132,7 +79,11 @@ int ECDSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig return(1); } -int ECDSA_sign_setup(ECDSA *ecdsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) +int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, + BIGNUM **rp) { - return ecdsa->meth->ecdsa_sign_setup(ecdsa, ctx_in, kinvp, rp); + ECDSA_DATA *ecdsa = ecdsa_check(eckey); + if (ecdsa == NULL) + return 0; + return ecdsa->meth->ecdsa_sign_setup(eckey, ctx_in, kinvp, rp); } diff --git a/crypto/ecdsa/ecs_vrf.c b/crypto/ecdsa/ecs_vrf.c index dddbcfc60c..269671bec8 100644 --- a/crypto/ecdsa/ecs_vrf.c +++ b/crypto/ecdsa/ecs_vrf.c @@ -52,63 +52,8 @@ * Hudson (tjh@cryptsoft.com). * */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -#include <openssl/ecdsa.h> + +#include "ecdsa.h" #include <openssl/engine.h> /* returns @@ -116,9 +61,13 @@ * 0: incorrect signature * -1: error */ -int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG *sig, ECDSA *ecdsa) +int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, + ECDSA_SIG *sig, EC_KEY *eckey) { - return ecdsa->meth->ecdsa_do_verify(dgst, dgst_len, sig, ecdsa); + ECDSA_DATA *ecdsa = ecdsa_check(eckey); + if (ecdsa == NULL) + return 0; + return ecdsa->meth->ecdsa_do_verify(dgst, dgst_len, sig, eckey); } /* returns @@ -126,15 +75,16 @@ int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG *sig, ECD * 0: incorrect signature * -1: error */ -int ECDSA_verify(int type, const unsigned char *dgst, int dgst_len, const unsigned char *sigbuf, int sig_len, ECDSA *ecdsa) +int ECDSA_verify(int type, const unsigned char *dgst, int dgst_len, + const unsigned char *sigbuf, int sig_len, EC_KEY *eckey) { ECDSA_SIG *s; int ret=-1; s = ECDSA_SIG_new(); if (s == NULL) return(ret); - if (d2i_ECDSA_SIG(&s,&sigbuf,sig_len) == NULL) goto err; - ret=ECDSA_do_verify(dgst,dgst_len,s,ecdsa); + if (d2i_ECDSA_SIG(&s, &sigbuf, sig_len) == NULL) goto err; + ret=ECDSA_do_verify(dgst, dgst_len, s, eckey); err: ECDSA_SIG_free(s); return(ret); diff --git a/crypto/engine/Makefile.ssl b/crypto/engine/Makefile.ssl index 018c9f2a95..a34ce9da13 100644 --- a/crypto/engine/Makefile.ssl +++ b/crypto/engine/Makefile.ssl @@ -25,13 +25,13 @@ APPS= LIB=$(TOP)/libcrypto.a LIBSRC= eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c \ eng_table.c eng_pkey.c eng_fat.c eng_all.c \ - tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_rand.c tb_cipher.c tb_digest.c \ + tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_rand.c tb_cipher.c tb_digest.c tb_ecdh.c \ eng_openssl.c eng_dyn.c eng_cnf.c \ hw_atalla.c hw_cswift.c hw_ncipher.c hw_nuron.c hw_ubsec.c \ hw_openbsd_dev_crypto.c hw_aep.c hw_sureware.c hw_4758_cca.c LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \ eng_table.o eng_pkey.o eng_fat.o eng_all.o \ - tb_rsa.o tb_dsa.o tb_ecdsa.o tb_dh.o tb_rand.o tb_cipher.o tb_digest.o \ + tb_rsa.o tb_dsa.o tb_ecdsa.o tb_dh.o tb_rand.o tb_cipher.o tb_digest.o tb_ecdh.o \ eng_openssl.o eng_dyn.o eng_cnf.o \ hw_atalla.o hw_cswift.o hw_ncipher.o hw_nuron.o hw_ubsec.o \ hw_openbsd_dev_crypto.o hw_aep.o hw_sureware.o hw_4758_cca.o @@ -93,11 +93,11 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. -eng_all.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -eng_all.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -eng_all.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +eng_all.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +eng_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_all.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_all.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -106,11 +106,11 @@ eng_all.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_all.o: eng_all.c eng_int.h eng_cnf.o: ../../e_os.h ../../include/openssl/asn1.h -eng_cnf.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_cnf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_cnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -eng_cnf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -eng_cnf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_cnf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_cnf.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h +eng_cnf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +eng_cnf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +eng_cnf.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h eng_cnf.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h eng_cnf.o: ../../include/openssl/err.h ../../include/openssl/lhash.h eng_cnf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h @@ -119,11 +119,11 @@ eng_cnf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h eng_cnf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h eng_cnf.o: ../../include/openssl/ui.h ../cryptlib.h eng_cnf.c eng_ctrl.o: ../../e_os.h ../../include/openssl/asn1.h -eng_ctrl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_ctrl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_ctrl.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_ctrl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_ctrl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_ctrl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_ctrl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_ctrl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_ctrl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_ctrl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_ctrl.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_ctrl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_ctrl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -132,11 +132,11 @@ eng_ctrl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_ctrl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_ctrl.o: ../cryptlib.h eng_ctrl.c eng_int.h eng_dyn.o: ../../e_os.h ../../include/openssl/asn1.h -eng_dyn.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_dyn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_dyn.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_dyn.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -eng_dyn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_dyn.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_dyn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_dyn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_dyn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +eng_dyn.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h eng_dyn.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h eng_dyn.o: ../../include/openssl/err.h ../../include/openssl/lhash.h eng_dyn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h @@ -144,11 +144,11 @@ eng_dyn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h eng_dyn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h eng_dyn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h eng_dyn.o: ../../include/openssl/ui.h ../cryptlib.h eng_dyn.c eng_int.h -eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -eng_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -eng_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_err.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +eng_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +eng_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_err.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -157,11 +157,11 @@ eng_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_err.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_err.o: eng_err.c eng_fat.o: ../../e_os.h ../../include/openssl/asn1.h -eng_fat.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_fat.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_fat.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -eng_fat.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -eng_fat.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_fat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_fat.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h +eng_fat.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +eng_fat.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +eng_fat.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h eng_fat.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h eng_fat.o: ../../include/openssl/err.h ../../include/openssl/lhash.h eng_fat.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h @@ -170,11 +170,11 @@ eng_fat.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h eng_fat.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h eng_fat.o: ../../include/openssl/ui.h ../cryptlib.h eng_fat.c eng_int.h eng_init.o: ../../e_os.h ../../include/openssl/asn1.h -eng_init.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_init.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_init.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_init.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_init.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_init.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_init.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_init.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_init.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_init.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_init.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_init.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -183,11 +183,11 @@ eng_init.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_init.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_init.o: ../cryptlib.h eng_init.c eng_int.h eng_lib.o: ../../e_os.h ../../include/openssl/asn1.h -eng_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -196,11 +196,11 @@ eng_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_lib.o: ../cryptlib.h eng_int.h eng_lib.c eng_list.o: ../../e_os.h ../../include/openssl/asn1.h -eng_list.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_list.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_list.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_list.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_list.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_list.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_list.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_list.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_list.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_list.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_list.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_list.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_list.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -209,14 +209,14 @@ eng_list.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_list.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_list.o: ../cryptlib.h eng_int.h eng_list.c eng_openssl.o: ../../e_os.h ../../include/openssl/aes.h -eng_openssl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -eng_openssl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -eng_openssl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_openssl.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -eng_openssl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -eng_openssl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -eng_openssl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h -eng_openssl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_openssl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +eng_openssl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +eng_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +eng_openssl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +eng_openssl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +eng_openssl.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_openssl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_openssl.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_openssl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h eng_openssl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -236,11 +236,11 @@ eng_openssl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h eng_openssl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h eng_openssl.o: ../cryptlib.h eng_openssl.c eng_pkey.o: ../../e_os.h ../../include/openssl/asn1.h -eng_pkey.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_pkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_pkey.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -249,12 +249,12 @@ eng_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_pkey.o: ../cryptlib.h eng_int.h eng_pkey.c eng_table.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -eng_table.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_table.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -eng_table.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -eng_table.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -eng_table.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -eng_table.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_table.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +eng_table.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +eng_table.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +eng_table.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +eng_table.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h eng_table.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h eng_table.o: ../../include/openssl/err.h ../../include/openssl/evp.h eng_table.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -271,14 +271,14 @@ eng_table.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h eng_table.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h eng_table.o: eng_int.h eng_table.c hw_4758_cca.o: ../../e_os.h ../../include/openssl/aes.h -hw_4758_cca.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -hw_4758_cca.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -hw_4758_cca.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_4758_cca.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -hw_4758_cca.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -hw_4758_cca.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -hw_4758_cca.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h -hw_4758_cca.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +hw_4758_cca.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_4758_cca.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +hw_4758_cca.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +hw_4758_cca.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_4758_cca.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_4758_cca.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_4758_cca.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_4758_cca.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h hw_4758_cca.o: ../../include/openssl/engine.h ../../include/openssl/err.h hw_4758_cca.o: ../../include/openssl/evp.h ../../include/openssl/idea.h hw_4758_cca.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -297,12 +297,12 @@ hw_4758_cca.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h hw_4758_cca.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h hw_4758_cca.o: ../cryptlib.h hw_4758_cca.c hw_4758_cca_err.c hw_4758_cca_err.h hw_4758_cca.o: vendor_defns/hw_4758_cca.h -hw_aep.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -hw_aep.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -hw_aep.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -hw_aep.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -hw_aep.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h -hw_aep.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +hw_aep.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_aep.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +hw_aep.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +hw_aep.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_aep.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_aep.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h hw_aep.o: ../../include/openssl/engine.h ../../include/openssl/err.h hw_aep.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h hw_aep.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -311,11 +311,11 @@ hw_aep.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h hw_aep.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h hw_aep.c hw_aep.o: hw_aep_err.c hw_aep_err.h vendor_defns/aep.h hw_atalla.o: ../../e_os.h ../../include/openssl/asn1.h -hw_atalla.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -hw_atalla.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_atalla.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -hw_atalla.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -hw_atalla.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_atalla.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_atalla.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_atalla.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_atalla.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h hw_atalla.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h hw_atalla.o: ../../include/openssl/err.h ../../include/openssl/lhash.h hw_atalla.o: ../../include/openssl/opensslconf.h @@ -326,11 +326,11 @@ hw_atalla.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h hw_atalla.o: ../cryptlib.h hw_atalla.c hw_atalla_err.c hw_atalla_err.h hw_atalla.o: vendor_defns/atalla.h hw_cswift.o: ../../e_os.h ../../include/openssl/asn1.h -hw_cswift.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -hw_cswift.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_cswift.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -hw_cswift.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -hw_cswift.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_cswift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_cswift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_cswift.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_cswift.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_cswift.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h hw_cswift.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h hw_cswift.o: ../../include/openssl/err.h ../../include/openssl/lhash.h hw_cswift.o: ../../include/openssl/opensslconf.h @@ -341,14 +341,14 @@ hw_cswift.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h hw_cswift.o: ../cryptlib.h hw_cswift.c hw_cswift_err.c hw_cswift_err.h hw_cswift.o: vendor_defns/cswift.h hw_ncipher.o: ../../e_os.h ../../include/openssl/aes.h -hw_ncipher.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -hw_ncipher.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -hw_ncipher.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_ncipher.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -hw_ncipher.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -hw_ncipher.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -hw_ncipher.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h -hw_ncipher.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +hw_ncipher.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_ncipher.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +hw_ncipher.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +hw_ncipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_ncipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_ncipher.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_ncipher.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_ncipher.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h hw_ncipher.o: ../../include/openssl/engine.h ../../include/openssl/err.h hw_ncipher.o: ../../include/openssl/evp.h ../../include/openssl/idea.h hw_ncipher.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -368,11 +368,11 @@ hw_ncipher.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h hw_ncipher.o: ../../include/openssl/x509_vfy.h ../cryptlib.h hw_ncipher.c hw_ncipher.o: hw_ncipher_err.c hw_ncipher_err.h vendor_defns/hwcryptohook.h hw_nuron.o: ../../e_os.h ../../include/openssl/asn1.h -hw_nuron.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -hw_nuron.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_nuron.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -hw_nuron.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -hw_nuron.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_nuron.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_nuron.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_nuron.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_nuron.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_nuron.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h hw_nuron.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h hw_nuron.o: ../../include/openssl/err.h ../../include/openssl/lhash.h hw_nuron.o: ../../include/openssl/opensslconf.h @@ -383,7 +383,6 @@ hw_nuron.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h hw_nuron.o: ../cryptlib.h hw_nuron.c hw_nuron_err.c hw_nuron_err.h hw_openbsd_dev_crypto.o: ../../include/openssl/aes.h hw_openbsd_dev_crypto.o: ../../include/openssl/asn1.h -hw_openbsd_dev_crypto.o: ../../include/openssl/asn1t.h hw_openbsd_dev_crypto.o: ../../include/openssl/bio.h hw_openbsd_dev_crypto.o: ../../include/openssl/blowfish.h hw_openbsd_dev_crypto.o: ../../include/openssl/bn.h @@ -395,6 +394,7 @@ hw_openbsd_dev_crypto.o: ../../include/openssl/des_old.h hw_openbsd_dev_crypto.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h hw_openbsd_dev_crypto.o: ../../include/openssl/e_os2.h hw_openbsd_dev_crypto.o: ../../include/openssl/ec.h +hw_openbsd_dev_crypto.o: ../../include/openssl/ecdh.h hw_openbsd_dev_crypto.o: ../../include/openssl/ecdsa.h hw_openbsd_dev_crypto.o: ../../include/openssl/engine.h hw_openbsd_dev_crypto.o: ../../include/openssl/err.h @@ -424,14 +424,14 @@ hw_openbsd_dev_crypto.o: ../../include/openssl/ui.h hw_openbsd_dev_crypto.o: ../../include/openssl/ui_compat.h ../evp/evp_locl.h hw_openbsd_dev_crypto.o: eng_int.h hw_openbsd_dev_crypto.c hw_sureware.o: ../../e_os.h ../../include/openssl/aes.h -hw_sureware.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -hw_sureware.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -hw_sureware.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_sureware.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -hw_sureware.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -hw_sureware.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -hw_sureware.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h -hw_sureware.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +hw_sureware.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_sureware.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +hw_sureware.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +hw_sureware.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_sureware.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_sureware.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_sureware.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_sureware.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h hw_sureware.o: ../../include/openssl/engine.h ../../include/openssl/err.h hw_sureware.o: ../../include/openssl/evp.h ../../include/openssl/idea.h hw_sureware.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -452,11 +452,11 @@ hw_sureware.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h hw_sureware.o: ../cryptlib.h eng_int.h engine.h hw_sureware.c hw_sureware_err.c hw_sureware.o: hw_sureware_err.h vendor_defns/sureware.h hw_ubsec.o: ../../e_os.h ../../include/openssl/asn1.h -hw_ubsec.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -hw_ubsec.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_ubsec.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -hw_ubsec.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -hw_ubsec.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_ubsec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_ubsec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_ubsec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_ubsec.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_ubsec.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h hw_ubsec.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h hw_ubsec.o: ../../include/openssl/err.h ../../include/openssl/lhash.h hw_ubsec.o: ../../include/openssl/opensslconf.h @@ -467,12 +467,12 @@ hw_ubsec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h hw_ubsec.o: ../cryptlib.h hw_ubsec.c hw_ubsec_err.c hw_ubsec_err.h hw_ubsec.o: vendor_defns/hw_ubsec.h tb_cipher.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_cipher.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_cipher.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_cipher.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_cipher.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_cipher.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_cipher.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_cipher.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_cipher.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_cipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_cipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_cipher.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_cipher.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_cipher.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_cipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_cipher.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -489,12 +489,12 @@ tb_cipher.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h tb_cipher.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h tb_cipher.o: eng_int.h tb_cipher.c tb_dh.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_dh.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_dh.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_dh.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_dh.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_dh.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_dh.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_dh.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_dh.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_dh.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_dh.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_dh.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_dh.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_dh.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_dh.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_dh.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -510,12 +510,12 @@ tb_dh.o: ../../include/openssl/sha.h ../../include/openssl/stack.h tb_dh.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h tb_dh.o: ../../include/openssl/ui_compat.h eng_int.h tb_dh.c tb_digest.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_digest.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_digest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_digest.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_digest.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_digest.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -532,12 +532,12 @@ tb_digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h tb_digest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h tb_digest.o: eng_int.h tb_digest.c tb_dsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_dsa.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_dsa.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_dsa.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_dsa.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_dsa.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_dsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_dsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_dsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_dsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_dsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_dsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_dsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_dsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_dsa.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_dsa.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -552,13 +552,34 @@ tb_dsa.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h tb_dsa.o: ../../include/openssl/sha.h ../../include/openssl/stack.h tb_dsa.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h tb_dsa.o: ../../include/openssl/ui_compat.h eng_int.h tb_dsa.c +tb_ecdh.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_ecdh.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_ecdh.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_ecdh.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_ecdh.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_ecdh.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_ecdh.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +tb_ecdh.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h +tb_ecdh.o: ../../include/openssl/err.h ../../include/openssl/evp.h +tb_ecdh.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +tb_ecdh.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +tb_ecdh.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +tb_ecdh.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +tb_ecdh.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +tb_ecdh.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +tb_ecdh.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +tb_ecdh.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +tb_ecdh.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +tb_ecdh.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +tb_ecdh.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +tb_ecdh.o: ../../include/openssl/ui_compat.h eng_int.h tb_ecdh.c tb_ecdsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_ecdsa.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_ecdsa.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_ecdsa.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_ecdsa.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_ecdsa.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_ecdsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_ecdsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_ecdsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_ecdsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_ecdsa.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_ecdsa.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -575,12 +596,12 @@ tb_ecdsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h tb_ecdsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h tb_ecdsa.o: eng_int.h tb_ecdsa.c tb_rand.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_rand.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_rand.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_rand.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_rand.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_rand.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_rand.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_rand.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_rand.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_rand.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_rand.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_rand.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_rand.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_rand.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_rand.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -596,12 +617,12 @@ tb_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h tb_rand.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h tb_rand.o: ../../include/openssl/ui_compat.h eng_int.h tb_rand.c tb_rsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_rsa.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_rsa.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_rsa.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_rsa.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_rsa.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_rsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_rsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_rsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_rsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_rsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_rsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_rsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_rsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_rsa.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_rsa.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h diff --git a/crypto/engine/eng_fat.c b/crypto/engine/eng_fat.c index f7edb5ad32..c0d03ccbfe 100644 --- a/crypto/engine/eng_fat.c +++ b/crypto/engine/eng_fat.c @@ -52,6 +52,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <openssl/crypto.h> #include "cryptlib.h" @@ -77,6 +82,14 @@ int ENGINE_set_default(ENGINE *e, unsigned int flags) if((flags & ENGINE_METHOD_DH) & !ENGINE_set_default_DH(e)) return 0; #endif +#ifndef OPENSSL_NO_ECDH + if((flags & ENGINE_METHOD_ECDH) & !ENGINE_set_default_ECDH(e)) + return 0; +#endif +#ifndef OPENSSL_NO_ECDSA + if((flags & ENGINE_METHOD_ECDSA) & !ENGINE_set_default_ECDSA(e)) + return 0; +#endif if((flags & ENGINE_METHOD_RAND) & !ENGINE_set_default_RAND(e)) return 0; return 1; @@ -93,6 +106,10 @@ static int int_def_cb(const char *alg, int len, void *arg) *pflags |= ENGINE_METHOD_RSA; else if (!strncmp(alg, "DSA", len)) *pflags |= ENGINE_METHOD_DSA; + else if (!strncmp(alg, "ECDH", len)) + *pflags |= ENGINE_METHOD_ECDH; + else if (!strncmp(alg, "ECDSA", len)) + *pflags |= ENGINE_METHOD_ECDSA; else if (!strncmp(alg, "DH", len)) *pflags |= ENGINE_METHOD_DH; else if (!strncmp(alg, "RAND", len)) @@ -133,6 +150,12 @@ int ENGINE_register_complete(ENGINE *e) #ifndef OPENSSL_NO_DH ENGINE_register_DH(e); #endif +#ifndef OPENSSL_NO_ECDH + ENGINE_register_ECDH(e); +#endif +#ifndef OPENSSL_NO_ECDSA + ENGINE_register_ECDSA(e); +#endif ENGINE_register_RAND(e); return 1; } diff --git a/crypto/engine/eng_int.h b/crypto/engine/eng_int.h index 0407de9e1a..2c82861ebb 100644 --- a/crypto/engine/eng_int.h +++ b/crypto/engine/eng_int.h @@ -55,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #ifndef HEADER_ENGINE_INT_H #define HEADER_ENGINE_INT_H @@ -146,6 +151,7 @@ struct engine_st const RSA_METHOD *rsa_meth; const DSA_METHOD *dsa_meth; const DH_METHOD *dh_meth; + const ECDH_METHOD *ecdh_meth; const ECDSA_METHOD *ecdsa_meth; const RAND_METHOD *rand_meth; /* Cipher handling is via this callback */ diff --git a/crypto/engine/eng_list.c b/crypto/engine/eng_list.c index da53c1c655..5018856781 100644 --- a/crypto/engine/eng_list.c +++ b/crypto/engine/eng_list.c @@ -55,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <openssl/crypto.h> #include "cryptlib.h" @@ -324,6 +329,9 @@ static void engine_cpy(ENGINE *dest, const ENGINE *src) #ifndef OPENSSL_NO_DH dest->dh_meth = src->dh_meth; #endif +#ifndef OPENSSL_NO_ECDH + dest->ecdh_meth = src->ecdh_meth; +#endif #ifndef OPENSSL_NO_ECDSA dest->ecdsa_meth = src->ecdsa_meth; #endif diff --git a/crypto/engine/eng_openssl.c b/crypto/engine/eng_openssl.c index e9d976f46b..45fa61834b 100644 --- a/crypto/engine/eng_openssl.c +++ b/crypto/engine/eng_openssl.c @@ -55,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <stdio.h> @@ -109,6 +114,12 @@ static int bind_helper(ENGINE *e) #ifndef OPENSSL_NO_DSA || !ENGINE_set_DSA(e, DSA_get_default_method()) #endif +#ifndef OPENSSL_NO_ECDH + || !ENGINE_set_ECDH(e, ECDH_OpenSSL()) +#endif +#ifndef OPENSSL_NO_ECDSA + || !ENGINE_set_ECDSA(e, ECDSA_OpenSSL()) +#endif #ifndef OPENSSL_NO_DH || !ENGINE_set_DH(e, DH_get_default_method()) #endif diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h index 1cd27f8422..50638d4b05 100644 --- a/crypto/engine/engine.h +++ b/crypto/engine/engine.h @@ -55,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #ifndef HEADER_ENGINE_H #define HEADER_ENGINE_H @@ -70,6 +75,9 @@ #ifndef OPENSSL_NO_DH #include <openssl/dh.h> #endif +#ifndef OPENSSL_NO_ECDH +#include <openssl/ecdh.h> +#endif #ifndef OPENSSL_NO_ECDSA #include <openssl/ecdsa.h> #endif @@ -92,6 +100,9 @@ typedef void DSA_METHOD; #ifdef OPENSSL_NO_DH typedef void DH_METHOD; #endif +#ifdef OPENSSL_NO_ECDH +typedef void ECDH_METHOD; +#endif #ifdef OPENSSL_NO_ECDSA typedef void ECDSA_METHOD; #endif @@ -102,7 +113,8 @@ typedef void ECDSA_METHOD; #define ENGINE_METHOD_DSA (unsigned int)0x0002 #define ENGINE_METHOD_DH (unsigned int)0x0004 #define ENGINE_METHOD_RAND (unsigned int)0x0008 -#define ENGINE_METHOD_ECDSA (unsigned int)0x000F +#define ENGINE_METHOD_ECDH (unsigned int)0x0010 +#define ENGINE_METHOD_ECDSA (unsigned int)0x0020 #define ENGINE_METHOD_CIPHERS (unsigned int)0x0040 #define ENGINE_METHOD_DIGESTS (unsigned int)0x0080 /* Obvious all-or-nothing cases. */ @@ -338,6 +350,10 @@ int ENGINE_register_DSA(ENGINE *e); void ENGINE_unregister_DSA(ENGINE *e); void ENGINE_register_all_DSA(void); +int ENGINE_register_ECDH(ENGINE *e); +void ENGINE_unregister_ECDH(ENGINE *e); +void ENGINE_register_all_ECDH(void); + int ENGINE_register_ECDSA(ENGINE *e); void ENGINE_unregister_ECDSA(ENGINE *e); void ENGINE_register_all_ECDSA(void); @@ -421,6 +437,7 @@ int ENGINE_set_id(ENGINE *e, const char *id); int ENGINE_set_name(ENGINE *e, const char *name); int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); +int ENGINE_set_ECDH(ENGINE *e, const ECDH_METHOD *ecdh_meth); int ENGINE_set_ECDSA(ENGINE *e, const ECDSA_METHOD *ecdsa_meth); int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth); int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth); @@ -454,6 +471,7 @@ const char *ENGINE_get_id(const ENGINE *e); const char *ENGINE_get_name(const ENGINE *e); const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e); const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e); +const ECDH_METHOD *ENGINE_get_ECDH(const ENGINE *e); const ECDSA_METHOD *ENGINE_get_ECDSA(const ENGINE *e); const DH_METHOD *ENGINE_get_DH(const ENGINE *e); const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e); @@ -507,6 +525,7 @@ EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id, ENGINE *ENGINE_get_default_RSA(void); /* Same for the other "methods" */ ENGINE *ENGINE_get_default_DSA(void); +ENGINE *ENGINE_get_default_ECDH(void); ENGINE *ENGINE_get_default_ECDSA(void); ENGINE *ENGINE_get_default_DH(void); ENGINE *ENGINE_get_default_RAND(void); @@ -523,6 +542,7 @@ int ENGINE_set_default_RSA(ENGINE *e); int ENGINE_set_default_string(ENGINE *e, const char *list); /* Same for the other "methods" */ int ENGINE_set_default_DSA(ENGINE *e); +int ENGINE_set_default_ECDH(ENGINE *e); int ENGINE_set_default_ECDSA(ENGINE *e); int ENGINE_set_default_DH(ENGINE *e); int ENGINE_set_default_RAND(ENGINE *e); diff --git a/crypto/engine/hw_cswift.c b/crypto/engine/hw_cswift.c index 31a79a9d16..f5c897bdbb 100644 --- a/crypto/engine/hw_cswift.c +++ b/crypto/engine/hw_cswift.c @@ -501,7 +501,7 @@ static int cswift_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, goto err; default: { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -518,7 +518,7 @@ static int cswift_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, if((sw_status = p_CSwift_SimpleRequest(hac, SW_CMD_MODEXP, &arg, 1, &res, 1)) != SW_OK) { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -608,7 +608,7 @@ static int cswift_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, goto err; default: { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -625,7 +625,7 @@ static int cswift_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, if((sw_status = p_CSwift_SimpleRequest(hac, SW_CMD_MODEXP_CRT, &arg, 1, &res, 1)) != SW_OK) { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -740,7 +740,7 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) goto err; default: { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_DSA_SIGN,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -758,7 +758,7 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) &res, 1); if(sw_status != SW_OK) { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_DSA_SIGN,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -852,7 +852,7 @@ static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, goto err; default: { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_DSA_VERIFY,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -874,7 +874,7 @@ static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, &res, 1); if(sw_status != SW_OK) { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_DSA_VERIFY,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); diff --git a/crypto/engine/hw_ubsec.c b/crypto/engine/hw_ubsec.c index 63397f868c..ed8401ec16 100644 --- a/crypto/engine/hw_ubsec.c +++ b/crypto/engine/hw_ubsec.c @@ -93,7 +93,7 @@ static int ubsec_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa); static int ubsec_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); #ifndef OPENSSL_NO_DSA -#if NOT_USED +#ifdef NOT_USED static int ubsec_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont); @@ -113,7 +113,7 @@ static int ubsec_dh_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh) static int ubsec_dh_generate_key(DH *dh); #endif -#if NOT_USED +#ifdef NOT_USED static int ubsec_rand_bytes(unsigned char *buf, int num); static int ubsec_rand_status(void); #endif @@ -663,7 +663,7 @@ static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, } #ifndef OPENSSL_NO_DSA -#if NOT_USED +#ifdef NOT_USED static int ubsec_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) @@ -987,7 +987,7 @@ err: } #endif -#if NOT_USED +#ifdef NOT_USED static int ubsec_rand_bytes(unsigned char * buf, int num) { diff --git a/crypto/err/Makefile.ssl b/crypto/err/Makefile.ssl index 83367f62e4..1d863ad8d2 100644 --- a/crypto/err/Makefile.ssl +++ b/crypto/err/Makefile.ssl @@ -86,14 +86,14 @@ err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h err.o: ../../include/openssl/symhacks.h ../cryptlib.h err.c err_all.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -err_all.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -err_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -err_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -err_all.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -err_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -err_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -err_all.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h -err_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +err_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +err_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +err_all.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +err_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +err_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +err_all.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +err_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +err_all.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h err_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h err_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h err_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h diff --git a/crypto/err/err.c b/crypto/err/err.c index 1630cd3034..62e3f42b38 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -213,6 +213,7 @@ static ERR_STRING_DATA ERR_str_reasons[]= {ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED ,"called a function you should not call"}, {ERR_R_PASSED_NULL_PARAMETER ,"passed a null parameter"}, {ERR_R_INTERNAL_ERROR ,"internal error"}, +{ERR_R_DISABLED ,"called a function that was disabled at compile-time"}, {0,NULL}, }; diff --git a/crypto/err/err.h b/crypto/err/err.h index 8728ff7c02..ec895c4d12 100644 --- a/crypto/err/err.h +++ b/crypto/err/err.h @@ -132,6 +132,7 @@ typedef struct err_state_st #define ERR_LIB_UI 40 #define ERR_LIB_COMP 41 #define ERR_LIB_ECDSA 42 +#define ERR_LIB_ECDH 43 #define ERR_LIB_USER 128 @@ -161,6 +162,7 @@ typedef struct err_state_st #define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__) #define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__) #define ECDSAerr(f,r) ERR_PUT_error(ERR_LIB_ECDSA,(f),(r),__FILE__,__LINE__) +#define ECDHerr(f,r) ERR_PUT_error(ERR_LIB_ECDH,(f),(r),__FILE__,__LINE__) /* Borland C seems too stupid to be able to shift and do longs in * the pre-processor :-( */ @@ -214,6 +216,7 @@ typedef struct err_state_st #define ERR_R_UI_LIB ERR_LIB_UI /* 40 */ #define ERR_R_COMP_LIB ERR_LIB_COMP /* 41 */ #define ERR_R_ECDSA_LIB ERR_LIB_ECDSA /* 42 */ +#define ERR_R_ECDH_LIB ERR_LIB_ECDH /* 43 */ #define ERR_R_NESTED_ASN1_ERROR 58 #define ERR_R_BAD_ASN1_OBJECT_HEADER 59 @@ -228,6 +231,7 @@ typedef struct err_state_st #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) #define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) #define ERR_R_INTERNAL_ERROR (4|ERR_R_FATAL) +#define ERR_R_DISABLED (5|ERR_R_FATAL) /* 99 is the maximum possible ERR_R_... code, higher values * are reserved for the individual libraries */ diff --git a/crypto/err/openssl.ec b/crypto/err/openssl.ec index 11bb1f9c42..38d68f23e7 100644 --- a/crypto/err/openssl.ec +++ b/crypto/err/openssl.ec @@ -28,6 +28,7 @@ L ENGINE crypto/engine/engine.h crypto/engine/eng_err.c L OCSP crypto/ocsp/ocsp.h crypto/ocsp/ocsp_err.c L UI crypto/ui/ui.h crypto/ui/ui_err.c L ECDSA crypto/ecdsa/ecdsa.h crypto/ecdsa/ecs_err.c +L ECDH crypto/ecdh/ecdh.h crypto/ecdh/ech_err.c # additional header files to be scanned for function names L NONE crypto/x509/x509_vfy.h NONE diff --git a/crypto/evp/Makefile.ssl b/crypto/evp/Makefile.ssl index 0560fcf6a6..70c8f925b0 100644 --- a/crypto/evp/Makefile.ssl +++ b/crypto/evp/Makefile.ssl @@ -199,13 +199,13 @@ c_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h c_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h c_all.o: ../../include/openssl/ui_compat.h ../cryptlib.h c_all.c c_allc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -c_allc.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -c_allc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -c_allc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -c_allc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -c_allc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -c_allc.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +c_allc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +c_allc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +c_allc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +c_allc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +c_allc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +c_allc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h c_allc.o: ../../include/openssl/err.h ../../include/openssl/evp.h c_allc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h c_allc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -222,13 +222,13 @@ c_allc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h c_allc.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h c_allc.o: ../cryptlib.h c_allc.c c_alld.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -c_alld.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -c_alld.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -c_alld.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -c_alld.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -c_alld.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -c_alld.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -c_alld.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +c_alld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +c_alld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +c_alld.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +c_alld.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +c_alld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +c_alld.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +c_alld.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h c_alld.o: ../../include/openssl/err.h ../../include/openssl/evp.h c_alld.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h c_alld.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -245,13 +245,13 @@ c_alld.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h c_alld.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h c_alld.o: ../cryptlib.h c_alld.c digest.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -digest.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -digest.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -digest.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +digest.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +digest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +digest.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h digest.o: ../../include/openssl/evp.h ../../include/openssl/idea.h digest.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -496,14 +496,14 @@ encode.o: ../../include/openssl/sha.h ../../include/openssl/stack.h encode.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h encode.o: ../../include/openssl/ui_compat.h ../cryptlib.h encode.c evp_acnf.o: ../../e_os.h ../../include/openssl/aes.h -evp_acnf.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -evp_acnf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -evp_acnf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -evp_acnf.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -evp_acnf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -evp_acnf.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -evp_acnf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -evp_acnf.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +evp_acnf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_acnf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_acnf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_acnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +evp_acnf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +evp_acnf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +evp_acnf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +evp_acnf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h evp_acnf.o: ../../include/openssl/engine.h ../../include/openssl/err.h evp_acnf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h evp_acnf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -519,13 +519,13 @@ evp_acnf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h evp_acnf.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h evp_acnf.o: ../cryptlib.h evp_acnf.c evp_enc.o: ../../e_os.h ../../include/openssl/aes.h -evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -evp_enc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -evp_enc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -evp_enc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -evp_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -evp_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -evp_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_enc.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h evp_enc.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h evp_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h evp_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -560,13 +560,13 @@ evp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h evp_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h evp_err.o: evp_err.c evp_key.o: ../../e_os.h ../../include/openssl/aes.h -evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -evp_key.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -evp_key.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -evp_key.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -evp_key.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -evp_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -evp_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_key.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h evp_key.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h evp_key.o: ../../include/openssl/evp.h ../../include/openssl/idea.h evp_key.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -603,13 +603,13 @@ evp_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h evp_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h evp_lib.o: ../cryptlib.h evp_lib.c evp_pbe.o: ../../e_os.h ../../include/openssl/aes.h -evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -evp_pbe.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -evp_pbe.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -evp_pbe.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -evp_pbe.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -evp_pbe.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -evp_pbe.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_pbe.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h evp_pbe.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h evp_pbe.o: ../../include/openssl/evp.h ../../include/openssl/idea.h evp_pbe.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -626,13 +626,13 @@ evp_pbe.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h evp_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h evp_pbe.o: ../cryptlib.h evp_pbe.c evp_pkey.o: ../../e_os.h ../../include/openssl/aes.h -evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -evp_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -evp_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -evp_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -evp_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -evp_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -evp_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h evp_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h evp_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h evp_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -649,13 +649,13 @@ evp_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h evp_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h evp_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pkey.c m_dss.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_dss.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_dss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_dss.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_dss.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_dss.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_dss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_dss.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_dss.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_dss.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_dss.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_dss.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_dss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_dss.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_dss.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_dss.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_dss.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_dss.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -671,13 +671,13 @@ m_dss.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_dss.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_dss.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_dss.c m_dss1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_dss1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_dss1.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_dss1.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_dss1.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_dss1.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_dss1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_dss1.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_dss1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_dss1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_dss1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_dss1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_dss1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_dss1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_dss1.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_dss1.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_dss1.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_dss1.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -693,13 +693,13 @@ m_dss1.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_dss1.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_dss1.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_dss1.c m_ecdsa.o: ../../e_os.h ../../include/openssl/aes.h -m_ecdsa.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -m_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -m_ecdsa.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -m_ecdsa.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -m_ecdsa.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -m_ecdsa.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -m_ecdsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_ecdsa.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +m_ecdsa.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +m_ecdsa.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +m_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +m_ecdsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +m_ecdsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +m_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h m_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h m_ecdsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h m_ecdsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -716,13 +716,13 @@ m_ecdsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h m_ecdsa.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h m_ecdsa.o: ../cryptlib.h m_ecdsa.c m_md2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_md2.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_md2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_md2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_md2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_md2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_md2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_md2.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_md2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_md2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_md2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_md2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_md2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_md2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_md2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_md2.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_md2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_md2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -738,13 +738,13 @@ m_md2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_md2.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_md2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md2.c m_md4.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_md4.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_md4.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_md4.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_md4.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_md4.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_md4.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_md4.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_md4.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_md4.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_md4.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_md4.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_md4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_md4.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_md4.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_md4.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_md4.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_md4.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -760,13 +760,13 @@ m_md4.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_md4.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_md4.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md4.c m_md5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_md5.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_md5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_md5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_md5.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_md5.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_md5.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_md5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_md5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_md5.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_md5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_md5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_md5.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_md5.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_md5.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_md5.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -782,13 +782,13 @@ m_md5.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_md5.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_md5.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md5.c m_mdc2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_mdc2.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_mdc2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_mdc2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_mdc2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_mdc2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_mdc2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_mdc2.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_mdc2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_mdc2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_mdc2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_mdc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_mdc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_mdc2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_mdc2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_mdc2.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_mdc2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_mdc2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -804,13 +804,13 @@ m_mdc2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_mdc2.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_mdc2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_mdc2.c m_null.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_null.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_null.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_null.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_null.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_null.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_null.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_null.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_null.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_null.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_null.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_null.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -826,13 +826,13 @@ m_null.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_null.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_null.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_null.c m_ripemd.o: ../../e_os.h ../../include/openssl/aes.h -m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -m_ripemd.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -m_ripemd.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -m_ripemd.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -m_ripemd.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -m_ripemd.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -m_ripemd.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +m_ripemd.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +m_ripemd.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +m_ripemd.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +m_ripemd.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +m_ripemd.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h m_ripemd.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h m_ripemd.o: ../../include/openssl/evp.h ../../include/openssl/idea.h m_ripemd.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -849,13 +849,13 @@ m_ripemd.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h m_ripemd.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h m_ripemd.o: ../cryptlib.h m_ripemd.c m_sha.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_sha.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_sha.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_sha.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_sha.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_sha.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_sha.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_sha.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_sha.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_sha.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_sha.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_sha.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_sha.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_sha.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_sha.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_sha.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_sha.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -871,13 +871,13 @@ m_sha.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_sha.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_sha.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_sha.c m_sha1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_sha1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_sha1.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_sha1.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_sha1.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_sha1.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_sha1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_sha1.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_sha1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_sha1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_sha1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_sha1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_sha1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_sha1.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_sha1.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_sha1.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_sha1.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -893,13 +893,13 @@ m_sha1.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_sha1.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_sha1.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_sha1.c names.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -names.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -names.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -names.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -names.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -names.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -names.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -names.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +names.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +names.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +names.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +names.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +names.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +names.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +names.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h names.o: ../../include/openssl/err.h ../../include/openssl/evp.h names.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h names.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -915,13 +915,13 @@ names.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h names.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h names.o: ../../include/openssl/x509_vfy.h ../cryptlib.h names.c p5_crpt.o: ../../e_os.h ../../include/openssl/aes.h -p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p5_crpt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p5_crpt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p5_crpt.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p5_crpt.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p5_crpt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p5_crpt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p5_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p5_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p5_crpt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p5_crpt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p5_crpt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p5_crpt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p5_crpt.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p5_crpt.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -938,13 +938,13 @@ p5_crpt.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p5_crpt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p5_crpt.o: ../cryptlib.h p5_crpt.c p5_crpt2.o: ../../e_os.h ../../include/openssl/aes.h -p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p5_crpt2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p5_crpt2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p5_crpt2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p5_crpt2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p5_crpt2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p5_crpt2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p5_crpt2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p5_crpt2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p5_crpt2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p5_crpt2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p5_crpt2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p5_crpt2.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p5_crpt2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p5_crpt2.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h p5_crpt2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -962,13 +962,13 @@ p5_crpt2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p5_crpt2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p5_crpt2.o: ../cryptlib.h p5_crpt2.c p_dec.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -p_dec.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -p_dec.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -p_dec.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -p_dec.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -p_dec.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -p_dec.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p_dec.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +p_dec.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_dec.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_dec.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_dec.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_dec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_dec.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h p_dec.o: ../../include/openssl/err.h ../../include/openssl/evp.h p_dec.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h p_dec.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -985,13 +985,13 @@ p_dec.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p_dec.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p_dec.o: ../cryptlib.h p_dec.c p_enc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -p_enc.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -p_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -p_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -p_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -p_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -p_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p_enc.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +p_enc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_enc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_enc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_enc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h p_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h p_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h p_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -1008,13 +1008,13 @@ p_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p_enc.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p_enc.o: ../cryptlib.h p_enc.c p_lib.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h -p_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p_lib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +p_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -1031,13 +1031,13 @@ p_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p_lib.o: ../cryptlib.h p_lib.c p_open.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -p_open.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -p_open.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -p_open.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -p_open.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -p_open.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -p_open.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p_open.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +p_open.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_open.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_open.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_open.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_open.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_open.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_open.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h p_open.o: ../../include/openssl/err.h ../../include/openssl/evp.h p_open.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h p_open.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -1053,13 +1053,13 @@ p_open.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p_open.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p_open.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_open.c p_seal.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -p_seal.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -p_seal.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -p_seal.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -p_seal.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -p_seal.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -p_seal.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p_seal.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +p_seal.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_seal.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_seal.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_seal.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_seal.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h p_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h p_seal.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h p_seal.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -1076,13 +1076,13 @@ p_seal.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p_seal.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p_seal.o: ../cryptlib.h p_seal.c p_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -p_sign.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -p_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -p_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -p_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -p_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -p_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +p_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h p_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h p_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h p_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -1098,13 +1098,13 @@ p_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p_sign.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_sign.c p_verify.o: ../../e_os.h ../../include/openssl/aes.h -p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p_verify.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p_verify.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p_verify.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p_verify.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p_verify.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p_verify.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p_verify.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p_verify.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p_verify.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p_verify.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h diff --git a/crypto/evp/evp.h b/crypto/evp/evp.h index 1a679d5e20..10e9e414c5 100644 --- a/crypto/evp/evp.h +++ b/crypto/evp/evp.h @@ -150,13 +150,13 @@ #define EVP_PK_RSA 0x0001 #define EVP_PK_DSA 0x0002 #define EVP_PK_DH 0x0004 -#define EVP_PK_ECDSA 0x0008 +#define EVP_PK_EC 0x0008 #define EVP_PKT_SIGN 0x0010 #define EVP_PKT_ENC 0x0020 #define EVP_PKT_EXCH 0x0040 #define EVP_PKS_RSA 0x0100 #define EVP_PKS_DSA 0x0200 -#define EVP_PKS_ECDSA 0x0400 +#define EVP_PKS_EC 0x0400 #define EVP_PKT_EXP 0x1000 /* <= 512 bit key */ #define EVP_PKEY_NONE NID_undef @@ -168,7 +168,7 @@ #define EVP_PKEY_DSA3 NID_dsaWithSHA1 #define EVP_PKEY_DSA4 NID_dsaWithSHA1_2 #define EVP_PKEY_DH NID_dhKeyAgreement -#define EVP_PKEY_ECDSA NID_X9_62_id_ecPublicKey +#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey #ifdef __cplusplus extern "C" { @@ -193,8 +193,8 @@ struct evp_pkey_st #ifndef OPENSSL_NO_DH struct dh_st *dh; /* DH */ #endif -#ifndef OPENSSL_NO_ECDSA - struct ecdsa_st *ecdsa; /* ECDSA */ +#ifndef OPENSSL_NO_EC + struct ec_key_st *eckey;/* ECC */ #endif } pkey; int save_parameters; @@ -309,7 +309,7 @@ struct env_md_st #ifndef OPENSSL_NO_ECDSA #define EVP_PKEY_ECDSA_method ECDSA_sign,ECDSA_verify, \ - {EVP_PKEY_ECDSA,0,0,0} + {EVP_PKEY_EC,0,0,0} #else #define EVP_PKEY_ECDSA_method EVP_PKEY_NULL_method #endif @@ -454,9 +454,9 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, (char *)(dh)) #endif -#ifndef OPENSSL_NO_ECDSA -#define EVP_PKEY_assign_ECDSA(pkey,ecdsa) EVP_PKEY_assign((pkey),EVP_PKEY_ECDSA,\ - (char *)(ecdsa)) +#ifndef OPENSSL_NO_EC +#define EVP_PKEY_assign_EC_KEY(pkey,eckey) EVP_PKEY_assign((pkey),EVP_PKEY_EC,\ + (char *)(eckey)) #endif /* Add some extra combinations */ @@ -785,10 +785,10 @@ struct dh_st; int EVP_PKEY_set1_DH(EVP_PKEY *pkey,struct dh_st *key); struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey); #endif -#ifndef OPENSSL_NO_ECDSA -struct ecdsa_st; -int EVP_PKEY_set1_ECDSA(EVP_PKEY *pkey,struct ecdsa_st *key); -struct ecdsa_st *EVP_PKEY_get1_ECDSA(EVP_PKEY *pkey); +#ifndef OPENSSL_NO_EC +struct ec_key_st; +int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey,struct ec_key_st *key); +struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey); #endif EVP_PKEY * EVP_PKEY_new(void); @@ -848,6 +848,7 @@ void ERR_load_EVP_strings(void); /* Function codes. */ #define EVP_F_D2I_PKEY 100 #define EVP_F_ECDSA_PKEY2PKCS8 129 +#define EVP_F_EC_KEY_PKEY2PKCS8 132 #define EVP_F_EVP_CIPHERINIT 123 #define EVP_F_EVP_CIPHER_CTX_CTRL 124 #define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 @@ -867,6 +868,7 @@ void ERR_load_EVP_strings(void); #define EVP_F_EVP_PKEY_GET1_DH 119 #define EVP_F_EVP_PKEY_GET1_DSA 120 #define EVP_F_EVP_PKEY_GET1_ECDSA 130 +#define EVP_F_EVP_PKEY_GET1_EC_KEY 131 #define EVP_F_EVP_PKEY_GET1_RSA 121 #define EVP_F_EVP_PKEY_NEW 106 #define EVP_F_EVP_RIJNDAEL 126 @@ -896,6 +898,7 @@ void ERR_load_EVP_strings(void); #define EVP_R_EXPECTING_A_DH_KEY 128 #define EVP_R_EXPECTING_A_DSA_KEY 129 #define EVP_R_EXPECTING_A_ECDSA_KEY 141 +#define EVP_R_EXPECTING_A_EC_KEY 142 #define EVP_R_INITIALIZATION_ERROR 134 #define EVP_R_INPUT_NOT_INITIALIZED 111 #define EVP_R_INVALID_KEY_LENGTH 130 diff --git a/crypto/evp/evp_err.c b/crypto/evp/evp_err.c index e6c71d4e01..815ce63b3b 100644 --- a/crypto/evp/evp_err.c +++ b/crypto/evp/evp_err.c @@ -1,6 +1,6 @@ /* crypto/evp/evp_err.c */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -68,6 +68,7 @@ static ERR_STRING_DATA EVP_str_functs[]= { {ERR_PACK(0,EVP_F_D2I_PKEY,0), "D2I_PKEY"}, {ERR_PACK(0,EVP_F_ECDSA_PKEY2PKCS8,0), "ECDSA_PKEY2PKCS8"}, +{ERR_PACK(0,EVP_F_EC_KEY_PKEY2PKCS8,0), "EC_KEY_PKEY2PKCS8"}, {ERR_PACK(0,EVP_F_EVP_CIPHERINIT,0), "EVP_CipherInit"}, {ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_CTRL,0), "EVP_CIPHER_CTX_ctrl"}, {ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH,0), "EVP_CIPHER_CTX_set_key_length"}, @@ -86,7 +87,8 @@ static ERR_STRING_DATA EVP_str_functs[]= {ERR_PACK(0,EVP_F_EVP_PKEY_ENCRYPT,0), "EVP_PKEY_encrypt"}, {ERR_PACK(0,EVP_F_EVP_PKEY_GET1_DH,0), "EVP_PKEY_get1_DH"}, {ERR_PACK(0,EVP_F_EVP_PKEY_GET1_DSA,0), "EVP_PKEY_get1_DSA"}, -{ERR_PACK(0,EVP_F_EVP_PKEY_GET1_ECDSA,0), "EVP_PKEY_get1_ECDSA"}, +{ERR_PACK(0,EVP_F_EVP_PKEY_GET1_ECDSA,0), "EVP_PKEY_GET1_ECDSA"}, +{ERR_PACK(0,EVP_F_EVP_PKEY_GET1_EC_KEY,0), "EVP_PKEY_get1_EC_KEY"}, {ERR_PACK(0,EVP_F_EVP_PKEY_GET1_RSA,0), "EVP_PKEY_get1_RSA"}, {ERR_PACK(0,EVP_F_EVP_PKEY_NEW,0), "EVP_PKEY_new"}, {ERR_PACK(0,EVP_F_EVP_RIJNDAEL,0), "EVP_RIJNDAEL"}, @@ -119,6 +121,7 @@ static ERR_STRING_DATA EVP_str_reasons[]= {EVP_R_EXPECTING_A_DH_KEY ,"expecting a dh key"}, {EVP_R_EXPECTING_A_DSA_KEY ,"expecting a dsa key"}, {EVP_R_EXPECTING_A_ECDSA_KEY ,"expecting a ecdsa key"}, +{EVP_R_EXPECTING_A_EC_KEY ,"expecting a ec key"}, {EVP_R_INITIALIZATION_ERROR ,"initialization error"}, {EVP_R_INPUT_NOT_INITIALIZED ,"input not initialized"}, {EVP_R_INVALID_KEY_LENGTH ,"invalid key length"}, diff --git a/crypto/evp/evp_pkey.c b/crypto/evp/evp_pkey.c index 1772647b16..43200a91a8 100644 --- a/crypto/evp/evp_pkey.c +++ b/crypto/evp/evp_pkey.c @@ -65,8 +65,8 @@ #ifndef OPENSSL_NO_DSA static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8inf, EVP_PKEY *pkey); #endif -#ifndef OPENSSL_NO_ECDSA -static int ecdsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8inf, EVP_PKEY *pkey); +#ifndef OPENSSL_NO_EC +static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8inf, EVP_PKEY *pkey); #endif /* Extract a private key from a PKCS8 structure */ @@ -80,10 +80,10 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8) #ifndef OPENSSL_NO_DSA DSA *dsa = NULL; #endif -#ifndef OPENSSL_NO_ECDSA - ECDSA *ecdsa = NULL; +#ifndef OPENSSL_NO_EC + EC_KEY *eckey = NULL; #endif -#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_ECDSA) +#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_EC) ASN1_INTEGER *privkey; ASN1_TYPE *t1, *t2, *param = NULL; STACK_OF(ASN1_TYPE) *n_stack = NULL; @@ -124,7 +124,7 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8) EVP_PKEY_assign_RSA (pkey, rsa); break; #endif -#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_ECDSA) +#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_EC) case NID_ecdsa_with_SHA1: case NID_dsa: /* PKCS#8 DSA/ECDSA is weird: you just get a private key integer @@ -235,35 +235,38 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8) } else /* nid == NID_ecdsa_with_SHA1 */ { -#ifndef OPENSSL_NO_ECDSA - if ((ecdsa = d2i_ECDSAParameters(NULL, &cp, plen)) == NULL) +#ifndef OPENSSL_NO_EC + if ((eckey = d2i_ECParameters(NULL, &cp, + plen)) == NULL) { EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR); goto err; } - if ((ecdsa->priv_key = ASN1_INTEGER_to_BN(privkey, NULL)) == NULL) + if ((eckey->priv_key = ASN1_INTEGER_to_BN(privkey, + NULL)) == NULL) { EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR); goto err; } - if ((ecdsa->pub_key = EC_POINT_new(ecdsa->group)) == NULL) + if ((eckey->pub_key = EC_POINT_new(eckey->group)) == NULL) { EVPerr(EVP_F_EVP_PKCS82PKEY, ERR_R_EC_LIB); goto err; } - if (!EC_POINT_copy(ecdsa->pub_key, EC_GROUP_get0_generator(ecdsa->group))) + if (!EC_POINT_copy(eckey->pub_key, + EC_GROUP_get0_generator(eckey->group))) { EVPerr(EVP_F_EVP_PKCS82PKEY, ERR_R_EC_LIB); goto err; } - if (!EC_POINT_mul(ecdsa->group, ecdsa->pub_key, ecdsa->priv_key, - NULL, NULL, ctx)) + if (!EC_POINT_mul(eckey->group, eckey->pub_key, + eckey->priv_key, NULL, NULL, ctx)) { EVPerr(EVP_F_EVP_PKCS82PKEY, ERR_R_EC_LIB); goto err; } - EVP_PKEY_assign_ECDSA(pkey, ecdsa); + EVP_PKEY_assign_EC_KEY(pkey, eckey); BN_CTX_free(ctx); if (n_stack) sk_ASN1_TYPE_pop_free(n_stack, ASN1_TYPE_free); else @@ -280,8 +283,9 @@ err: #ifndef OPENSSL_NO_DSA if (dsa) DSA_free(dsa); #endif -#ifndef OPENSSL_NO_ECDSA - if (ecdsa) ECDSA_free(ecdsa); +#ifndef OPENSSL_NO_EC + if (eckey) + EC_KEY_free(eckey); #endif if (pkey) EVP_PKEY_free(pkey); return NULL; @@ -346,9 +350,9 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken) break; #endif -#ifndef OPENSSL_NO_ECDSA - case EVP_PKEY_ECDSA: - if (!ecdsa_pkey2pkcs8(p8, pkey)) +#ifndef OPENSSL_NO_EC + case EVP_PKEY_EC: + if (!eckey_pkey2pkcs8(p8, pkey)) { PKCS8_PRIV_KEY_INFO_free(p8); return(NULL); @@ -499,53 +503,54 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) } #endif -#ifndef OPENSSL_NO_ECDSA -static int ecdsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) +#ifndef OPENSSL_NO_EC +static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) { ASN1_STRING *params=NULL; ASN1_INTEGER *prkey=NULL; ASN1_TYPE *ttmp=NULL; - STACK_OF(ASN1_TYPE) *necdsa=NULL; + STACK_OF(ASN1_TYPE) *neckey=NULL; unsigned char *p=NULL, *q=NULL; int len=0; EC_POINT *point=NULL; - if (pkey->pkey.ecdsa == NULL || pkey->pkey.ecdsa->group == NULL) + if (pkey->pkey.eckey == NULL || pkey->pkey.eckey->group == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, EVP_R_MISSING_PARAMETERS); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, EVP_R_MISSING_PARAMETERS); return 0; } p8->pkeyalg->algorithm = OBJ_nid2obj(NID_ecdsa_with_SHA1); - len = i2d_ECDSAParameters(pkey->pkey.ecdsa, NULL); + len = i2d_ECParameters(pkey->pkey.eckey, NULL); if ((p = OPENSSL_malloc(len)) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); return 0; } q = p; - if (!i2d_ECDSAParameters(pkey->pkey.ecdsa, &q)) + if (!i2d_ECParameters(pkey->pkey.eckey, &q)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_ECDSA_LIB); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_EC_LIB); OPENSSL_free(p); return 0; } if ((params = ASN1_STRING_new()) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); OPENSSL_free(p); return 0; } if (!ASN1_STRING_set(params, p, len)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_ASN1_LIB); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_ASN1_LIB); OPENSSL_free(p); return 0; } OPENSSL_free(p); - if ((prkey = BN_to_ASN1_INTEGER(pkey->pkey.ecdsa->priv_key, NULL)) == NULL) + if ((prkey = BN_to_ASN1_INTEGER(pkey->pkey.eckey->priv_key, NULL)) + == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_ASN1_LIB); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_ASN1_LIB); return 0; } @@ -557,7 +562,7 @@ static int ecdsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) if (!ASN1_pack_string((char *)prkey, i2d_ASN1_INTEGER, &p8->pkey->value.octet_string)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); M_ASN1_INTEGER_free(prkey); return 0; } @@ -572,134 +577,137 @@ static int ecdsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) p8->pkeyalg->parameter->value.sequence = params; p8->pkeyalg->parameter->type = V_ASN1_SEQUENCE; - necdsa = sk_ASN1_TYPE_new_null(); - if (necdsa == NULL || (ttmp = ASN1_TYPE_new()) == NULL) + neckey = sk_ASN1_TYPE_new_null(); + if (neckey == NULL || (ttmp = ASN1_TYPE_new()) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); return 0; } - if ((point = EC_GROUP_get0_generator(pkey->pkey.ecdsa->group)) == NULL) + if ((point = EC_GROUP_get0_generator(pkey->pkey.eckey->group)) + == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_EC_LIB); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_EC_LIB); return 0; } - len = EC_POINT_point2oct(pkey->pkey.ecdsa->group, point, ECDSA_get_conversion_form(pkey->pkey.ecdsa), - NULL, 0, NULL); + len = EC_POINT_point2oct(pkey->pkey.eckey->group, point, + pkey->pkey.eckey->conv_form, NULL, 0, NULL); p = OPENSSL_malloc(len); - if (!len || !p || !EC_POINT_point2oct(pkey->pkey.ecdsa->group, point, - ECDSA_get_conversion_form(pkey->pkey.ecdsa), p, len, NULL)) + if (!len || !p || !EC_POINT_point2oct(pkey->pkey.eckey->group, + point, pkey->pkey.eckey->conv_form, p, len, NULL)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_EC_LIB); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_EC_LIB); OPENSSL_free(p); return 0; } - if ((ttmp->value.octet_string = ASN1_OCTET_STRING_new()) == NULL) + if ((ttmp->value.octet_string =ASN1_OCTET_STRING_new()) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); return 0; } if (!ASN1_OCTET_STRING_set(ttmp->value.octet_string, p, len)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, EVP_R_ASN1_LIB); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, EVP_R_ASN1_LIB); return 0; } OPENSSL_free(p); ttmp->type = V_ASN1_OCTET_STRING; - if (!sk_ASN1_TYPE_push(necdsa, ttmp)) + if (!sk_ASN1_TYPE_push(neckey, ttmp)) { - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); ASN1_INTEGER_free(prkey); return 0; } if ((ttmp = ASN1_TYPE_new()) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); return 0; } ttmp->value.integer = prkey; ttmp->type = V_ASN1_INTEGER; - if (!sk_ASN1_TYPE_push(necdsa, ttmp)) + if (!sk_ASN1_TYPE_push(neckey, ttmp)) { - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); ASN1_INTEGER_free(prkey); return 0; } - if ((p8->pkey->value.octet_string = ASN1_OCTET_STRING_new()) == NULL) + if ((p8->pkey->value.octet_string = ASN1_OCTET_STRING_new()) + == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); return 0; } - if (!ASN1_seq_pack_ASN1_TYPE(necdsa, i2d_ASN1_TYPE, + if (!ASN1_seq_pack_ASN1_TYPE(neckey, i2d_ASN1_TYPE, &p8->pkey->value.octet_string->data, &p8->pkey->value.octet_string->length)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); return 0; } - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); break; case PKCS8_EMBEDDED_PARAM: p8->pkeyalg->parameter->type = V_ASN1_NULL; - necdsa = sk_ASN1_TYPE_new_null(); + neckey = sk_ASN1_TYPE_new_null(); if ((ttmp = ASN1_TYPE_new()) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); ASN1_INTEGER_free(prkey); return 0; } ttmp->value.sequence = params; ttmp->type = V_ASN1_SEQUENCE; - if (!sk_ASN1_TYPE_push(necdsa, ttmp)) + if (!sk_ASN1_TYPE_push(neckey, ttmp)) { - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); ASN1_INTEGER_free(prkey); return 0; } if ((ttmp = ASN1_TYPE_new()) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); ASN1_INTEGER_free(prkey); return 0; } ttmp->value.integer = prkey; ttmp->type = V_ASN1_INTEGER; - if (!sk_ASN1_TYPE_push(necdsa, ttmp)) + if (!sk_ASN1_TYPE_push(neckey, ttmp)) { - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); ASN1_INTEGER_free(prkey); return 0; } - if ((p8->pkey->value.octet_string = ASN1_OCTET_STRING_new()) == NULL) + if ((p8->pkey->value.octet_string = ASN1_OCTET_STRING_new()) + == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); return 0; } - if (!ASN1_seq_pack_ASN1_TYPE(necdsa, i2d_ASN1_TYPE, + if (!ASN1_seq_pack_ASN1_TYPE(neckey, i2d_ASN1_TYPE, &p8->pkey->value.octet_string->data, &p8->pkey->value.octet_string->length)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); return 0; } - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); break; } return 1; diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index fcb5711753..1056e4bffd 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -79,8 +79,8 @@ int EVP_PKEY_bits(EVP_PKEY *pkey) else if (pkey->type == EVP_PKEY_DSA) return(BN_num_bits(pkey->pkey.dsa->p)); #endif -#ifndef OPENSSL_NO_ECDSA - else if (pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + else if (pkey->type == EVP_PKEY_EC) { BIGNUM *order = BN_new(); int ret; @@ -90,7 +90,7 @@ int EVP_PKEY_bits(EVP_PKEY *pkey) ERR_clear_error(); return 0; } - if (!EC_GROUP_get_order(pkey->pkey.ecdsa->group, order, NULL)) + if (!EC_GROUP_get_order(pkey->pkey.eckey->group, order, NULL)) { ERR_clear_error(); return 0; @@ -117,9 +117,9 @@ int EVP_PKEY_size(EVP_PKEY *pkey) if (pkey->type == EVP_PKEY_DSA) return(DSA_size(pkey->pkey.dsa)); #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) - return(ECDSA_size(pkey->pkey.ecdsa)); +#ifndef OPENSSL_NO_EC + if (pkey->type == EVP_PKEY_EC) + return(ECDSA_size(pkey->pkey.eckey)); #endif return(0); @@ -137,8 +137,8 @@ int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode) return(ret); } #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (pkey->type == EVP_PKEY_EC) { int ret = pkey->save_parameters; @@ -181,13 +181,16 @@ int EVP_PKEY_copy_parameters(EVP_PKEY *to, EVP_PKEY *from) to->pkey.dsa->g=a; } #endif -#ifndef OPENSSL_NO_ECDSA - if (to->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (to->type == EVP_PKEY_EC) { - if (to->pkey.ecdsa->group != NULL) - EC_GROUP_free(to->pkey.ecdsa->group); - if ((to->pkey.ecdsa->group = EC_GROUP_new(EC_GROUP_method_of(from->pkey.ecdsa->group))) == NULL) goto err; - if (!EC_GROUP_copy(to->pkey.ecdsa->group,from->pkey.ecdsa->group)) goto err; + if (to->pkey.eckey->group != NULL) + EC_GROUP_free(to->pkey.eckey->group); + if ((to->pkey.eckey->group = EC_GROUP_new( + EC_GROUP_method_of(from->pkey.eckey->group))) == NULL) + goto err; + if (!EC_GROUP_copy(to->pkey.eckey->group, + from->pkey.eckey->group)) goto err; } #endif return(1); @@ -207,10 +210,10 @@ int EVP_PKEY_missing_parameters(EVP_PKEY *pkey) return(1); } #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (pkey->type == EVP_PKEY_EC) { - if (pkey->pkey.ecdsa->group == NULL) + if (pkey->pkey.eckey->group == NULL) return(1); } #endif @@ -303,24 +306,24 @@ DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey) } #endif -#ifndef OPENSSL_NO_ECDSA +#ifndef OPENSSL_NO_EC -int EVP_PKEY_set1_ECDSA(EVP_PKEY *pkey, ECDSA *key) +int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) { - int ret = EVP_PKEY_assign_ECDSA(pkey,key); - if (ret) CRYPTO_add(&key->references, 1,CRYPTO_LOCK_ECDSA); + int ret = EVP_PKEY_assign_EC_KEY(pkey,key); + if (ret) CRYPTO_add(&key->references, 1, CRYPTO_LOCK_EC); return ret; } -ECDSA *EVP_PKEY_get1_ECDSA(EVP_PKEY *pkey) +EC_KEY *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey) { - if (pkey->type != EVP_PKEY_ECDSA) + if (pkey->type != EVP_PKEY_EC) { - EVPerr(EVP_F_EVP_PKEY_GET1_ECDSA, EVP_R_EXPECTING_A_ECDSA_KEY); + EVPerr(EVP_F_EVP_PKEY_GET1_EC_KEY, EVP_R_EXPECTING_A_EC_KEY); return NULL; } - CRYPTO_add(&pkey->pkey.ecdsa->references, 1, CRYPTO_LOCK_ECDSA); - return pkey->pkey.ecdsa; + CRYPTO_add(&pkey->pkey.eckey->references, 1, CRYPTO_LOCK_EC); + return pkey->pkey.eckey; } #endif @@ -361,8 +364,8 @@ int EVP_PKEY_type(int type) return(EVP_PKEY_DSA); case EVP_PKEY_DH: return(EVP_PKEY_DH); - case EVP_PKEY_ECDSA: - return(EVP_PKEY_ECDSA); + case EVP_PKEY_EC: + return(EVP_PKEY_EC); default: return(NID_undef); } @@ -408,9 +411,9 @@ static void EVP_PKEY_free_it(EVP_PKEY *x) DSA_free(x->pkey.dsa); break; #endif -#ifndef OPENSSL_NO_ECDSA - case EVP_PKEY_ECDSA: - ECDSA_free(x->pkey.ecdsa); +#ifndef OPENSSL_NO_EC + case EVP_PKEY_EC: + EC_KEY_free(x->pkey.eckey); break; #endif #ifndef OPENSSL_NO_DH diff --git a/crypto/install.com b/crypto/install.com index e5200aad9e..b35b424fdd 100644 --- a/crypto/install.com +++ b/crypto/install.com @@ -43,7 +43,7 @@ $ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN - $ $ SDIRS := ,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,- DES,RC2,RC4,RC5,IDEA,BF,CAST,- - BN,EC,RSA,DSA,ECDSA,DH,DSO,ENGINE,AES,- + BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,AES,- BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,- EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,- UI,KRB5 @@ -69,6 +69,7 @@ $ EXHEADER_RSA := rsa.h $ EXHEADER_DSA := dsa.h $ EXHEADER_ECDSA := ecdsa.h $ EXHEADER_DH := dh.h +$ EXHEADER_ECDH := ecdh.h $ EXHEADER_DSO := dso.h $ EXHEADER_ENGINE := engine.h $ EXHEADER_AES := aes.h diff --git a/crypto/krb5/Makefile.ssl b/crypto/krb5/Makefile.ssl index 496370f1aa..8daed59211 100644 --- a/crypto/krb5/Makefile.ssl +++ b/crypto/krb5/Makefile.ssl @@ -45,13 +45,13 @@ lib: $(LIBOBJ) @touch lib files: - perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO + $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO links: - $(TOP)/util/point.sh Makefile.ssl Makefile ; - $(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) - $(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) - $(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + @$(TOP)/util/point.sh Makefile.ssl Makefile ; + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) install: @for i in $(EXHEADER) ; \ diff --git a/crypto/mem.c b/crypto/mem.c index fd08560d23..3955006fca 100644 --- a/crypto/mem.c +++ b/crypto/mem.c @@ -316,6 +316,9 @@ void *CRYPTO_realloc(void *str, int num, const char *file, int line) { void *ret = NULL; + if (str == NULL) + return CRYPTO_malloc(num, file, line); + if (realloc_debug_func != NULL) realloc_debug_func(str, NULL, num, file, line, 0); ret = realloc_ex_func(str,num,file,line); diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 3ff64bb8d1..02c3719f04 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -436,7 +436,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) unsigned long l; unsigned char *p; const char *s; - char tbuf[32]; + char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; if (buf_len <= 0) return(0); diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h index 2a4754e0c1..48bb6aa60e 100644 --- a/crypto/objects/obj_dat.h +++ b/crypto/objects/obj_dat.h @@ -62,12 +62,12 @@ * [including the GNU Public Licence.] */ -#define NUM_NID 709 -#define NUM_SN 704 -#define NUM_LN 704 -#define NUM_OBJ 678 +#define NUM_NID 716 +#define NUM_SN 711 +#define NUM_LN 711 +#define NUM_OBJ 685 -static unsigned char lvalues[4814]={ +static unsigned char lvalues[4849]={ 0x00, /* [ 0] OBJ_undef */ 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */ @@ -746,6 +746,13 @@ static unsigned char lvalues[4814]={ 0x67,0x2A,0x08,0xAE,0x7B, /* [4791] OBJ_set_brand_Novus */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x0A, /* [4796] OBJ_des_cdmf */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x06,/* [4804] OBJ_rsaOAEPEncryptionSET */ +0x67,0x2B,0x0D,0x04,0x03, /* [4813] OBJ_wap_wsg_idm_ecid_wtls3 */ +0x67,0x2B,0x0D,0x04,0x04, /* [4818] OBJ_wap_wsg_idm_ecid_wtls4 */ +0x67,0x2B,0x0D,0x04,0x05, /* [4823] OBJ_wap_wsg_idm_ecid_wtls5 */ +0x67,0x2B,0x0D,0x04,0x07, /* [4828] OBJ_wap_wsg_idm_ecid_wtls7 */ +0x67,0x2B,0x0D,0x04,0x0A, /* [4833] OBJ_wap_wsg_idm_ecid_wtls10 */ +0x67,0x2B,0x0D,0x04,0x0B, /* [4838] OBJ_wap_wsg_idm_ecid_wtls11 */ +0x67,0x2B,0x0D,0x04,0x0C, /* [4843] OBJ_wap_wsg_idm_ecid_wtls12 */ }; static ASN1_OBJECT nid_objs[NUM_NID]={ @@ -1852,6 +1859,20 @@ static ASN1_OBJECT nid_objs[NUM_NID]={ {"DES-CDMF","des-cdmf",NID_des_cdmf,8,&(lvalues[4796]),0}, {"rsaOAEPEncryptionSET","rsaOAEPEncryptionSET", NID_rsaOAEPEncryptionSET,9,&(lvalues[4804]),0}, +{"wap-wsg-idm-ecid-wtls3","wap-wsg-idm-ecid-wtls3", + NID_wap_wsg_idm_ecid_wtls3,5,&(lvalues[4813]),0}, +{"wap-wsg-idm-ecid-wtls4","wap-wsg-idm-ecid-wtls4", + NID_wap_wsg_idm_ecid_wtls4,5,&(lvalues[4818]),0}, +{"wap-wsg-idm-ecid-wtls5","wap-wsg-idm-ecid-wtls5", + NID_wap_wsg_idm_ecid_wtls5,5,&(lvalues[4823]),0}, +{"wap-wsg-idm-ecid-wtls7","wap-wsg-idm-ecid-wtls7", + NID_wap_wsg_idm_ecid_wtls7,5,&(lvalues[4828]),0}, +{"wap-wsg-idm-ecid-wtls10","wap-wsg-idm-ecid-wtls10", + NID_wap_wsg_idm_ecid_wtls10,5,&(lvalues[4833]),0}, +{"wap-wsg-idm-ecid-wtls11","wap-wsg-idm-ecid-wtls11", + NID_wap_wsg_idm_ecid_wtls11,5,&(lvalues[4838]),0}, +{"wap-wsg-idm-ecid-wtls12","wap-wsg-idm-ecid-wtls12", + NID_wap_wsg_idm_ecid_wtls12,5,&(lvalues[4843]),0}, }; static ASN1_OBJECT *sn_objs[NUM_SN]={ @@ -2553,7 +2574,14 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[562]),/* "wap" */ &(nid_objs[563]),/* "wap-wsg" */ &(nid_objs[564]),/* "wap-wsg-idm-ecid-wtls1" */ +&(nid_objs[713]),/* "wap-wsg-idm-ecid-wtls10" */ +&(nid_objs[714]),/* "wap-wsg-idm-ecid-wtls11" */ +&(nid_objs[715]),/* "wap-wsg-idm-ecid-wtls12" */ +&(nid_objs[709]),/* "wap-wsg-idm-ecid-wtls3" */ +&(nid_objs[710]),/* "wap-wsg-idm-ecid-wtls4" */ +&(nid_objs[711]),/* "wap-wsg-idm-ecid-wtls5" */ &(nid_objs[565]),/* "wap-wsg-idm-ecid-wtls6" */ +&(nid_objs[712]),/* "wap-wsg-idm-ecid-wtls7" */ &(nid_objs[566]),/* "wap-wsg-idm-ecid-wtls8" */ &(nid_objs[567]),/* "wap-wsg-idm-ecid-wtls9" */ &(nid_objs[568]),/* "x500UniqueIdentifier" */ @@ -3259,7 +3287,14 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[562]),/* "wap" */ &(nid_objs[563]),/* "wap-wsg" */ &(nid_objs[564]),/* "wap-wsg-idm-ecid-wtls1" */ +&(nid_objs[713]),/* "wap-wsg-idm-ecid-wtls10" */ +&(nid_objs[714]),/* "wap-wsg-idm-ecid-wtls11" */ +&(nid_objs[715]),/* "wap-wsg-idm-ecid-wtls12" */ +&(nid_objs[709]),/* "wap-wsg-idm-ecid-wtls3" */ +&(nid_objs[710]),/* "wap-wsg-idm-ecid-wtls4" */ +&(nid_objs[711]),/* "wap-wsg-idm-ecid-wtls5" */ &(nid_objs[565]),/* "wap-wsg-idm-ecid-wtls6" */ +&(nid_objs[712]),/* "wap-wsg-idm-ecid-wtls7" */ &(nid_objs[566]),/* "wap-wsg-idm-ecid-wtls8" */ &(nid_objs[567]),/* "wap-wsg-idm-ecid-wtls9" */ &(nid_objs[568]),/* "x500UniqueIdentifier" */ @@ -3274,8 +3309,8 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[434]),/* OBJ_data 0 9 */ &(nid_objs[181]),/* OBJ_iso 1 */ &(nid_objs[182]),/* OBJ_member_body 1 2 */ -&(nid_objs[527]),/* OBJ_identified_organization 1 3 */ &(nid_objs[379]),/* OBJ_org 1 3 */ +&(nid_objs[527]),/* OBJ_identified_organization 1 3 */ &(nid_objs[393]),/* OBJ_joint_iso_ccitt 2 */ &(nid_objs[11]),/* OBJ_X500 2 5 */ &(nid_objs[380]),/* OBJ_dod 1 3 6 */ @@ -3515,9 +3550,16 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[694]),/* OBJ_setAttr_IssCap_Sig 2 23 42 3 3 5 */ &(nid_objs[706]),/* OBJ_set_brand_Novus 2 23 42 8 6011 */ &(nid_objs[564]),/* OBJ_wap_wsg_idm_ecid_wtls1 2 23 43 13 4 1 */ +&(nid_objs[709]),/* OBJ_wap_wsg_idm_ecid_wtls3 2 23 43 13 4 3 */ +&(nid_objs[710]),/* OBJ_wap_wsg_idm_ecid_wtls4 2 23 43 13 4 4 */ +&(nid_objs[711]),/* OBJ_wap_wsg_idm_ecid_wtls5 2 23 43 13 4 5 */ &(nid_objs[565]),/* OBJ_wap_wsg_idm_ecid_wtls6 2 23 43 13 4 6 */ +&(nid_objs[712]),/* OBJ_wap_wsg_idm_ecid_wtls7 2 23 43 13 4 7 */ &(nid_objs[566]),/* OBJ_wap_wsg_idm_ecid_wtls8 2 23 43 13 4 8 */ &(nid_objs[567]),/* OBJ_wap_wsg_idm_ecid_wtls9 2 23 43 13 4 9 */ +&(nid_objs[713]),/* OBJ_wap_wsg_idm_ecid_wtls10 2 23 43 13 4 10 */ +&(nid_objs[714]),/* OBJ_wap_wsg_idm_ecid_wtls11 2 23 43 13 4 11 */ +&(nid_objs[715]),/* OBJ_wap_wsg_idm_ecid_wtls12 2 23 43 13 4 12 */ &(nid_objs[124]),/* OBJ_rle_compression 1 1 1 1 666 1 */ &(nid_objs[125]),/* OBJ_zlib_compression 1 1 1 1 666 2 */ &(nid_objs[ 1]),/* OBJ_rsadsi 1 2 840 113549 */ diff --git a/crypto/objects/obj_mac.h b/crypto/objects/obj_mac.h index 57034c0050..ff9951a272 100644 --- a/crypto/objects/obj_mac.h +++ b/crypto/objects/obj_mac.h @@ -426,10 +426,26 @@ #define NID_wap_wsg_idm_ecid_wtls1 564 #define OBJ_wap_wsg_idm_ecid_wtls1 OBJ_wap_wsg_idm_ecid,1L +#define SN_wap_wsg_idm_ecid_wtls3 "wap-wsg-idm-ecid-wtls3" +#define NID_wap_wsg_idm_ecid_wtls3 709 +#define OBJ_wap_wsg_idm_ecid_wtls3 OBJ_wap_wsg_idm_ecid,3L + +#define SN_wap_wsg_idm_ecid_wtls4 "wap-wsg-idm-ecid-wtls4" +#define NID_wap_wsg_idm_ecid_wtls4 710 +#define OBJ_wap_wsg_idm_ecid_wtls4 OBJ_wap_wsg_idm_ecid,4L + +#define SN_wap_wsg_idm_ecid_wtls5 "wap-wsg-idm-ecid-wtls5" +#define NID_wap_wsg_idm_ecid_wtls5 711 +#define OBJ_wap_wsg_idm_ecid_wtls5 OBJ_wap_wsg_idm_ecid,5L + #define SN_wap_wsg_idm_ecid_wtls6 "wap-wsg-idm-ecid-wtls6" #define NID_wap_wsg_idm_ecid_wtls6 565 #define OBJ_wap_wsg_idm_ecid_wtls6 OBJ_wap_wsg_idm_ecid,6L +#define SN_wap_wsg_idm_ecid_wtls7 "wap-wsg-idm-ecid-wtls7" +#define NID_wap_wsg_idm_ecid_wtls7 712 +#define OBJ_wap_wsg_idm_ecid_wtls7 OBJ_wap_wsg_idm_ecid,7L + #define SN_wap_wsg_idm_ecid_wtls8 "wap-wsg-idm-ecid-wtls8" #define NID_wap_wsg_idm_ecid_wtls8 566 #define OBJ_wap_wsg_idm_ecid_wtls8 OBJ_wap_wsg_idm_ecid,8L @@ -438,6 +454,18 @@ #define NID_wap_wsg_idm_ecid_wtls9 567 #define OBJ_wap_wsg_idm_ecid_wtls9 OBJ_wap_wsg_idm_ecid,9L +#define SN_wap_wsg_idm_ecid_wtls10 "wap-wsg-idm-ecid-wtls10" +#define NID_wap_wsg_idm_ecid_wtls10 713 +#define OBJ_wap_wsg_idm_ecid_wtls10 OBJ_wap_wsg_idm_ecid,10L + +#define SN_wap_wsg_idm_ecid_wtls11 "wap-wsg-idm-ecid-wtls11" +#define NID_wap_wsg_idm_ecid_wtls11 714 +#define OBJ_wap_wsg_idm_ecid_wtls11 OBJ_wap_wsg_idm_ecid,11L + +#define SN_wap_wsg_idm_ecid_wtls12 "wap-wsg-idm-ecid-wtls12" +#define NID_wap_wsg_idm_ecid_wtls12 715 +#define OBJ_wap_wsg_idm_ecid_wtls12 OBJ_wap_wsg_idm_ecid,12L + #define SN_cast5_cbc "CAST5-CBC" #define LN_cast5_cbc "cast5-cbc" #define NID_cast5_cbc 108 diff --git a/crypto/objects/obj_mac.num b/crypto/objects/obj_mac.num index 9f241b666b..9e756f12a2 100644 --- a/crypto/objects/obj_mac.num +++ b/crypto/objects/obj_mac.num @@ -706,3 +706,10 @@ set_brand_MasterCard 705 set_brand_Novus 706 des_cdmf 707 rsaOAEPEncryptionSET 708 +wap_wsg_idm_ecid_wtls3 709 +wap_wsg_idm_ecid_wtls4 710 +wap_wsg_idm_ecid_wtls5 711 +wap_wsg_idm_ecid_wtls7 712 +wap_wsg_idm_ecid_wtls10 713 +wap_wsg_idm_ecid_wtls11 714 +wap_wsg_idm_ecid_wtls12 715 diff --git a/crypto/objects/objects.txt b/crypto/objects/objects.txt index b3eebada17..8ba8d006eb 100644 --- a/crypto/objects/objects.txt +++ b/crypto/objects/objects.txt @@ -111,9 +111,16 @@ secg-ellipticCurve 39 : sect571r1 # WAP/TLS curve OIDs (http://www.wapforum.org/) !Alias wap-wsg-idm-ecid wap-wsg 4 wap-wsg-idm-ecid 1 : wap-wsg-idm-ecid-wtls1 +wap-wsg-idm-ecid 3 : wap-wsg-idm-ecid-wtls3 +wap-wsg-idm-ecid 4 : wap-wsg-idm-ecid-wtls4 +wap-wsg-idm-ecid 5 : wap-wsg-idm-ecid-wtls5 wap-wsg-idm-ecid 6 : wap-wsg-idm-ecid-wtls6 +wap-wsg-idm-ecid 7 : wap-wsg-idm-ecid-wtls7 wap-wsg-idm-ecid 8 : wap-wsg-idm-ecid-wtls8 wap-wsg-idm-ecid 9 : wap-wsg-idm-ecid-wtls9 +wap-wsg-idm-ecid 10 : wap-wsg-idm-ecid-wtls10 +wap-wsg-idm-ecid 11 : wap-wsg-idm-ecid-wtls11 +wap-wsg-idm-ecid 12 : wap-wsg-idm-ecid-wtls12 ISO-US 113533 7 66 10 : CAST5-CBC : cast5-cbc diff --git a/crypto/ocsp/Makefile.ssl b/crypto/ocsp/Makefile.ssl index 25433f5b53..58fff4f941 100644 --- a/crypto/ocsp/Makefile.ssl +++ b/crypto/ocsp/Makefile.ssl @@ -47,13 +47,13 @@ lib: $(LIBOBJ) @touch lib files: - perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO + $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO links: - $(TOP)/util/point.sh Makefile.ssl Makefile ; - $(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) - $(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) - $(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + @$(TOP)/util/point.sh Makefile.ssl Makefile ; + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) install: @for i in $(EXHEADER) ; \ @@ -90,12 +90,13 @@ ocsp_asn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h ocsp_asn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h ocsp_asn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h ocsp_asn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -ocsp_asn.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h -ocsp_asn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -ocsp_asn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -ocsp_asn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -ocsp_asn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -ocsp_asn.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +ocsp_asn.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +ocsp_asn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +ocsp_asn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +ocsp_asn.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +ocsp_asn.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +ocsp_asn.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h +ocsp_asn.o: ../../include/openssl/opensslconf.h ocsp_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ocsp_asn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h ocsp_asn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -106,14 +107,14 @@ ocsp_asn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h ocsp_asn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h ocsp_asn.o: ../../include/openssl/x509v3.h ocsp_asn.c ocsp_cl.o: ../../e_os.h ../../include/openssl/aes.h -ocsp_cl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -ocsp_cl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -ocsp_cl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ocsp_cl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -ocsp_cl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -ocsp_cl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -ocsp_cl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ocsp_cl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ocsp_cl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_cl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_cl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_cl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_cl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_cl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_cl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_cl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ocsp_cl.o: ../../include/openssl/err.h ../../include/openssl/evp.h ocsp_cl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h ocsp_cl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -132,13 +133,13 @@ ocsp_cl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h ocsp_cl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h ocsp_cl.o: ../cryptlib.h ocsp_cl.c ocsp_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -ocsp_err.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ocsp_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -ocsp_err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -ocsp_err.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -ocsp_err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -ocsp_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -ocsp_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_err.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_err.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h ocsp_err.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h ocsp_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h ocsp_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -156,14 +157,14 @@ ocsp_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h ocsp_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h ocsp_err.o: ../../include/openssl/x509v3.h ocsp_err.c ocsp_ext.o: ../../e_os.h ../../include/openssl/aes.h -ocsp_ext.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -ocsp_ext.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -ocsp_ext.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ocsp_ext.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -ocsp_ext.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -ocsp_ext.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -ocsp_ext.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ocsp_ext.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ocsp_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_ext.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_ext.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_ext.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_ext.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ocsp_ext.o: ../../include/openssl/err.h ../../include/openssl/evp.h ocsp_ext.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h ocsp_ext.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -181,13 +182,13 @@ ocsp_ext.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h ocsp_ext.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h ocsp_ext.o: ../cryptlib.h ocsp_ext.c ocsp_ht.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -ocsp_ht.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ocsp_ht.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -ocsp_ht.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -ocsp_ht.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -ocsp_ht.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -ocsp_ht.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -ocsp_ht.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_ht.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_ht.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_ht.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_ht.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_ht.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_ht.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_ht.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h ocsp_ht.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h ocsp_ht.o: ../../include/openssl/evp.h ../../include/openssl/idea.h ocsp_ht.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -205,14 +206,14 @@ ocsp_ht.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h ocsp_ht.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h ocsp_ht.o: ocsp_ht.c ocsp_lib.o: ../../e_os.h ../../include/openssl/aes.h -ocsp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -ocsp_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -ocsp_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ocsp_lib.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -ocsp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -ocsp_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -ocsp_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ocsp_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ocsp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_lib.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ocsp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h ocsp_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h ocsp_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -231,13 +232,13 @@ ocsp_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h ocsp_lib.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h ocsp_lib.o: ../cryptlib.h ocsp_lib.c ocsp_prn.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -ocsp_prn.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ocsp_prn.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -ocsp_prn.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -ocsp_prn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -ocsp_prn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -ocsp_prn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -ocsp_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_prn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_prn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_prn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_prn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_prn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_prn.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h ocsp_prn.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h ocsp_prn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h ocsp_prn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -256,14 +257,14 @@ ocsp_prn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h ocsp_prn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h ocsp_prn.o: ../../include/openssl/x509v3.h ocsp_prn.c ocsp_srv.o: ../../e_os.h ../../include/openssl/aes.h -ocsp_srv.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -ocsp_srv.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -ocsp_srv.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ocsp_srv.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -ocsp_srv.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -ocsp_srv.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -ocsp_srv.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ocsp_srv.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ocsp_srv.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_srv.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_srv.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_srv.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_srv.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_srv.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_srv.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_srv.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ocsp_srv.o: ../../include/openssl/err.h ../../include/openssl/evp.h ocsp_srv.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h ocsp_srv.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -282,13 +283,13 @@ ocsp_srv.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h ocsp_srv.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h ocsp_srv.o: ../cryptlib.h ocsp_srv.c ocsp_vfy.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -ocsp_vfy.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ocsp_vfy.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -ocsp_vfy.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -ocsp_vfy.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -ocsp_vfy.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -ocsp_vfy.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -ocsp_vfy.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_vfy.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_vfy.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_vfy.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_vfy.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_vfy.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_vfy.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_vfy.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h ocsp_vfy.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h ocsp_vfy.o: ../../include/openssl/evp.h ../../include/openssl/idea.h ocsp_vfy.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h diff --git a/crypto/opensslv.h b/crypto/opensslv.h index cb21ee381f..e63b275e46 100644 --- a/crypto/opensslv.h +++ b/crypto/opensslv.h @@ -79,7 +79,7 @@ * should only keep the versions that are binary compatible with the current. */ #define SHLIB_VERSION_HISTORY "" -#define SHLIB_VERSION_NUMBER "0.9.7" +#define SHLIB_VERSION_NUMBER "0.9.8" #endif /* HEADER_OPENSSLV_H */ diff --git a/crypto/pem/Makefile.ssl b/crypto/pem/Makefile.ssl index 4120171898..2c49e8a6a4 100644 --- a/crypto/pem/Makefile.ssl +++ b/crypto/pem/Makefile.ssl @@ -83,13 +83,13 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. pem_all.o: ../../e_os.h ../../include/openssl/aes.h -pem_all.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_all.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_all.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -107,13 +107,13 @@ pem_all.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pem_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pem_all.o: ../cryptlib.h pem_all.c pem_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -pem_err.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -pem_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -pem_err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -pem_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -pem_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -pem_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -pem_err.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +pem_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pem_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pem_err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pem_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pem_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h pem_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h pem_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h pem_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -130,13 +130,13 @@ pem_err.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h pem_err.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h pem_err.o: ../../include/openssl/x509_vfy.h pem_err.c pem_info.o: ../../e_os.h ../../include/openssl/aes.h -pem_info.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_info.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_info.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_info.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_info.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_info.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_info.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_info.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_info.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_info.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_info.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -154,13 +154,13 @@ pem_info.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pem_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pem_info.o: ../cryptlib.h pem_info.c pem_lib.o: ../../e_os.h ../../include/openssl/aes.h -pem_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_lib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -179,13 +179,13 @@ pem_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pem_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pem_lib.o: ../cryptlib.h pem_lib.c pem_oth.o: ../../e_os.h ../../include/openssl/aes.h -pem_oth.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_oth.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_oth.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_oth.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_oth.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_oth.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_oth.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_oth.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_oth.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_oth.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_oth.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_oth.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_oth.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_oth.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_oth.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_oth.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_oth.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -203,13 +203,13 @@ pem_oth.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h pem_oth.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h pem_oth.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_oth.c pem_pk8.o: ../../e_os.h ../../include/openssl/aes.h -pem_pk8.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_pk8.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_pk8.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_pk8.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_pk8.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_pk8.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_pk8.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_pk8.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_pk8.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_pk8.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_pk8.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_pk8.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_pk8.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_pk8.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_pk8.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_pk8.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_pk8.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -228,13 +228,13 @@ pem_pk8.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pem_pk8.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pem_pk8.o: ../cryptlib.h pem_pk8.c pem_pkey.o: ../../e_os.h ../../include/openssl/aes.h -pem_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -253,13 +253,13 @@ pem_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pem_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pem_pkey.o: ../cryptlib.h pem_pkey.c pem_seal.o: ../../e_os.h ../../include/openssl/aes.h -pem_seal.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_seal.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_seal.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_seal.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_seal.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_seal.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_seal.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_seal.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_seal.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_seal.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_seal.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_seal.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_seal.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_seal.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_seal.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -277,13 +277,13 @@ pem_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h pem_seal.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h pem_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_seal.c pem_sign.o: ../../e_os.h ../../include/openssl/aes.h -pem_sign.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_sign.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -301,13 +301,13 @@ pem_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h pem_sign.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h pem_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_sign.c pem_x509.o: ../../e_os.h ../../include/openssl/aes.h -pem_x509.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_x509.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_x509.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_x509.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_x509.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_x509.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_x509.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -325,13 +325,13 @@ pem_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pem_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pem_x509.o: ../cryptlib.h pem_x509.c pem_xaux.o: ../../e_os.h ../../include/openssl/aes.h -pem_xaux.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_xaux.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_xaux.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_xaux.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_xaux.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_xaux.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_xaux.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_xaux.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_xaux.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_xaux.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_xaux.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_xaux.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_xaux.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_xaux.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_xaux.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_xaux.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_xaux.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h diff --git a/crypto/pem/pem.h b/crypto/pem/pem.h index 3e8c37b25c..fb196562fa 100644 --- a/crypto/pem/pem.h +++ b/crypto/pem/pem.h @@ -129,9 +129,9 @@ extern "C" { #define PEM_STRING_DHPARAMS "DH PARAMETERS" #define PEM_STRING_SSL_SESSION "SSL SESSION PARAMETERS" #define PEM_STRING_DSAPARAMS "DSA PARAMETERS" -#define PEM_STRING_ECDSA "ECDSA PRIVATE KEY" #define PEM_STRING_ECDSA_PUBLIC "ECDSA PUBLIC KEY" #define PEM_STRING_ECPARAMETERS "EC PARAMETERS" +#define PEM_STRING_ECPRIVATEKEY "EC PRIVATE KEY" /* Note that this structure is initialised by PEM_SealInit and cleaned up by PEM_SealFinal (at least for now) */ @@ -578,13 +578,10 @@ DECLARE_PEM_rw(DSAparams, DSA) #endif -#ifndef OPENSSL_NO_ECDSA -DECLARE_PEM_rw_cb(ECDSAPrivateKey, ECDSA) -DECLARE_PEM_rw(ECDSA_PUBKEY, ECDSA) -#endif - #ifndef OPENSSL_NO_EC DECLARE_PEM_rw(ECPKParameters, EC_GROUP) +DECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY) +DECLARE_PEM_rw(EC_PUBKEY, EC_KEY) #endif #ifndef OPENSSL_NO_DH diff --git a/crypto/pem/pem_all.c b/crypto/pem/pem_all.c index 897c4329f3..60f5188f30 100644 --- a/crypto/pem/pem_all.c +++ b/crypto/pem/pem_all.c @@ -125,8 +125,8 @@ static RSA *pkey_get_rsa(EVP_PKEY *key, RSA **rsa); static DSA *pkey_get_dsa(EVP_PKEY *key, DSA **dsa); #endif -#ifndef OPENSSL_NO_ECDSA -static ECDSA *pkey_get_ecdsa(EVP_PKEY *key, ECDSA **ecdsa); +#ifndef OPENSSL_NO_EC +static EC_KEY *pkey_get_eckey(EVP_PKEY *key, EC_KEY **eckey); #endif IMPLEMENT_PEM_rw(X509_REQ, X509_REQ, PEM_STRING_X509_REQ, X509_REQ) @@ -234,52 +234,51 @@ IMPLEMENT_PEM_rw(DSAparams, DSA, PEM_STRING_DSAPARAMS, DSAparams) #endif -#ifndef OPENSSL_NO_ECDSA -static ECDSA *pkey_get_ecdsa(EVP_PKEY *key, ECDSA **ecdsa) +#ifndef OPENSSL_NO_EC +static EC_KEY *pkey_get_eckey(EVP_PKEY *key, EC_KEY **eckey) { - ECDSA *dtmp; + EC_KEY *dtmp; if(!key) return NULL; - dtmp = EVP_PKEY_get1_ECDSA(key); + dtmp = EVP_PKEY_get1_EC_KEY(key); EVP_PKEY_free(key); if(!dtmp) return NULL; - if(ecdsa) + if(eckey) { - ECDSA_free(*ecdsa); - *ecdsa = dtmp; + EC_KEY_free(*eckey); + *eckey = dtmp; } return dtmp; } -ECDSA *PEM_read_bio_ECDSAPrivateKey(BIO *bp, ECDSA **ecdsa, pem_password_cb *cb, +EC_KEY *PEM_read_bio_ECPrivateKey(BIO *bp, EC_KEY **key, pem_password_cb *cb, void *u) { EVP_PKEY *pktmp; pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u); - return pkey_get_ecdsa(pktmp, ecdsa); + return pkey_get_eckey(pktmp, key); } -IMPLEMENT_PEM_write_cb(ECDSAPrivateKey, ECDSA, PEM_STRING_ECDSA, ECDSAPrivateKey) -IMPLEMENT_PEM_rw(ECDSA_PUBKEY, ECDSA, PEM_STRING_PUBLIC, ECDSA_PUBKEY) +IMPLEMENT_PEM_rw(ECPKParameters, EC_GROUP, PEM_STRING_ECPARAMETERS, ECPKParameters) + +IMPLEMENT_PEM_write_cb(ECPrivateKey, EC_KEY, PEM_STRING_ECPRIVATEKEY, ECPrivateKey) + +IMPLEMENT_PEM_rw(EC_PUBKEY, EC_KEY, PEM_STRING_PUBLIC, EC_PUBKEY) #ifndef OPENSSL_NO_FP_API -ECDSA *PEM_read_ECDSAPrivateKey(FILE *fp, ECDSA **ecdsa, pem_password_cb *cb, +EC_KEY *PEM_read_ECPrivateKey(FILE *fp, EC_KEY **eckey, pem_password_cb *cb, void *u) { EVP_PKEY *pktmp; pktmp = PEM_read_PrivateKey(fp, NULL, cb, u); - return pkey_get_ecdsa(pktmp, ecdsa); + return pkey_get_eckey(pktmp, eckey); } #endif #endif -#ifndef OPENSSL_NO_EC -IMPLEMENT_PEM_rw(ECPKParameters, EC_GROUP, PEM_STRING_ECPARAMETERS, ECPKParameters) -#endif - #ifndef OPENSSL_NO_DH IMPLEMENT_PEM_rw(DHparams, DH, PEM_STRING_DHPARAMS, DHparams) @@ -294,7 +293,7 @@ IMPLEMENT_PEM_rw(DHparams, DH, PEM_STRING_DHPARAMS, DHparams) * appropriate.) */ IMPLEMENT_PEM_write_cb(PrivateKey, EVP_PKEY, ((x->type == EVP_PKEY_DSA)?PEM_STRING_DSA:\ - (x->type == EVP_PKEY_RSA)?PEM_STRING_RSA:PEM_STRING_ECDSA), PrivateKey) + (x->type == EVP_PKEY_RSA)?PEM_STRING_RSA:PEM_STRING_ECPRIVATEKEY), PrivateKey) IMPLEMENT_PEM_rw(PUBKEY, EVP_PKEY, PEM_STRING_PUBLIC, PUBKEY) diff --git a/crypto/pem/pem_info.c b/crypto/pem/pem_info.c index 27bcc25177..328afd2e95 100644 --- a/crypto/pem/pem_info.c +++ b/crypto/pem/pem_info.c @@ -203,10 +203,10 @@ start: } else #endif -#ifndef OPENSSL_NO_ECDSA - if (strcmp(name,PEM_STRING_ECDSA) == 0) +#ifndef OPENSSL_NO_EC + if (strcmp(name,PEM_STRING_ECPRIVATEKEY) == 0) { - d2i=(char *(*)())d2i_ECDSAPrivateKey; + d2i=(char *(*)())d2i_ECPrivateKey; if (xi->x_pkey != NULL) { if (!sk_X509_INFO_push(ret,xi)) goto err; @@ -220,8 +220,8 @@ start: xi->x_pkey=X509_PKEY_new(); if ((xi->x_pkey->dec_pkey=EVP_PKEY_new()) == NULL) goto err; - xi->x_pkey->dec_pkey->type=EVP_PKEY_ECDSA; - pp=(char **)&(xi->x_pkey->dec_pkey->pkey.ecdsa); + xi->x_pkey->dec_pkey->type=EVP_PKEY_EC; + pp=(char **)&(xi->x_pkey->dec_pkey->pkey.eckey); if ((int)strlen(header) > 10) /* assume encrypted */ raw=1; } diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 94ecae7f3f..c32044cf70 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -193,7 +193,7 @@ static int check_pem(const char *nm, const char *name) if(!strcmp(nm,PEM_STRING_DSA) && !strcmp(name,PEM_STRING_EVP_PKEY)) return 1; - if(!strcmp(nm,PEM_STRING_ECDSA) && + if(!strcmp(nm,PEM_STRING_ECPRIVATEKEY) && !strcmp(name,PEM_STRING_EVP_PKEY)) return 1; /* Permit older strings */ diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c index 7d9f302777..92a55f536a 100644 --- a/crypto/pem/pem_pkey.c +++ b/crypto/pem/pem_pkey.c @@ -82,8 +82,8 @@ EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, vo ret=d2i_PrivateKey(EVP_PKEY_RSA,x,&p,len); else if (strcmp(nm,PEM_STRING_DSA) == 0) ret=d2i_PrivateKey(EVP_PKEY_DSA,x,&p,len); - else if (strcmp(nm,PEM_STRING_ECDSA) == 0) - ret=d2i_PrivateKey(EVP_PKEY_ECDSA,x,&p,len); + else if (strcmp(nm,PEM_STRING_ECPRIVATEKEY) == 0) + ret=d2i_PrivateKey(EVP_PKEY_EC,x,&p,len); else if (strcmp(nm,PEM_STRING_PKCS8INF) == 0) { PKCS8_PRIV_KEY_INFO *p8inf; p8inf=d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, len); diff --git a/crypto/pkcs12/Makefile.ssl b/crypto/pkcs12/Makefile.ssl index e7973a9ea8..9c81c4ae13 100644 --- a/crypto/pkcs12/Makefile.ssl +++ b/crypto/pkcs12/Makefile.ssl @@ -86,13 +86,13 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. p12_add.o: ../../e_os.h ../../include/openssl/aes.h -p12_add.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_add.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_add.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_add.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_add.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_add.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_add.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_add.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_add.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_add.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_add.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_add.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_add.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_add.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_add.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_add.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_add.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -116,29 +116,30 @@ p12_asn.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h p12_asn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h p12_asn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h p12_asn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -p12_asn.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -p12_asn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -p12_asn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -p12_asn.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -p12_asn.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -p12_asn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -p12_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -p12_asn.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h -p12_asn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -p12_asn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -p12_asn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -p12_asn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -p12_asn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -p12_asn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -p12_asn.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_asn.c +p12_asn.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +p12_asn.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_asn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_asn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_asn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_asn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_asn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_asn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_asn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_asn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_asn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_asn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_asn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_asn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_asn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_asn.o: ../cryptlib.h p12_asn.c p12_attr.o: ../../e_os.h ../../include/openssl/aes.h -p12_attr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_attr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_attr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_attr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_attr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_attr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_attr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_attr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_attr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_attr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_attr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_attr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_attr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_attr.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_attr.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_attr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_attr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -155,13 +156,13 @@ p12_attr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_attr.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_attr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_attr.c p12_crpt.o: ../../e_os.h ../../include/openssl/aes.h -p12_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_crpt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_crpt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_crpt.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_crpt.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_crpt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_crpt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_crpt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_crpt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_crpt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_crpt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_crpt.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_crpt.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -178,13 +179,13 @@ p12_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_crpt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_crpt.c p12_crt.o: ../../e_os.h ../../include/openssl/aes.h -p12_crt.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_crt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_crt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_crt.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_crt.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_crt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_crt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_crt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_crt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_crt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_crt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_crt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_crt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_crt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_crt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_crt.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_crt.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -201,13 +202,13 @@ p12_crt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_crt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_crt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_crt.c p12_decr.o: ../../e_os.h ../../include/openssl/aes.h -p12_decr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_decr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_decr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_decr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_decr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_decr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_decr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_decr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_decr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_decr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_decr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_decr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_decr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_decr.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_decr.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_decr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_decr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -224,13 +225,13 @@ p12_decr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_decr.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_decr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_decr.c p12_init.o: ../../e_os.h ../../include/openssl/aes.h -p12_init.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_init.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_init.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_init.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_init.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_init.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_init.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_init.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_init.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_init.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_init.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_init.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_init.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_init.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_init.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_init.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_init.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -247,13 +248,13 @@ p12_init.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_init.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_init.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_init.c p12_key.o: ../../e_os.h ../../include/openssl/aes.h -p12_key.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_key.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_key.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_key.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_key.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_key.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_key.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_key.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_key.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -270,13 +271,13 @@ p12_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_key.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_key.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_key.c p12_kiss.o: ../../e_os.h ../../include/openssl/aes.h -p12_kiss.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_kiss.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_kiss.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_kiss.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_kiss.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_kiss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_kiss.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_kiss.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_kiss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_kiss.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_kiss.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_kiss.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_kiss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_kiss.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_kiss.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_kiss.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_kiss.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -293,13 +294,13 @@ p12_kiss.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_kiss.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_kiss.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_kiss.c p12_mutl.o: ../../e_os.h ../../include/openssl/aes.h -p12_mutl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_mutl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_mutl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_mutl.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_mutl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_mutl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_mutl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_mutl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_mutl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_mutl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_mutl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_mutl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_mutl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_mutl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_mutl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_mutl.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h p12_mutl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -318,13 +319,13 @@ p12_mutl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p12_mutl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p12_mutl.o: ../cryptlib.h p12_mutl.c p12_npas.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -p12_npas.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -p12_npas.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -p12_npas.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -p12_npas.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -p12_npas.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -p12_npas.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p12_npas.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +p12_npas.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p12_npas.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p12_npas.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p12_npas.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p12_npas.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p12_npas.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_npas.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h p12_npas.o: ../../include/openssl/err.h ../../include/openssl/evp.h p12_npas.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h p12_npas.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -342,13 +343,13 @@ p12_npas.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_npas.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_npas.o: ../../include/openssl/x509_vfy.h p12_npas.c p12_p8d.o: ../../e_os.h ../../include/openssl/aes.h -p12_p8d.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_p8d.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_p8d.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_p8d.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_p8d.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_p8d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_p8d.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_p8d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_p8d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_p8d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_p8d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_p8d.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_p8d.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_p8d.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_p8d.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_p8d.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_p8d.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -365,13 +366,13 @@ p12_p8d.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_p8d.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_p8d.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_p8d.c p12_p8e.o: ../../e_os.h ../../include/openssl/aes.h -p12_p8e.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_p8e.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_p8e.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_p8e.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_p8e.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_p8e.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_p8e.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_p8e.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_p8e.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_p8e.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_p8e.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_p8e.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_p8e.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_p8e.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_p8e.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_p8e.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_p8e.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -388,13 +389,13 @@ p12_p8e.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_p8e.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_p8e.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_p8e.c p12_utl.o: ../../e_os.h ../../include/openssl/aes.h -p12_utl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_utl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_utl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_utl.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_utl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_utl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_utl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_utl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_utl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_utl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_utl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_utl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_utl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_utl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_utl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_utl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -411,13 +412,13 @@ p12_utl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_utl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_utl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_utl.c pk12err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -pk12err.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -pk12err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -pk12err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -pk12err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -pk12err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -pk12err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -pk12err.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +pk12err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pk12err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pk12err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pk12err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk12err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk12err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pk12err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h pk12err.o: ../../include/openssl/err.h ../../include/openssl/evp.h pk12err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h pk12err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h diff --git a/crypto/pkcs7/Makefile.ssl b/crypto/pkcs7/Makefile.ssl index a97250f4f0..dfc9a47b44 100644 --- a/crypto/pkcs7/Makefile.ssl +++ b/crypto/pkcs7/Makefile.ssl @@ -108,12 +108,13 @@ pk7_asn1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h pk7_asn1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h pk7_asn1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h pk7_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -pk7_asn1.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -pk7_asn1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -pk7_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -pk7_asn1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -pk7_asn1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -pk7_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pk7_asn1.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +pk7_asn1.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pk7_asn1.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pk7_asn1.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pk7_asn1.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pk7_asn1.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pk7_asn1.o: ../../include/openssl/opensslconf.h pk7_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h pk7_asn1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h pk7_asn1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -124,13 +125,13 @@ pk7_asn1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pk7_asn1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pk7_asn1.o: ../cryptlib.h pk7_asn1.c pk7_attr.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -pk7_attr.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -pk7_attr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -pk7_attr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -pk7_attr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -pk7_attr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -pk7_attr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -pk7_attr.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +pk7_attr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pk7_attr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pk7_attr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pk7_attr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_attr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_attr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pk7_attr.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h pk7_attr.o: ../../include/openssl/err.h ../../include/openssl/evp.h pk7_attr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h pk7_attr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -148,14 +149,14 @@ pk7_attr.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pk7_attr.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pk7_attr.o: pk7_attr.c pk7_doit.o: ../../e_os.h ../../include/openssl/aes.h -pk7_doit.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pk7_doit.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pk7_doit.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pk7_doit.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -pk7_doit.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -pk7_doit.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -pk7_doit.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -pk7_doit.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +pk7_doit.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_doit.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_doit.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_doit.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +pk7_doit.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_doit.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_doit.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pk7_doit.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h pk7_doit.o: ../../include/openssl/err.h ../../include/openssl/evp.h pk7_doit.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h pk7_doit.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -173,13 +174,13 @@ pk7_doit.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h pk7_doit.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h pk7_doit.o: ../cryptlib.h pk7_doit.c pk7_lib.o: ../../e_os.h ../../include/openssl/aes.h -pk7_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pk7_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pk7_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pk7_lib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pk7_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pk7_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pk7_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pk7_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pk7_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pk7_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pk7_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pk7_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pk7_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pk7_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -196,13 +197,13 @@ pk7_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pk7_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pk7_lib.o: ../cryptlib.h pk7_lib.c pk7_mime.o: ../../e_os.h ../../include/openssl/aes.h -pk7_mime.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pk7_mime.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pk7_mime.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pk7_mime.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pk7_mime.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pk7_mime.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pk7_mime.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pk7_mime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_mime.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_mime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_mime.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pk7_mime.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pk7_mime.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pk7_mime.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pk7_mime.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pk7_mime.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pk7_mime.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -219,14 +220,14 @@ pk7_mime.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h pk7_mime.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h pk7_mime.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pk7_mime.c pk7_smime.o: ../../e_os.h ../../include/openssl/aes.h -pk7_smime.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pk7_smime.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pk7_smime.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pk7_smime.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -pk7_smime.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -pk7_smime.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -pk7_smime.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -pk7_smime.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +pk7_smime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_smime.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_smime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_smime.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +pk7_smime.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_smime.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_smime.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pk7_smime.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h pk7_smime.o: ../../include/openssl/err.h ../../include/openssl/evp.h pk7_smime.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h pk7_smime.o: ../../include/openssl/md2.h ../../include/openssl/md4.h diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c index f589508fdd..1c0a9c9edf 100644 --- a/crypto/pkcs7/pk7_doit.c +++ b/crypto/pkcs7/pk7_doit.c @@ -629,7 +629,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio) ctx_tmp.digest=EVP_dss1(); #endif #ifndef OPENSSL_NO_ECDSA - if (si->pkey->type == EVP_PKEY_ECDSA) + if (si->pkey->type == EVP_PKEY_EC) ctx_tmp.digest=EVP_ecdsa(); #endif @@ -830,7 +830,7 @@ for (ii=0; ii<md_len; ii++) printf("%02X",md_dat[ii]); printf(" calc\n"); if(pkey->type == EVP_PKEY_DSA) mdc_tmp.digest=EVP_dss1(); #endif #ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) mdc_tmp.digest=EVP_ecdsa(); + if (pkey->type == EVP_PKEY_EC) mdc_tmp.digest=EVP_ecdsa(); #endif i=EVP_VerifyFinal(&mdc_tmp,os->data,os->length, pkey); diff --git a/crypto/pkcs7/pk7_lib.c b/crypto/pkcs7/pk7_lib.c index b7c18cbf72..c913c59791 100644 --- a/crypto/pkcs7/pk7_lib.c +++ b/crypto/pkcs7/pk7_lib.c @@ -310,7 +310,7 @@ int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey, int nid; char is_dsa; - if (pkey->type == EVP_PKEY_DSA || pkey->type == EVP_PKEY_ECDSA) + if (pkey->type == EVP_PKEY_DSA || pkey->type == EVP_PKEY_EC) is_dsa = 1; else is_dsa = 0; @@ -363,7 +363,7 @@ int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey, #endif p7i->digest_enc_alg->parameter = NULL; /* special case for DSA: omit 'parameter'! */ } - else if (nid == EVP_PKEY_ECDSA) + else if (nid == EVP_PKEY_EC) { p7i->digest_enc_alg->algorithm=OBJ_nid2obj(NID_ecdsa_with_SHA1); if (!(p7i->digest_enc_alg->parameter=ASN1_TYPE_new())) diff --git a/crypto/pkcs7/verify.c b/crypto/pkcs7/verify.c index 5f7afe8933..b40f26032e 100644 --- a/crypto/pkcs7/verify.c +++ b/crypto/pkcs7/verify.c @@ -179,10 +179,11 @@ char *argv[]; { ASN1_UTCTIME *tm; char *str1,*str2; + int rc; si=sk_PKCS7_SIGNER_INFO_value(sk,i); - i=PKCS7_dataVerify(cert_store,&cert_ctx,p7bio,p7,si); - if (i <= 0) + rc=PKCS7_dataVerify(cert_store,&cert_ctx,p7bio,p7,si); + if (rc <= 0) goto err; printf("signer info\n"); if ((tm=get_signed_time(si)) != NULL) diff --git a/crypto/rand/Makefile.ssl b/crypto/rand/Makefile.ssl index a2b14583e4..4035e825ef 100644 --- a/crypto/rand/Makefile.ssl +++ b/crypto/rand/Makefile.ssl @@ -112,11 +112,11 @@ rand_err.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h rand_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h rand_err.o: rand_err.c rand_lib.o: ../../e_os.h ../../include/openssl/asn1.h -rand_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -rand_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -rand_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -rand_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -rand_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +rand_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rand_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rand_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +rand_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +rand_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h rand_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h rand_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h diff --git a/crypto/ripemd/rmdtest.c b/crypto/ripemd/rmdtest.c index 19e9741db2..be1fb8b1f6 100644 --- a/crypto/ripemd/rmdtest.c +++ b/crypto/ripemd/rmdtest.c @@ -59,7 +59,6 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> -#include <openssl/ripemd.h> #ifdef OPENSSL_NO_RIPEMD int main(int argc, char *argv[]) @@ -68,6 +67,7 @@ int main(int argc, char *argv[]) return(0); } #else +#include <openssl/ripemd.h> #include <openssl/evp.h> #ifdef CHARSET_EBCDIC diff --git a/crypto/rsa/Makefile.ssl b/crypto/rsa/Makefile.ssl index 7616295ed8..874776ce36 100644 --- a/crypto/rsa/Makefile.ssl +++ b/crypto/rsa/Makefile.ssl @@ -102,11 +102,11 @@ rsa_chk.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h rsa_chk.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h rsa_chk.o: rsa_chk.c rsa_eay.o: ../../e_os.h ../../include/openssl/asn1.h -rsa_eay.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -rsa_eay.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -rsa_eay.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -rsa_eay.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -rsa_eay.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +rsa_eay.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_eay.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_eay.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +rsa_eay.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +rsa_eay.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h rsa_eay.o: ../../include/openssl/engine.h ../../include/openssl/err.h rsa_eay.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h rsa_eay.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -132,11 +132,11 @@ rsa_gen.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h rsa_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h rsa_gen.o: ../cryptlib.h rsa_gen.c rsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h -rsa_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -rsa_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -rsa_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -rsa_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -rsa_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +rsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +rsa_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h rsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h rsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h rsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -193,13 +193,13 @@ rsa_pk1.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h rsa_pk1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h rsa_pk1.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_pk1.c rsa_saos.o: ../../e_os.h ../../include/openssl/aes.h -rsa_saos.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -rsa_saos.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -rsa_saos.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -rsa_saos.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -rsa_saos.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -rsa_saos.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -rsa_saos.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +rsa_saos.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_saos.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rsa_saos.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rsa_saos.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rsa_saos.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rsa_saos.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h rsa_saos.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h rsa_saos.o: ../../include/openssl/evp.h ../../include/openssl/idea.h rsa_saos.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -216,13 +216,13 @@ rsa_saos.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h rsa_saos.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h rsa_saos.o: ../cryptlib.h rsa_saos.c rsa_sign.o: ../../e_os.h ../../include/openssl/aes.h -rsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -rsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -rsa_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -rsa_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -rsa_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -rsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -rsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +rsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rsa_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rsa_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h rsa_sign.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h rsa_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h diff --git a/crypto/symhacks.h b/crypto/symhacks.h index dd59aa3f0f..c225602064 100644 --- a/crypto/symhacks.h +++ b/crypto/symhacks.h @@ -211,6 +211,32 @@ #define EC_POINT_get_affine_coordinates_GFp EC_POINT_get_affine_coords_GFp #undef EC_POINT_set_compressed_coordinates_GFp #define EC_POINT_set_compressed_coordinates_GFp EC_POINT_set_compr_coords_GFp +#undef EC_POINT_set_affine_coordinates_GF2m +#define EC_POINT_set_affine_coordinates_GF2m EC_POINT_set_affine_coords_GF2m +#undef EC_POINT_get_affine_coordinates_GF2m +#define EC_POINT_get_affine_coordinates_GF2m EC_POINT_get_affine_coords_GF2m +#undef EC_POINT_set_compressed_coordinates_GF2m +#define EC_POINT_set_compressed_coordinates_GF2m \ + EC_POINT_set_compr_coords_GF2m +#undef ec_GF2m_simple_group_clear_finish +#define ec_GF2m_simple_group_clear_finish ec_GF2m_simple_grp_clr_finish +#undef ec_GF2m_simple_group_check_discriminant +#define ec_GF2m_simple_group_check_discriminant ec_GF2m_simple_grp_chk_discrim +#undef ec_GF2m_simple_point_clear_finish +#define ec_GF2m_simple_point_clear_finish ec_GF2m_simple_pt_clr_finish +#undef ec_GF2m_simple_point_set_to_infinity +#define ec_GF2m_simple_point_set_to_infinity ec_GF2m_simple_pt_set_to_inf +#undef ec_GF2m_simple_points_make_affine +#define ec_GF2m_simple_points_make_affine ec_GF2m_simple_pts_make_affine +#undef ec_GF2m_simple_point_set_affine_coordinates +#define ec_GF2m_simple_point_set_affine_coordinates \ + ec_GF2m_smp_pt_set_af_coords +#undef ec_GF2m_simple_point_get_affine_coordinates +#define ec_GF2m_simple_point_get_affine_coordinates \ + ec_GF2m_smp_pt_get_af_coords +#undef ec_GF2m_simple_set_compressed_coordinates +#define ec_GF2m_simple_set_compressed_coordinates \ + ec_GF2m_smp_set_compr_coords #undef ec_GFp_simple_group_set_curve_GFp #define ec_GFp_simple_group_set_curve_GFp ec_GFp_simple_grp_set_curve_GFp #undef ec_GFp_simple_group_get_curve_GFp @@ -246,6 +272,15 @@ #undef ec_GFp_simple_set_compressed_coordinates_GFp #define ec_GFp_simple_set_compressed_coordinates_GFp \ ec_GFp_smp_set_compr_coords_GFp +#undef ec_GFp_simple_point_set_affine_coordinates +#define ec_GFp_simple_point_set_affine_coordinates \ + ec_GFp_smp_pt_set_af_coords +#undef ec_GFp_simple_point_get_affine_coordinates +#define ec_GFp_simple_point_get_affine_coordinates \ + ec_GFp_smp_pt_get_af_coords +#undef ec_GFp_simple_set_compressed_coordinates +#define ec_GFp_simple_set_compressed_coordinates \ + ec_GFp_smp_set_compr_coords #undef ec_GFp_simple_group_check_discriminant #define ec_GFp_simple_group_check_discriminant ec_GFp_simple_grp_chk_discrim @@ -259,6 +294,15 @@ #undef OCSP_crlID_new #define OCSP_crlID_new OCSP_crlID2_new +#undef d2i_ECPARAMETERS +#define d2i_ECPARAMETERS d2i_UC_ECPARAMETERS +#undef i2d_ECPARAMETERS +#define i2d_ECPARAMETERS i2d_UC_ECPARAMETERS +#undef d2i_ECPKPARAMETERS +#define d2i_ECPKPARAMETERS d2i_UC_ECPKPARAMETERS +#undef i2d_ECPKPARAMETERS +#define i2d_ECPKPARAMETERS i2d_UC_ECPKPARAMETERS + /* These functions do not seem to exist! However, I'm paranoid... Original command in x509v3.h: These functions are being redefined in another directory, diff --git a/crypto/x509/Makefile.ssl b/crypto/x509/Makefile.ssl index 31a2410a59..424ed1dc54 100644 --- a/crypto/x509/Makefile.ssl +++ b/crypto/x509/Makefile.ssl @@ -90,13 +90,13 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. by_dir.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -by_dir.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -by_dir.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -by_dir.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -by_dir.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -by_dir.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -by_dir.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -by_dir.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +by_dir.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +by_dir.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +by_dir.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +by_dir.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +by_dir.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +by_dir.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +by_dir.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h by_dir.o: ../../include/openssl/err.h ../../include/openssl/evp.h by_dir.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h by_dir.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -112,13 +112,13 @@ by_dir.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h by_dir.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h by_dir.o: ../../include/openssl/x509_vfy.h ../cryptlib.h by_dir.c by_file.o: ../../e_os.h ../../include/openssl/aes.h -by_file.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -by_file.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -by_file.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -by_file.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -by_file.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -by_file.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -by_file.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +by_file.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +by_file.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +by_file.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +by_file.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +by_file.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +by_file.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +by_file.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h by_file.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h by_file.o: ../../include/openssl/evp.h ../../include/openssl/idea.h by_file.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -136,14 +136,14 @@ by_file.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h by_file.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h by_file.o: ../cryptlib.h by_file.c x509_att.o: ../../e_os.h ../../include/openssl/aes.h -x509_att.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_att.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_att.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_att.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_att.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_att.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_att.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_att.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_att.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_att.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_att.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_att.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_att.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_att.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_att.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_att.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_att.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_att.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_att.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -160,14 +160,14 @@ x509_att.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_att.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_att.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_att.c x509_cmp.o: ../../e_os.h ../../include/openssl/aes.h -x509_cmp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_cmp.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_cmp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_cmp.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_cmp.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_cmp.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_cmp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_cmp.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_cmp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_cmp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_cmp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_cmp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_cmp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_cmp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_cmp.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_cmp.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_cmp.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_cmp.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_cmp.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -184,13 +184,13 @@ x509_cmp.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_cmp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_cmp.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_cmp.c x509_d2.o: ../../e_os.h ../../include/openssl/aes.h -x509_d2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_d2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_d2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_d2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_d2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_d2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_d2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_d2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_d2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_d2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_d2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_d2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_d2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_d2.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_d2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_d2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_d2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -207,13 +207,13 @@ x509_d2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_d2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_d2.o: ../cryptlib.h x509_d2.c x509_def.o: ../../e_os.h ../../include/openssl/aes.h -x509_def.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_def.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_def.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_def.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_def.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_def.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_def.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_def.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_def.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_def.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_def.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_def.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_def.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_def.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_def.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_def.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_def.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -230,13 +230,13 @@ x509_def.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_def.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_def.o: ../cryptlib.h x509_def.c x509_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -x509_err.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -x509_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -x509_err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -x509_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_err.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x509_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x509_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x509_err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -253,14 +253,14 @@ x509_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_err.o: x509_err.c x509_ext.o: ../../e_os.h ../../include/openssl/aes.h -x509_ext.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_ext.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_ext.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_ext.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_ext.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_ext.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_ext.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_ext.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_ext.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_ext.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_ext.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_ext.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_ext.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_ext.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_ext.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -277,14 +277,14 @@ x509_ext.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_ext.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_ext.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_ext.c x509_lu.o: ../../e_os.h ../../include/openssl/aes.h -x509_lu.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_lu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_lu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_lu.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_lu.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_lu.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_lu.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_lu.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_lu.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_lu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_lu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_lu.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_lu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_lu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_lu.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_lu.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_lu.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_lu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_lu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -301,13 +301,13 @@ x509_lu.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h x509_lu.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h x509_lu.o: ../cryptlib.h x509_lu.c x509_obj.o: ../../e_os.h ../../include/openssl/aes.h -x509_obj.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_obj.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_obj.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_obj.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_obj.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_obj.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_obj.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_obj.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_obj.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_obj.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_obj.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_obj.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_obj.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_obj.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_obj.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_obj.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_obj.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -324,13 +324,13 @@ x509_obj.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_obj.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_obj.o: ../cryptlib.h x509_obj.c x509_r2x.o: ../../e_os.h ../../include/openssl/aes.h -x509_r2x.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_r2x.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_r2x.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_r2x.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_r2x.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_r2x.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_r2x.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_r2x.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_r2x.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_r2x.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_r2x.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_r2x.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_r2x.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_r2x.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_r2x.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_r2x.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_r2x.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -347,13 +347,13 @@ x509_r2x.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_r2x.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_r2x.o: ../cryptlib.h x509_r2x.c x509_req.o: ../../e_os.h ../../include/openssl/aes.h -x509_req.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_req.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_req.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_req.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_req.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_req.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_req.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_req.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_req.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_req.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_req.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -371,13 +371,13 @@ x509_req.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_req.o: ../cryptlib.h x509_req.c x509_set.o: ../../e_os.h ../../include/openssl/aes.h -x509_set.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_set.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_set.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_set.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_set.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_set.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_set.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_set.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_set.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_set.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_set.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_set.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_set.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_set.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_set.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_set.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_set.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -394,14 +394,14 @@ x509_set.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_set.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_set.o: ../cryptlib.h x509_set.c x509_trs.o: ../../e_os.h ../../include/openssl/aes.h -x509_trs.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_trs.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_trs.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_trs.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_trs.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_trs.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_trs.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_trs.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_trs.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_trs.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_trs.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_trs.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_trs.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_trs.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_trs.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_trs.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_trs.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_trs.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_trs.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -418,13 +418,13 @@ x509_trs.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_trs.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_trs.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_trs.c x509_txt.o: ../../e_os.h ../../include/openssl/aes.h -x509_txt.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_txt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_txt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_txt.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_txt.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_txt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_txt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_txt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_txt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_txt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_txt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_txt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_txt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_txt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_txt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_txt.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_txt.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -441,14 +441,14 @@ x509_txt.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_txt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_txt.o: ../cryptlib.h x509_txt.c x509_v3.o: ../../e_os.h ../../include/openssl/aes.h -x509_v3.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_v3.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_v3.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_v3.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_v3.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_v3.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_v3.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_v3.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_v3.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_v3.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_v3.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_v3.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_v3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_v3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_v3.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_v3.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_v3.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_v3.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_v3.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -465,14 +465,14 @@ x509_v3.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h x509_v3.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h x509_v3.o: ../cryptlib.h x509_v3.c x509_vfy.o: ../../e_os.h ../../include/openssl/aes.h -x509_vfy.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_vfy.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_vfy.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_vfy.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_vfy.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_vfy.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_vfy.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_vfy.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_vfy.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_vfy.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_vfy.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_vfy.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_vfy.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_vfy.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_vfy.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_vfy.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_vfy.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_vfy.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_vfy.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -489,13 +489,13 @@ x509_vfy.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_vfy.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_vfy.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_vfy.c x509cset.o: ../../e_os.h ../../include/openssl/aes.h -x509cset.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509cset.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509cset.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509cset.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509cset.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509cset.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509cset.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509cset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509cset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509cset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509cset.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509cset.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509cset.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509cset.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509cset.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509cset.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509cset.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -512,13 +512,13 @@ x509cset.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509cset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509cset.o: ../cryptlib.h x509cset.c x509name.o: ../../e_os.h ../../include/openssl/aes.h -x509name.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509name.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509name.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509name.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509name.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509name.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509name.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509name.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509name.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509name.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509name.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509name.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509name.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509name.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -535,13 +535,13 @@ x509name.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509name.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509name.o: ../cryptlib.h x509name.c x509rset.o: ../../e_os.h ../../include/openssl/aes.h -x509rset.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509rset.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509rset.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509rset.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509rset.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509rset.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509rset.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509rset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509rset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509rset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509rset.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509rset.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509rset.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509rset.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509rset.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509rset.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509rset.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -558,13 +558,13 @@ x509rset.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509rset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509rset.o: ../cryptlib.h x509rset.c x509spki.o: ../../e_os.h ../../include/openssl/aes.h -x509spki.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509spki.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509spki.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509spki.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509spki.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509spki.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509spki.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509spki.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509spki.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -581,13 +581,13 @@ x509spki.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509spki.o: ../cryptlib.h x509spki.c x509type.o: ../../e_os.h ../../include/openssl/aes.h -x509type.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509type.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509type.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509type.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509type.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509type.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509type.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509type.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509type.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509type.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509type.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509type.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509type.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509type.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509type.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509type.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509type.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -604,13 +604,13 @@ x509type.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509type.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509type.o: ../cryptlib.h x509type.c x_all.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -x_all.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -x_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -x_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -x_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_all.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x_all.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h x_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h index 7687e3bf2e..8b42b09f61 100644 --- a/crypto/x509/x509.h +++ b/crypto/x509/x509.h @@ -55,6 +55,11 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #ifndef HEADER_X509_H #define HEADER_X509_H @@ -81,10 +86,18 @@ #include <openssl/dsa.h> #endif +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> +#endif + #ifndef OPENSSL_NO_ECDSA #include <openssl/ecdsa.h> #endif +#ifndef OPENSSL_NO_ECDH +#include <openssl/ecdh.h> +#endif + #ifndef OPENSSL_NO_DH #include <openssl/dh.h> #endif @@ -656,15 +669,15 @@ extern "C" { #define i2d_DSAPrivateKey_bio(bp,dsa) ASN1_i2d_bio(i2d_DSAPrivateKey,bp, \ (unsigned char *)dsa) -#define d2i_ECDSAPrivateKey_fp(fp,ecdsa) (ECDSA *)ASN1_d2i_fp((char *(*)())\ - ECDSA_new,(char *(*)())d2i_ECDSAPrivateKey, (fp), \ +#define d2i_ECPrivateKey_fp(fp,ecdsa) (EC_KEY *)ASN1_d2i_fp((char *(*)())\ + EC_KEY_new,(char *(*)())d2i_ECPrivateKey, (fp), \ (unsigned char **)(ecdsa)) -#define i2d_ECDSAPrivateKey_fp(fp,ecdsa) ASN1_i2d_fp(i2d_ECDSAPrivateKey,fp, \ +#define i2d_ECPrivateKey_fp(fp,ecdsa) ASN1_i2d_fp(i2d_ECPrivateKey,fp, \ (unsigned char *)ecdsa) -#define d2i_ECDSAPrivateKey_bio(bp,ecdsa) (ECDSA *)ASN1_d2i_bio((char *(*)())\ - ECDSA_new,(char *(*)())d2i_ECDSAPrivateKey, (bp), \ +#define d2i_ECPrivateKey_bio(bp,ecdsa) (EC_KEY *)ASN1_d2i_bio((char *(*)())\ + EC_KEY_new,(char *(*)())d2i_ECPrivateKey, (bp), \ (unsigned char **)(ecdsa)) -#define i2d_ECDSAPrivateKey_bio(bp,ecdsa) ASN1_i2d_bio(i2d_ECDSAPrivateKey,bp, \ +#define i2d_ECPrivateKey_bio(bp,ecdsa) ASN1_i2d_bio(i2d_ECPrivateKey,bp, \ (unsigned char *)ecdsa) #define X509_ALGOR_dup(xn) (X509_ALGOR *)ASN1_dup((int (*)())i2d_X509_ALGOR,\ @@ -770,11 +783,11 @@ int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa); DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa); int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa); #endif -#ifndef OPENSSL_NO_ECDSA -ECDSA *d2i_ECDSA_PUBKEY_fp(FILE *fp, ECDSA **ecdsa); -int i2d_ECDSA_PUBKEY_fp(FILE *fp, ECDSA *ecdsa); -ECDSA *d2i_ECDSAPrivateKey_fp(FILE *fp, ECDSA **ecdsa); -int i2d_ECDSAPrivateKey_fp(FILE *fp, ECDSA *ecdsa); +#ifndef OPENSSL_NO_EC +EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey); +int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey); +EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey); +int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey); #endif X509_SIG *d2i_PKCS8_fp(FILE *fp,X509_SIG **p8); int i2d_PKCS8_fp(FILE *fp,X509_SIG *p8); @@ -809,11 +822,11 @@ int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa); DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa); int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa); #endif -#ifndef OPENSSL_NO_ECDSA -ECDSA *d2i_ECDSA_PUBKEY_bio(BIO *bp, ECDSA **ecdsa); -int i2d_ECDSA_PUBKEY_bio(BIO *bp, ECDSA *ecdsa); -ECDSA *d2i_ECDSAPrivateKey_bio(BIO *bp, ECDSA **ecdsa); -int i2d_ECDSAPrivateKey_bio(BIO *bp, ECDSA *ecdsa); +#ifndef OPENSSL_NO_EC +EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey); +int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey); +EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey); +int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey); #endif X509_SIG *d2i_PKCS8_bio(BIO *bp,X509_SIG **p8); int i2d_PKCS8_bio(BIO *bp,X509_SIG *p8); @@ -879,9 +892,9 @@ int i2d_DSA_PUBKEY(DSA *a,unsigned char **pp); DSA * d2i_DSA_PUBKEY(DSA **a,unsigned char **pp, long length); #endif -#ifndef OPENSSL_NO_ECDSA -int i2d_ECDSA_PUBKEY(ECDSA *a, unsigned char **pp); -ECDSA *d2i_ECDSA_PUBKEY(ECDSA **a, unsigned char **pp, +#ifndef OPENSSL_NO_EC +int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp); +EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, unsigned char **pp, long length); #endif diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c index dbbe0a9236..415e5f3863 100644 --- a/crypto/x509/x509_cmp.c +++ b/crypto/x509/x509_cmp.c @@ -295,10 +295,11 @@ int X509_check_private_key(X509 *x, EVP_PKEY *k) } break; #endif -#ifndef OPENSSL_NO_ECDSA - case EVP_PKEY_ECDSA: +#ifndef OPENSSL_NO_EC + case EVP_PKEY_EC: { - int r = EC_POINT_cmp(xk->pkey.ecdsa->group,xk->pkey.ecdsa->pub_key,k->pkey.ecdsa->pub_key,NULL); + int r = EC_POINT_cmp(xk->pkey.eckey->group, + xk->pkey.eckey->pub_key,k->pkey.eckey->pub_key,NULL); if (r != 0) { if (r == 1) diff --git a/crypto/x509/x509type.c b/crypto/x509/x509type.c index 7673c1ba03..8eaf102480 100644 --- a/crypto/x509/x509type.c +++ b/crypto/x509/x509type.c @@ -86,8 +86,8 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey) case EVP_PKEY_DSA: ret=EVP_PK_DSA|EVP_PKT_SIGN; break; - case EVP_PKEY_ECDSA: - ret=EVP_PK_ECDSA|EVP_PKT_SIGN; + case EVP_PKEY_EC: + ret=EVP_PK_EC|EVP_PKT_SIGN|EVP_PKT_EXCH; break; case EVP_PKEY_DH: ret=EVP_PK_DH|EVP_PKT_EXCH; @@ -105,8 +105,8 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey) case EVP_PKS_DSA: ret|=EVP_PKS_DSA; break; - case EVP_PKS_ECDSA: - ret|=EVP_PKS_ECDSA; + case EVP_PKS_EC: + ret|=EVP_PKS_EC; break; default: break; diff --git a/crypto/x509/x_all.c b/crypto/x509/x_all.c index cc1ff90e9a..801df78f08 100644 --- a/crypto/x509/x_all.c +++ b/crypto/x509/x_all.c @@ -325,59 +325,58 @@ int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa) #endif -#ifndef OPENSSL_NO_ECDSA +#ifndef OPENSSL_NO_EC #ifndef OPENSSL_NO_FP_API -ECDSA *d2i_ECDSAPrivateKey_fp(FILE *fp, ECDSA **ecdsa) +EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey) { - return((ECDSA *)ASN1_d2i_fp((char *(*)()) - ECDSA_new,(char *(*)())d2i_ECDSAPrivateKey, (fp), - (unsigned char **)(ecdsa))); + return((EC_KEY *)ASN1_d2i_fp((char *(*)()) + EC_KEY_new,(char *(*)())d2i_EC_PUBKEY, (fp), + (unsigned char **)(eckey))); } -int i2d_ECDSAPrivateKey_fp(FILE *fp, ECDSA *ecdsa) +int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey) { - return(ASN1_i2d_fp(i2d_ECDSAPrivateKey,fp,(unsigned char *)ecdsa)); + return(ASN1_i2d_fp(i2d_EC_PUBKEY,fp,(unsigned char *)eckey)); } - -ECDSA *d2i_ECDSA_PUBKEY_fp(FILE *fp, ECDSA **ecdsa) + +EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey) { - return((ECDSA *)ASN1_d2i_fp((char *(*)()) - ECDSA_new,(char *(*)())d2i_ECDSA_PUBKEY, (fp), - (unsigned char **)(ecdsa))); + return((EC_KEY *)ASN1_d2i_fp((char *(*)()) + EC_KEY_new,(char *(*)())d2i_ECPrivateKey, (fp), + (unsigned char **)(eckey))); } -int i2d_ECDSA_PUBKEY_fp(FILE *fp, ECDSA *ecdsa) +int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey) { - return(ASN1_i2d_fp(i2d_ECDSA_PUBKEY,fp,(unsigned char *)ecdsa)); + return(ASN1_i2d_fp(i2d_ECPrivateKey,fp,(unsigned char *)eckey)); } #endif - -ECDSA *d2i_ECDSAPrivateKey_bio(BIO *bp, ECDSA **ecdsa) +EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey) { - return((ECDSA *)ASN1_d2i_bio((char *(*)()) - ECDSA_new,(char *(*)())d2i_ECDSAPrivateKey, (bp), - (unsigned char **)(ecdsa))); + return((EC_KEY *)ASN1_d2i_bio((char *(*)()) + EC_KEY_new,(char *(*)())d2i_EC_PUBKEY, (bp), + (unsigned char **)(eckey))); } -int i2d_ECDSAPrivateKey_bio(BIO *bp, ECDSA *ecdsa) +int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *ecdsa) { - return(ASN1_i2d_bio(i2d_ECDSAPrivateKey,bp,(unsigned char *)ecdsa)); + return(ASN1_i2d_bio(i2d_EC_PUBKEY,bp,(unsigned char *)ecdsa)); } - -ECDSA *d2i_ECDSA_PUBKEY_bio(BIO *bp, ECDSA **ecdsa) + +EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey) { - return((ECDSA *)ASN1_d2i_bio((char *(*)()) - ECDSA_new,(char *(*)())d2i_ECDSA_PUBKEY, (bp), - (unsigned char **)(ecdsa))); + return((EC_KEY *)ASN1_d2i_bio((char *(*)()) + EC_KEY_new,(char *(*)())d2i_ECPrivateKey, (bp), + (unsigned char **)(eckey))); } -int i2d_ECDSA_PUBKEY_bio(BIO *bp, ECDSA *ecdsa) +int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey) { - return(ASN1_i2d_bio(i2d_ECDSA_PUBKEY,bp,(unsigned char *)ecdsa)); + return(ASN1_i2d_bio(i2d_ECPrivateKey,bp,(unsigned char *)eckey)); } - #endif + int X509_pubkey_digest(const X509 *data, const EVP_MD *type, unsigned char *md, unsigned int *len) { diff --git a/crypto/x509v3/Makefile.ssl b/crypto/x509v3/Makefile.ssl index a0680e6f7f..b33e3d1eb5 100644 --- a/crypto/x509v3/Makefile.ssl +++ b/crypto/x509v3/Makefile.ssl @@ -93,22 +93,22 @@ v3_akey.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_akey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_akey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_akey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_akey.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_akey.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_akey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_akey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_akey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_akey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_akey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -v3_akey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -v3_akey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -v3_akey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -v3_akey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -v3_akey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -v3_akey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -v3_akey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -v3_akey.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h -v3_akey.o: ../cryptlib.h v3_akey.c +v3_akey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_akey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_akey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_akey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_akey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_akey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_akey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_akey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_akey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_akey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_akey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_akey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_akey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_akey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_akey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_akey.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_akey.c v3_akeya.o: ../../e_os.h ../../include/openssl/aes.h v3_akeya.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h v3_akeya.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h @@ -117,13 +117,13 @@ v3_akeya.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_akeya.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_akeya.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_akeya.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_akeya.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_akeya.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_akeya.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_akeya.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_akeya.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_akeya.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_akeya.o: ../../include/openssl/opensslconf.h +v3_akeya.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_akeya.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_akeya.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_akeya.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_akeya.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_akeya.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_akeya.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h v3_akeya.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h v3_akeya.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h v3_akeya.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -134,13 +134,13 @@ v3_akeya.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_akeya.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_akeya.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_akeya.c v3_alt.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3_alt.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3_alt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3_alt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3_alt.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3_alt.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3_alt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3_alt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_alt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_alt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_alt.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_alt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_alt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_alt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_alt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3_alt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3_alt.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3_alt.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -164,13 +164,13 @@ v3_bcons.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_bcons.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_bcons.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_bcons.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_bcons.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_bcons.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_bcons.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_bcons.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_bcons.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_bcons.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_bcons.o: ../../include/openssl/opensslconf.h +v3_bcons.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_bcons.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_bcons.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_bcons.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_bcons.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_bcons.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_bcons.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h v3_bcons.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h v3_bcons.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h v3_bcons.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -181,14 +181,14 @@ v3_bcons.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_bcons.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_bcons.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_bcons.c v3_bitst.o: ../../e_os.h ../../include/openssl/aes.h -v3_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -v3_bitst.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -v3_bitst.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -v3_bitst.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -v3_bitst.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -v3_bitst.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -v3_bitst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_bitst.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +v3_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_bitst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_bitst.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_bitst.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h v3_bitst.o: ../../include/openssl/err.h ../../include/openssl/evp.h v3_bitst.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h v3_bitst.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -205,14 +205,14 @@ v3_bitst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_bitst.c v3_conf.o: ../../e_os.h ../../include/openssl/aes.h -v3_conf.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -v3_conf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -v3_conf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -v3_conf.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -v3_conf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -v3_conf.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -v3_conf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_conf.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +v3_conf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_conf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_conf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_conf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_conf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_conf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_conf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_conf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h v3_conf.o: ../../include/openssl/err.h ../../include/openssl/evp.h v3_conf.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h v3_conf.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -236,13 +236,13 @@ v3_cpols.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_cpols.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_cpols.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_cpols.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_cpols.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_cpols.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_cpols.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_cpols.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_cpols.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_cpols.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_cpols.o: ../../include/openssl/opensslconf.h +v3_cpols.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_cpols.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_cpols.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_cpols.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_cpols.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_cpols.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_cpols.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h v3_cpols.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h v3_cpols.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h v3_cpols.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -260,31 +260,31 @@ v3_crld.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_crld.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_crld.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_crld.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_crld.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_crld.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_crld.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_crld.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_crld.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_crld.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_crld.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -v3_crld.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -v3_crld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -v3_crld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -v3_crld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -v3_crld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -v3_crld.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -v3_crld.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -v3_crld.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h -v3_crld.o: ../cryptlib.h v3_crld.c +v3_crld.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_crld.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_crld.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_crld.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_crld.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_crld.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_crld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_crld.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_crld.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_crld.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_crld.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_crld.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_crld.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_crld.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_crld.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_crld.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_crld.c v3_enum.o: ../../e_os.h ../../include/openssl/aes.h -v3_enum.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -v3_enum.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -v3_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -v3_enum.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -v3_enum.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -v3_enum.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -v3_enum.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_enum.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +v3_enum.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_enum.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_enum.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_enum.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_enum.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_enum.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_enum.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_enum.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h v3_enum.o: ../../include/openssl/err.h ../../include/openssl/evp.h v3_enum.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h v3_enum.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -308,13 +308,13 @@ v3_extku.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_extku.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_extku.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_extku.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_extku.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_extku.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_extku.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_extku.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_extku.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_extku.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_extku.o: ../../include/openssl/opensslconf.h +v3_extku.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_extku.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_extku.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_extku.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_extku.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_extku.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_extku.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h v3_extku.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h v3_extku.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h v3_extku.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -332,30 +332,30 @@ v3_genn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_genn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_genn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_genn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_genn.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_genn.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_genn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_genn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_genn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_genn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_genn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -v3_genn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -v3_genn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -v3_genn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -v3_genn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -v3_genn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -v3_genn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -v3_genn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -v3_genn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h -v3_genn.o: ../cryptlib.h v3_genn.c +v3_genn.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_genn.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_genn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_genn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_genn.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_genn.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_genn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_genn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_genn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_genn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_genn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_genn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_genn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_genn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_genn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_genn.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_genn.c v3_ia5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3_ia5.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3_ia5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3_ia5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3_ia5.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3_ia5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3_ia5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3_ia5.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_ia5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_ia5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_ia5.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_ia5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_ia5.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_ia5.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_ia5.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3_ia5.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3_ia5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3_ia5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -379,30 +379,30 @@ v3_info.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_info.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_info.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_info.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_info.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_info.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -v3_info.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -v3_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -v3_info.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -v3_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -v3_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -v3_info.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -v3_info.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -v3_info.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h -v3_info.o: ../cryptlib.h v3_info.c +v3_info.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_info.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_info.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_info.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_info.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_info.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_info.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_info.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_info.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_info.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_info.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_info.c v3_int.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3_int.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3_int.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3_int.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3_int.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3_int.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3_int.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3_int.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_int.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_int.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_int.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_int.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_int.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_int.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3_int.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3_int.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3_int.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -419,13 +419,13 @@ v3_int.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_int.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_int.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_int.c v3_lib.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3_lib.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_lib.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -442,14 +442,14 @@ v3_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_lib.o: ../../include/openssl/x509v3.h ../cryptlib.h ext_dat.h v3_lib.c v3_ocsp.o: ../../e_os.h ../../include/openssl/aes.h -v3_ocsp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -v3_ocsp.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -v3_ocsp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -v3_ocsp.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -v3_ocsp.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -v3_ocsp.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -v3_ocsp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_ocsp.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +v3_ocsp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_ocsp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_ocsp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_ocsp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_ocsp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_ocsp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_ocsp.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_ocsp.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h v3_ocsp.o: ../../include/openssl/err.h ../../include/openssl/evp.h v3_ocsp.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h v3_ocsp.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -473,29 +473,30 @@ v3_pku.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h v3_pku.o: ../../include/openssl/des.h ../../include/openssl/des_old.h v3_pku.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h v3_pku.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -v3_pku.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -v3_pku.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -v3_pku.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -v3_pku.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -v3_pku.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -v3_pku.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -v3_pku.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -v3_pku.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -v3_pku.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -v3_pku.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -v3_pku.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -v3_pku.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -v3_pku.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -v3_pku.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -v3_pku.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_pku.c +v3_pku.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +v3_pku.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_pku.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_pku.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_pku.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_pku.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_pku.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_pku.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_pku.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_pku.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_pku.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_pku.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_pku.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_pku.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_pku.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_pku.o: ../cryptlib.h v3_pku.c v3_prn.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3_prn.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3_prn.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3_prn.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3_prn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3_prn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3_prn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_prn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_prn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_prn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_prn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_prn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_prn.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3_prn.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3_prn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3_prn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -512,14 +513,14 @@ v3_prn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_prn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_prn.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_prn.c v3_purp.o: ../../e_os.h ../../include/openssl/aes.h -v3_purp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -v3_purp.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -v3_purp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -v3_purp.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -v3_purp.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -v3_purp.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -v3_purp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_purp.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +v3_purp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_purp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_purp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_purp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_purp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_purp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_purp.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_purp.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h v3_purp.o: ../../include/openssl/err.h ../../include/openssl/evp.h v3_purp.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h v3_purp.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -536,14 +537,14 @@ v3_purp.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h v3_purp.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h v3_purp.o: ../cryptlib.h v3_purp.c v3_skey.o: ../../e_os.h ../../include/openssl/aes.h -v3_skey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -v3_skey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -v3_skey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -v3_skey.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -v3_skey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -v3_skey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -v3_skey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_skey.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +v3_skey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_skey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_skey.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_skey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_skey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_skey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h v3_skey.o: ../../include/openssl/err.h ../../include/openssl/evp.h v3_skey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h v3_skey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -567,13 +568,13 @@ v3_sxnet.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_sxnet.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_sxnet.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_sxnet.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_sxnet.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_sxnet.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_sxnet.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_sxnet.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_sxnet.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_sxnet.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_sxnet.o: ../../include/openssl/opensslconf.h +v3_sxnet.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_sxnet.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_sxnet.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_sxnet.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_sxnet.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_sxnet.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_sxnet.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h v3_sxnet.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h v3_sxnet.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h v3_sxnet.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -584,13 +585,13 @@ v3_sxnet.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_sxnet.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_sxnet.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_sxnet.c v3_utl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3_utl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3_utl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3_utl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3_utl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3_utl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3_utl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3_utl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_utl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_utl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_utl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_utl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_utl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_utl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3_utl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3_utl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3_utl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -607,13 +608,13 @@ v3_utl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_utl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_utl.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_utl.c v3err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3err.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3err.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3err.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3err.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3err.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h diff --git a/demos/engines/rsaref/rsaref.c b/demos/engines/rsaref/rsaref.c index e23f64c01e..f092acbf3f 100644 --- a/demos/engines/rsaref/rsaref.c +++ b/demos/engines/rsaref/rsaref.c @@ -116,7 +116,7 @@ static const EVP_CIPHER cipher_des_cbc = { NID_des_cbc, 8, 8, 8, - 0, + 0 | EVP_CIPH_CBC_MODE, cipher_des_cbc_init, cipher_des_cbc_code, cipher_des_cbc_clean, @@ -131,7 +131,7 @@ static const EVP_CIPHER cipher_des_ede3_cbc = { NID_des_ede3_cbc, 8, 24, 8, - 0, + 0 | EVP_CIPH_CBC_MODE, cipher_des_ede3_cbc_init, cipher_des_ede3_cbc_code, cipher_des_ede3_cbc_clean, @@ -146,7 +146,7 @@ static const EVP_CIPHER cipher_desx_cbc = { NID_desx_cbc, 8, 24, 8, - 0, + 0 | EVP_CIPH_CBC_MODE, cipher_desx_cbc_init, cipher_desx_cbc_code, cipher_desx_cbc_clean, diff --git a/doc/crypto/DH_set_method.pod b/doc/crypto/DH_set_method.pod index d990bf8786..73261fc467 100644 --- a/doc/crypto/DH_set_method.pod +++ b/doc/crypto/DH_set_method.pod @@ -2,7 +2,7 @@ =head1 NAME -DH_set_default_openssl_method, DH_get_default_openssl_method, +DH_set_default_method, DH_get_default_method, DH_set_method, DH_new_method, DH_OpenSSL - select DH method =head1 SYNOPSIS @@ -10,45 +10,47 @@ DH_set_method, DH_new_method, DH_OpenSSL - select DH method #include <openssl/dh.h> #include <openssl/engine.h> - void DH_set_default_openssl_method(DH_METHOD *meth); + void DH_set_default_method(const DH_METHOD *meth); - DH_METHOD *DH_get_default_openssl_method(void); + const DH_METHOD *DH_get_default_method(void); - int DH_set_method(DH *dh, ENGINE *engine); + int DH_set_method(DH *dh, const DH_METHOD *meth); DH *DH_new_method(ENGINE *engine); - DH_METHOD *DH_OpenSSL(void); + const DH_METHOD *DH_OpenSSL(void); =head1 DESCRIPTION A B<DH_METHOD> specifies the functions that OpenSSL uses for Diffie-Hellman operations. By modifying the method, alternative implementations -such as hardware accelerators may be used. - -Initially, the default is to use the OpenSSL internal implementation. -DH_OpenSSL() returns a pointer to that method. - -DH_set_default_openssl_method() makes B<meth> the default method for all DH -structures created later. B<NB:> This is true only whilst the default engine -for Diffie-Hellman operations remains as "openssl". ENGINEs provide an -encapsulation for implementations of one or more algorithms, and all the DH -functions mentioned here operate within the scope of the default -"openssl" engine. - -DH_get_default_openssl_method() returns a pointer to the current default -method for the "openssl" engine. - -DH_set_method() selects B<engine> as the engine that will be responsible for -all operations using the structure B<dh>. If this function completes successfully, -then the B<dh> structure will have its own functional reference of B<engine>, so -the caller should remember to free their own reference to B<engine> when they are -finished with it. NB: An ENGINE's DH_METHOD can be retrieved (or set) by -ENGINE_get_DH() or ENGINE_set_DH(). - -DH_new_method() allocates and initializes a DH structure so that -B<engine> will be used for the DH operations. If B<engine> is NULL, -the default engine for Diffie-Hellman opertaions is used. +such as hardware accelerators may be used. IMPORTANT: See the NOTES section for +important information about how these DH API functions are affected by the use +of B<ENGINE> API calls. + +Initially, the default DH_METHOD is the OpenSSL internal implementation, as +returned by DH_OpenSSL(). + +DH_set_default_method() makes B<meth> the default method for all DH +structures created later. B<NB>: This is true only whilst no ENGINE has been set +as a default for DH, so this function is no longer recommended. + +DH_get_default_method() returns a pointer to the current default DH_METHOD. +However, the meaningfulness of this result is dependant on whether the ENGINE +API is being used, so this function is no longer recommended. + +DH_set_method() selects B<meth> to perform all operations using the key B<dh>. +This will replace the DH_METHOD used by the DH key and if the previous method +was supplied by an ENGINE, the handle to that ENGINE will be released during the +change. It is possible to have DH keys that only work with certain DH_METHOD +implementations (eg. from an ENGINE module that supports embedded +hardware-protected keys), and in such cases attempting to change the DH_METHOD +for the key can have unexpected results. + +DH_new_method() allocates and initializes a DH structure so that B<engine> will +be used for the DH operations. If B<engine> is NULL, the default ENGINE for DH +operations is used, and if no default ENGINE is set, the DH_METHOD controlled by +DH_set_default_method() is used. =head1 THE DH_METHOD STRUCTURE @@ -82,17 +84,28 @@ the default engine for Diffie-Hellman opertaions is used. =head1 RETURN VALUES -DH_OpenSSL() and DH_get_default_openssl_method() return pointers to the -respective B<DH_METHOD>s. +DH_OpenSSL() and DH_get_default_method() return pointers to the respective +B<DH_METHOD>s. + +DH_set_default_method() returns no value. + +DH_set_method() returns non-zero if the provided B<meth> was successfully set as +the method for B<dh> (including unloading the ENGINE handle if the previous +method was supplied by an ENGINE). -DH_set_default_openssl_method() returns no value. +DH_new_method() returns NULL and sets an error code that can be obtained by +L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise it +returns a pointer to the newly allocated structure. -DH_set_method() returns non-zero if the ENGINE associated with B<dh> -was successfully changed to B<engine>. +=head1 NOTES -DH_new_method() returns NULL and sets an error code that can be -obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. -Otherwise it returns a pointer to the newly allocated structure. +As of version 0.9.7, DH_METHOD implementations are grouped together with other +algorithmic APIs (eg. RSA_METHOD, EVP_CIPHER, etc) in B<ENGINE> modules. If a +default ENGINE is specified for DH functionality using an ENGINE API function, +that will override any DH defaults set using the DH API (ie. +DH_set_default_method()). For this reason, the ENGINE API is the recommended way +to control default implementations for use in DH and other cryptographic +algorithms. =head1 SEE ALSO @@ -103,9 +116,14 @@ L<dh(3)|dh(3)>, L<DH_new(3)|DH_new(3)> DH_set_default_method(), DH_get_default_method(), DH_set_method(), DH_new_method() and DH_OpenSSL() were added in OpenSSL 0.9.4. -DH_set_default_openssl_method() and DH_get_default_openssl_method() -replaced DH_set_default_method() and DH_get_default_method() respectively, -and DH_set_method() and DH_new_method() were altered to use B<ENGINE>s -rather than B<DH_METHOD>s during development of OpenSSL 0.9.6. +DH_set_default_openssl_method() and DH_get_default_openssl_method() replaced +DH_set_default_method() and DH_get_default_method() respectively, and +DH_set_method() and DH_new_method() were altered to use B<ENGINE>s rather than +B<DH_METHOD>s during development of the engine version of OpenSSL 0.9.6. For +0.9.7, the handling of defaults in the ENGINE API was restructured so that this +change was reversed, and behaviour of the other functions resembled more closely +the previous behaviour. The behaviour of defaults in the ENGINE API now +transparently overrides the behaviour of defaults in the DH API without +requiring changing these function prototypes. =cut diff --git a/doc/crypto/DSA_dup_DH.pod b/doc/crypto/DSA_dup_DH.pod index 29cb1075d1..fdfe125ab0 100644 --- a/doc/crypto/DSA_dup_DH.pod +++ b/doc/crypto/DSA_dup_DH.pod @@ -8,7 +8,7 @@ DSA_dup_DH - create a DH structure out of DSA structure #include <openssl/dsa.h> - DH * DSA_dup_DH(DSA *r); + DH * DSA_dup_DH(const DSA *r); =head1 DESCRIPTION diff --git a/doc/crypto/DSA_new.pod b/doc/crypto/DSA_new.pod index 7dde54445b..546146d9de 100644 --- a/doc/crypto/DSA_new.pod +++ b/doc/crypto/DSA_new.pod @@ -14,7 +14,8 @@ DSA_new, DSA_free - allocate and free DSA objects =head1 DESCRIPTION -DSA_new() allocates and initializes a B<DSA> structure. +DSA_new() allocates and initializes a B<DSA> structure. It is equivalent to +calling DSA_new_method(NULL). DSA_free() frees the B<DSA> structure and its components. The values are erased before the memory is returned to the system. diff --git a/doc/crypto/DSA_set_method.pod b/doc/crypto/DSA_set_method.pod index 36a1052d27..bc3cfb1f0a 100644 --- a/doc/crypto/DSA_set_method.pod +++ b/doc/crypto/DSA_set_method.pod @@ -2,7 +2,7 @@ =head1 NAME -DSA_set_default_openssl_method, DSA_get_default_openssl_method, +DSA_set_default_method, DSA_get_default_method, DSA_set_method, DSA_new_method, DSA_OpenSSL - select DSA method =head1 SYNOPSIS @@ -10,11 +10,11 @@ DSA_set_method, DSA_new_method, DSA_OpenSSL - select DSA method #include <openssl/dsa.h> #include <openssl/engine.h> - void DSA_set_default_openssl_method(DSA_METHOD *meth); + void DSA_set_default_method(const DSA_METHOD *meth); - DSA_METHOD *DSA_get_default_openssl_method(void); + const DSA_METHOD *DSA_get_default_method(void); - int DSA_set_method(DSA *dsa, ENGINE *engine); + int DSA_set_method(DSA *dsa, const DSA_METHOD *meth); DSA *DSA_new_method(ENGINE *engine); @@ -24,26 +24,35 @@ DSA_set_method, DSA_new_method, DSA_OpenSSL - select DSA method A B<DSA_METHOD> specifies the functions that OpenSSL uses for DSA operations. By modifying the method, alternative implementations -such as hardware accelerators may be used. - -Initially, the default is to use the OpenSSL internal implementation. -DSA_OpenSSL() returns a pointer to that method. - -DSA_set_default_openssl_method() makes B<meth> the default method for -all DSA structures created later. B<NB:> This is true only whilst the -default engine for DSA operations remains as "openssl". ENGINEs -provide an encapsulation for implementations of one or more algorithms at a -time, and all the DSA functions mentioned here operate within the scope -of the default "openssl" engine. - -DSA_get_default_openssl_method() returns a pointer to the current default -method for the "openssl" engine. - -DSA_set_method() selects B<engine> for all operations using the structure B<dsa>. - -DSA_new_method() allocates and initializes a DSA structure so that -B<engine> will be used for the DSA operations. If B<engine> is NULL, -the default engine for DSA operations is used. +such as hardware accelerators may be used. IMPORTANT: See the NOTES section for +important information about how these DSA API functions are affected by the use +of B<ENGINE> API calls. + +Initially, the default DSA_METHOD is the OpenSSL internal implementation, +as returned by DSA_OpenSSL(). + +DSA_set_default_method() makes B<meth> the default method for all DSA +structures created later. B<NB>: This is true only whilst no ENGINE has +been set as a default for DSA, so this function is no longer recommended. + +DSA_get_default_method() returns a pointer to the current default +DSA_METHOD. However, the meaningfulness of this result is dependant on +whether the ENGINE API is being used, so this function is no longer +recommended. + +DSA_set_method() selects B<meth> to perform all operations using the key +B<rsa>. This will replace the DSA_METHOD used by the DSA key and if the +previous method was supplied by an ENGINE, the handle to that ENGINE will +be released during the change. It is possible to have DSA keys that only +work with certain DSA_METHOD implementations (eg. from an ENGINE module +that supports embedded hardware-protected keys), and in such cases +attempting to change the DSA_METHOD for the key can have unexpected +results. + +DSA_new_method() allocates and initializes a DSA structure so that B<engine> +will be used for the DSA operations. If B<engine> is NULL, the default engine +for DSA operations is used, and if no default ENGINE is set, the DSA_METHOD +controlled by DSA_set_default_method() is used. =head1 THE DSA_METHOD STRUCTURE @@ -89,18 +98,29 @@ struct =head1 RETURN VALUES -DSA_OpenSSL() and DSA_get_default_openssl_method() return pointers to the -respective B<DSA_METHOD>s. +DSA_OpenSSL() and DSA_get_default_method() return pointers to the respective +B<DSA_METHOD>s. -DSA_set_default_openssl_method() returns no value. +DSA_set_default_method() returns no value. -DSA_set_method() returns non-zero if the ENGINE associated with B<dsa> -was successfully changed to B<engine>. +DSA_set_method() returns non-zero if the provided B<meth> was successfully set as +the method for B<dsa> (including unloading the ENGINE handle if the previous +method was supplied by an ENGINE). DSA_new_method() returns NULL and sets an error code that can be obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise it returns a pointer to the newly allocated structure. +=head1 NOTES + +As of version 0.9.7, DSA_METHOD implementations are grouped together with other +algorithmic APIs (eg. RSA_METHOD, EVP_CIPHER, etc) in B<ENGINE> modules. If a +default ENGINE is specified for DSA functionality using an ENGINE API function, +that will override any DSA defaults set using the DSA API (ie. +DSA_set_default_method()). For this reason, the ENGINE API is the recommended way +to control default implementations for use in DSA and other cryptographic +algorithms. + =head1 SEE ALSO L<dsa(3)|dsa(3)>, L<DSA_new(3)|DSA_new(3)> @@ -110,9 +130,14 @@ L<dsa(3)|dsa(3)>, L<DSA_new(3)|DSA_new(3)> DSA_set_default_method(), DSA_get_default_method(), DSA_set_method(), DSA_new_method() and DSA_OpenSSL() were added in OpenSSL 0.9.4. -DSA_set_default_openssl_method() and DSA_get_default_openssl_method() -replaced DSA_set_default_method() and DSA_get_default_method() respectively, -and DSA_set_method() and DSA_new_method() were altered to use B<ENGINE>s -rather than B<DSA_METHOD>s during development of OpenSSL 0.9.6. +DSA_set_default_openssl_method() and DSA_get_default_openssl_method() replaced +DSA_set_default_method() and DSA_get_default_method() respectively, and +DSA_set_method() and DSA_new_method() were altered to use B<ENGINE>s rather than +B<DSA_METHOD>s during development of the engine version of OpenSSL 0.9.6. For +0.9.7, the handling of defaults in the ENGINE API was restructured so that this +change was reversed, and behaviour of the other functions resembled more closely +the previous behaviour. The behaviour of defaults in the ENGINE API now +transparently overrides the behaviour of defaults in the DSA API without +requiring changing these function prototypes. =cut diff --git a/doc/crypto/DSA_size.pod b/doc/crypto/DSA_size.pod index 23b6320a4d..ba4f650361 100644 --- a/doc/crypto/DSA_size.pod +++ b/doc/crypto/DSA_size.pod @@ -8,7 +8,7 @@ DSA_size - get DSA signature size #include <openssl/dsa.h> - int DSA_size(DSA *dsa); + int DSA_size(const DSA *dsa); =head1 DESCRIPTION diff --git a/doc/crypto/RAND_set_rand_method.pod b/doc/crypto/RAND_set_rand_method.pod index 464eba416d..c9bb6d9f27 100644 --- a/doc/crypto/RAND_set_rand_method.pod +++ b/doc/crypto/RAND_set_rand_method.pod @@ -8,22 +8,30 @@ RAND_set_rand_method, RAND_get_rand_method, RAND_SSLeay - select RAND method #include <openssl/rand.h> - void RAND_set_rand_method(RAND_METHOD *meth); + void RAND_set_rand_method(const RAND_METHOD *meth); - RAND_METHOD *RAND_get_rand_method(void); + const RAND_METHOD *RAND_get_rand_method(void); RAND_METHOD *RAND_SSLeay(void); =head1 DESCRIPTION -A B<RAND_METHOD> specifies the functions that OpenSSL uses for random -number generation. By modifying the method, alternative -implementations such as hardware RNGs may be used. Initially, the -default is to use the OpenSSL internal implementation. RAND_SSLeay() -returns a pointer to that method. +A B<RAND_METHOD> specifies the functions that OpenSSL uses for random number +generation. By modifying the method, alternative implementations such as +hardware RNGs may be used. IMPORTANT: See the NOTES section for important +information about how these RAND API functions are affected by the use of +B<ENGINE> API calls. -RAND_set_rand_method() sets the RAND method to B<meth>. -RAND_get_rand_method() returns a pointer to the current method. +Initially, the default RAND_METHOD is the OpenSSL internal implementation, as +returned by RAND_SSLeay(). + +RAND_set_default_method() makes B<meth> the method for PRNG use. B<NB>: This is +true only whilst no ENGINE has been set as a default for RAND, so this function +is no longer recommended. + +RAND_get_default_method() returns a pointer to the current RAND_METHOD. +However, the meaningfulness of this result is dependant on whether the ENGINE +API is being used, so this function is no longer recommended. =head1 THE RAND_METHOD STRUCTURE @@ -47,13 +55,29 @@ Each component may be NULL if the function is not implemented. RAND_set_rand_method() returns no value. RAND_get_rand_method() and RAND_SSLeay() return pointers to the respective methods. +=head1 NOTES + +As of version 0.9.7, RAND_METHOD implementations are grouped together with other +algorithmic APIs (eg. RSA_METHOD, EVP_CIPHER, etc) in B<ENGINE> modules. If a +default ENGINE is specified for RAND functionality using an ENGINE API function, +that will override any RAND defaults set using the RAND API (ie. +RAND_set_rand_method()). For this reason, the ENGINE API is the recommended way +to control default implementations for use in RAND and other cryptographic +algorithms. + =head1 SEE ALSO -L<rand(3)|rand(3)> +L<rand(3)|rand(3)>, L<engine(3)|engine(3)> =head1 HISTORY RAND_set_rand_method(), RAND_get_rand_method() and RAND_SSLeay() are available in all versions of OpenSSL. +In the engine version of version 0.9.6, RAND_set_rand_method() was altered to +take an ENGINE pointer as its argument. As of version 0.9.7, that has been +reverted as the ENGINE API transparently overrides RAND defaults if used, +otherwise RAND API functions work as before. RAND_set_rand_engine() was also +introduced in version 0.9.7. + =cut diff --git a/doc/crypto/RSA_new.pod b/doc/crypto/RSA_new.pod index f16490ea6a..f0d996c40f 100644 --- a/doc/crypto/RSA_new.pod +++ b/doc/crypto/RSA_new.pod @@ -14,7 +14,8 @@ RSA_new, RSA_free - allocate and free RSA objects =head1 DESCRIPTION -RSA_new() allocates and initializes an B<RSA> structure. +RSA_new() allocates and initializes an B<RSA> structure. It is equivalent to +calling RSA_new_method(NULL). RSA_free() frees the B<RSA> structure and its components. The key is erased before the memory is returned to the system. @@ -29,7 +30,8 @@ RSA_free() returns no value. =head1 SEE ALSO -L<err(3)|err(3)>, L<rsa(3)|rsa(3)>, L<RSA_generate_key(3)|RSA_generate_key(3)> +L<err(3)|err(3)>, L<rsa(3)|rsa(3)>, L<RSA_generate_key(3)|RSA_generate_key(3)>, +L<RSA_new_method(3)|RSA_new_method(3)> =head1 HISTORY diff --git a/doc/crypto/RSA_set_method.pod b/doc/crypto/RSA_set_method.pod index 14917dd35f..0687c2242a 100644 --- a/doc/crypto/RSA_set_method.pod +++ b/doc/crypto/RSA_set_method.pod @@ -11,52 +11,64 @@ RSA_null_method, RSA_flags, RSA_new_method - select RSA method #include <openssl/rsa.h> #include <openssl/engine.h> - void RSA_set_default_openssl_method(RSA_METHOD *meth); + void RSA_set_default_method(const RSA_METHOD *meth); - RSA_METHOD *RSA_get_default_openssl_method(void); + RSA_METHOD *RSA_get_default_method(void); - int RSA_set_method(RSA *rsa, ENGINE *engine); + int RSA_set_method(RSA *rsa, const RSA_METHOD *meth); - RSA_METHOD *RSA_get_method(RSA *rsa); + RSA_METHOD *RSA_get_method(const RSA *rsa); RSA_METHOD *RSA_PKCS1_SSLeay(void); RSA_METHOD *RSA_null_method(void); - int RSA_flags(RSA *rsa); + int RSA_flags(const RSA *rsa); RSA *RSA_new_method(ENGINE *engine); =head1 DESCRIPTION An B<RSA_METHOD> specifies the functions that OpenSSL uses for RSA -operations. By modifying the method, alternative implementations -such as hardware accelerators may be used. - -Initially, the default is to use the OpenSSL internal implementation. -RSA_PKCS1_SSLeay() returns a pointer to that method. - -RSA_set_default_openssl_method() makes B<meth> the default method for all B<RSA> -structures created later. B<NB:> This is true only whilst the default engine -for RSA operations remains as "openssl". ENGINEs provide an -encapsulation for implementations of one or more algorithms at a time, and all -the RSA functions mentioned here operate within the scope of the default -"openssl" engine. - -RSA_get_default_openssl_method() returns a pointer to the current default -method for the "openssl" engine. - -RSA_set_method() selects B<engine> for all operations using the key -B<rsa>. - -RSA_get_method() returns a pointer to the RSA_METHOD from the currently -selected ENGINE for B<rsa>. - -RSA_flags() returns the B<flags> that are set for B<rsa>'s current method. +operations. By modifying the method, alternative implementations such as +hardware accelerators may be used. IMPORTANT: See the NOTES section for +important information about how these RSA API functions are affected by the +use of B<ENGINE> API calls. + +Initially, the default RSA_METHOD is the OpenSSL internal implementation, +as returned by RSA_PKCS1_SSLeay(). + +RSA_set_default_method() makes B<meth> the default method for all RSA +structures created later. B<NB>: This is true only whilst no ENGINE has +been set as a default for RSA, so this function is no longer recommended. + +RSA_get_default_method() returns a pointer to the current default +RSA_METHOD. However, the meaningfulness of this result is dependant on +whether the ENGINE API is being used, so this function is no longer +recommended. + +RSA_set_method() selects B<meth> to perform all operations using the key +B<rsa>. This will replace the RSA_METHOD used by the RSA key and if the +previous method was supplied by an ENGINE, the handle to that ENGINE will +be released during the change. It is possible to have RSA keys that only +work with certain RSA_METHOD implementations (eg. from an ENGINE module +that supports embedded hardware-protected keys), and in such cases +attempting to change the RSA_METHOD for the key can have unexpected +results. + +RSA_get_method() returns a pointer to the RSA_METHOD being used by B<rsa>. +This method may or may not be supplied by an ENGINE implementation, but if +it is, the return value can only be guaranteed to be valid as long as the +RSA key itself is valid and does not have its implementation changed by +RSA_set_method(). + +RSA_flags() returns the B<flags> that are set for B<rsa>'s current +RSA_METHOD. See the BUGS section. RSA_new_method() allocates and initializes an RSA structure so that -B<engine> will be used for the RSA operations. If B<engine> is NULL, -the default engine for RSA operations is used. +B<engine> will be used for the RSA operations. If B<engine> is NULL, the +default ENGINE for RSA operations is used, and if no default ENGINE is set, +the RSA_METHOD controlled by RSA_set_default_method() is used. =head1 THE RSA_METHOD STRUCTURE @@ -121,22 +133,45 @@ the default engine for RSA operations is used. =head1 RETURN VALUES -RSA_PKCS1_SSLeay(), RSA_PKCS1_null_method(), RSA_get_default_openssl_method() +RSA_PKCS1_SSLeay(), RSA_PKCS1_null_method(), RSA_get_default_method() and RSA_get_method() return pointers to the respective RSA_METHODs. -RSA_set_default_openssl_method() returns no value. +RSA_set_default_method() returns no value. -RSA_set_method() selects B<engine> as the engine that will be responsible for -all operations using the structure B<rsa>. If this function completes successfully, -then the B<rsa> structure will have its own functional reference of B<engine>, so -the caller should remember to free their own reference to B<engine> when they are -finished with it. NB: An ENGINE's RSA_METHOD can be retrieved (or set) by -ENGINE_get_RSA() or ENGINE_set_RSA(). +RSA_set_method() returns a pointer to the old RSA_METHOD implementation +that was replaced. However, this return value should probably be ignored +because if it was supplied by an ENGINE, the pointer could be invalidated +at any time if the ENGINE is unloaded (in fact it could be unloaded as a +result of the RSA_set_method() function releasing its handle to the +ENGINE). For this reason, the return type may be replaced with a B<void> +declaration in a future release. -RSA_new_method() returns NULL and sets an error code that can be -obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise +RSA_new_method() returns NULL and sets an error code that can be obtained +by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation fails. Otherwise it returns a pointer to the newly allocated structure. +=head1 NOTES + +As of version 0.9.7, RSA_METHOD implementations are grouped together with +other algorithmic APIs (eg. DSA_METHOD, EVP_CIPHER, etc) into B<ENGINE> +modules. If a default ENGINE is specified for RSA functionality using an +ENGINE API function, that will override any RSA defaults set using the RSA +API (ie. RSA_set_default_method()). For this reason, the ENGINE API is the +recommended way to control default implementations for use in RSA and other +cryptographic algorithms. + +=head1 BUGS + +The behaviour of RSA_flags() is a mis-feature that is left as-is for now +to avoid creating compatibility problems. RSA functionality, such as the +encryption functions, are controlled by the B<flags> value in the RSA key +itself, not by the B<flags> value in the RSA_METHOD attached to the RSA key +(which is what this function returns). If the flags element of an RSA key +is changed, the changes will be honoured by RSA functionality but will not +be reflected in the return value of the RSA_flags() function - in effect +RSA_flags() behaves more like an RSA_default_flags() function (which does +not currently exist). + =head1 SEE ALSO L<rsa(3)|rsa(3)>, L<RSA_new(3)|RSA_new(3)> @@ -149,8 +184,14 @@ well as the rsa_sign and rsa_verify components of RSA_METHOD were added in OpenSSL 0.9.4. RSA_set_default_openssl_method() and RSA_get_default_openssl_method() -replaced RSA_set_default_method() and RSA_get_default_method() respectively, -and RSA_set_method() and RSA_new_method() were altered to use B<ENGINE>s -rather than B<RSA_METHOD>s during development of OpenSSL 0.9.6. +replaced RSA_set_default_method() and RSA_get_default_method() +respectively, and RSA_set_method() and RSA_new_method() were altered to use +B<ENGINE>s rather than B<RSA_METHOD>s during development of the engine +version of OpenSSL 0.9.6. For 0.9.7, the handling of defaults in the ENGINE +API was restructured so that this change was reversed, and behaviour of the +other functions resembled more closely the previous behaviour. The +behaviour of defaults in the ENGINE API now transparently overrides the +behaviour of defaults in the RSA API without requiring changing these +function prototypes. =cut diff --git a/doc/crypto/RSA_size.pod b/doc/crypto/RSA_size.pod index b36b4d58d5..5b7f835f95 100644 --- a/doc/crypto/RSA_size.pod +++ b/doc/crypto/RSA_size.pod @@ -8,7 +8,7 @@ RSA_size - get RSA modulus size #include <openssl/rsa.h> - int RSA_size(RSA *rsa); + int RSA_size(const RSA *rsa); =head1 DESCRIPTION diff --git a/doc/crypto/dh.pod b/doc/crypto/dh.pod index b4be4be405..c3ccd06207 100644 --- a/doc/crypto/dh.pod +++ b/doc/crypto/dh.pod @@ -12,20 +12,20 @@ dh - Diffie-Hellman key agreement DH * DH_new(void); void DH_free(DH *dh); - int DH_size(DH *dh); + int DH_size(const DH *dh); DH * DH_generate_parameters(int prime_len, int generator, void (*callback)(int, int, void *), void *cb_arg); - int DH_check(DH *dh, int *codes); + int DH_check(const DH *dh, int *codes); int DH_generate_key(DH *dh); int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh); - void DH_set_default_openssl_method(DH_METHOD *meth); - DH_METHOD *DH_get_default_openssl_method(void); - int DH_set_method(DH *dh, ENGINE *engine); + void DH_set_default_method(const DH_METHOD *meth); + const DH_METHOD *DH_get_default_method(void); + int DH_set_method(DH *dh, const DH_METHOD *meth); DH *DH_new_method(ENGINE *engine); - DH_METHOD *DH_OpenSSL(void); + const DH_METHOD *DH_OpenSSL(void); int DH_get_ex_new_index(long argl, char *argp, int (*new_func)(), int (*dup_func)(), void (*free_func)()); @@ -33,10 +33,10 @@ dh - Diffie-Hellman key agreement char *DH_get_ex_data(DH *d, int idx); DH * d2i_DHparams(DH **a, unsigned char **pp, long length); - int i2d_DHparams(DH *a, unsigned char **pp); + int i2d_DHparams(const DH *a, unsigned char **pp); - int DHparams_print_fp(FILE *fp, DH *x); - int DHparams_print(BIO *bp, DH *x); + int DHparams_print_fp(FILE *fp, const DH *x); + int DHparams_print(BIO *bp, const DH *x); =head1 DESCRIPTION @@ -57,11 +57,20 @@ The B<DH> structure consists of several BIGNUM components. }; DH +Note that DH keys may use non-standard B<DH_METHOD> implementations, +either directly or by the use of B<ENGINE> modules. In some cases (eg. an +ENGINE providing support for hardware-embedded keys), these BIGNUM values +will not be used by the implementation or may be used for alternative data +storage. For this reason, applications should generally avoid using DH +structure elements directly and instead use API functions to query or +modify keys. + =head1 SEE ALSO L<dhparam(1)|dhparam(1)>, L<bn(3)|bn(3)>, L<dsa(3)|dsa(3)>, L<err(3)|err(3)>, -L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, L<DH_set_method(3)|DH_set_method(3)>, -L<DH_new(3)|DH_new(3)>, L<DH_get_ex_new_index(3)|DH_get_ex_new_index(3)>, +L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, L<engine(3)|engine(3)>, +L<DH_set_method(3)|DH_set_method(3)>, L<DH_new(3)|DH_new(3)>, +L<DH_get_ex_new_index(3)|DH_get_ex_new_index(3)>, L<DH_generate_parameters(3)|DH_generate_parameters(3)>, L<DH_compute_key(3)|DH_compute_key(3)>, L<d2i_DHparams(3)|d2i_DHparams(3)>, L<RSA_print(3)|RSA_print(3)> diff --git a/doc/crypto/dsa.pod b/doc/crypto/dsa.pod index 82d7fb77cd..da07d2b930 100644 --- a/doc/crypto/dsa.pod +++ b/doc/crypto/dsa.pod @@ -12,13 +12,13 @@ dsa - Digital Signature Algorithm DSA * DSA_new(void); void DSA_free(DSA *dsa); - int DSA_size(DSA *dsa); + int DSA_size(const DSA *dsa); DSA * DSA_generate_parameters(int bits, unsigned char *seed, int seed_len, int *counter_ret, unsigned long *h_ret, void (*callback)(int, int, void *), void *cb_arg); - DH * DSA_dup_DH(DSA *r); + DH * DSA_dup_DH(const DSA *r); int DSA_generate_key(DSA *dsa); @@ -27,13 +27,13 @@ dsa - Digital Signature Algorithm int DSA_sign_setup(DSA *dsa, BN_CTX *ctx, BIGNUM **kinvp, BIGNUM **rp); int DSA_verify(int dummy, const unsigned char *dgst, int len, - unsigned char *sigbuf, int siglen, DSA *dsa); + const unsigned char *sigbuf, int siglen, DSA *dsa); - void DSA_set_default_openssl_method(DSA_METHOD *meth); - DSA_METHOD *DSA_get_default_openssl_method(void); - int DSA_set_method(DSA *dsa, ENGINE *engine); + void DSA_set_default_method(const DSA_METHOD *meth); + const DSA_METHOD *DSA_get_default_method(void); + int DSA_set_method(DSA *dsa, const DSA_METHOD *meth); DSA *DSA_new_method(ENGINE *engine); - DSA_METHOD *DSA_OpenSSL(void); + const DSA_METHOD *DSA_OpenSSL(void); int DSA_get_ex_new_index(long argl, char *argp, int (*new_func)(), int (*dup_func)(), void (*free_func)()); @@ -42,7 +42,7 @@ dsa - Digital Signature Algorithm DSA_SIG *DSA_SIG_new(void); void DSA_SIG_free(DSA_SIG *a); - int i2d_DSA_SIG(DSA_SIG *a, unsigned char **pp); + int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp); DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, unsigned char **pp, long length); DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); @@ -52,14 +52,14 @@ dsa - Digital Signature Algorithm DSA * d2i_DSAPublicKey(DSA **a, unsigned char **pp, long length); DSA * d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length); DSA * d2i_DSAparams(DSA **a, unsigned char **pp, long length); - int i2d_DSAPublicKey(DSA *a, unsigned char **pp); - int i2d_DSAPrivateKey(DSA *a, unsigned char **pp); - int i2d_DSAparams(DSA *a,unsigned char **pp); + int i2d_DSAPublicKey(const DSA *a, unsigned char **pp); + int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp); + int i2d_DSAparams(const DSA *a,unsigned char **pp); - int DSAparams_print(BIO *bp, DSA *x); - int DSAparams_print_fp(FILE *fp, DSA *x); - int DSA_print(BIO *bp, DSA *x, int off); - int DSA_print_fp(FILE *bp, DSA *x, int off); + int DSAparams_print(BIO *bp, const DSA *x); + int DSAparams_print_fp(FILE *fp, const DSA *x); + int DSA_print(BIO *bp, const DSA *x, int off); + int DSA_print_fp(FILE *bp, const DSA *x, int off); =head1 DESCRIPTION @@ -85,6 +85,14 @@ The B<DSA> structure consists of several BIGNUM components. In public keys, B<priv_key> is NULL. +Note that DSA keys may use non-standard B<DSA_METHOD> implementations, +either directly or by the use of B<ENGINE> modules. In some cases (eg. an +ENGINE providing support for hardware-embedded keys), these BIGNUM values +will not be used by the implementation or may be used for alternative data +storage. For this reason, applications should generally avoid using DSA +structure elements directly and instead use API functions to query or +modify keys. + =head1 CONFORMING TO US Federal Information Processing Standard FIPS 186 (Digital Signature @@ -93,7 +101,8 @@ Standard, DSS), ANSI X9.30 =head1 SEE ALSO L<bn(3)|bn(3)>, L<dh(3)|dh(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>, -L<rsa(3)|rsa(3)>, L<sha(3)|sha(3)>, L<DSA_new(3)|DSA_new(3)>, +L<rsa(3)|rsa(3)>, L<sha(3)|sha(3)>, L<engine(3)|engine(3)>, +L<DSA_new(3)|DSA_new(3)>, L<DSA_size(3)|DSA_size(3)>, L<DSA_generate_parameters(3)|DSA_generate_parameters(3)>, L<DSA_dup_DH(3)|DSA_dup_DH(3)>, diff --git a/doc/crypto/evp.pod b/doc/crypto/evp.pod index edf47dbde6..b3ca14314f 100644 --- a/doc/crypto/evp.pod +++ b/doc/crypto/evp.pod @@ -24,6 +24,13 @@ functions. The B<EVP_Digest>I<...> functions provide message digests. Algorithms are loaded with OpenSSL_add_all_algorithms(3). +All the symmetric algorithms (ciphers) and digests can be replaced by ENGINE +modules providing alternative implementations. If ENGINE implementations of +ciphers or digests are registered as defaults, then the various EVP functions +will automatically use those implementations automatically in preference to +built in software implementations. For more information, consult the engine(3) +man page. + =head1 SEE ALSO L<EVP_DigestInit(3)|EVP_DigestInit(3)>, @@ -32,6 +39,7 @@ L<EVP_OpenInit(3)|EVP_OpenInit(3)>, L<EVP_SealInit(3)|EVP_SealInit(3)>, L<EVP_SignInit(3)|EVP_SignInit(3)>, L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>, -L<OpenSSL_add_all_algorithms(3)|OpenSSL_add_all_algorithms(3)> +L<OpenSSL_add_all_algorithms(3)|OpenSSL_add_all_algorithms(3)>, +L<engine(3)|engine(3)> =cut diff --git a/doc/crypto/rand.pod b/doc/crypto/rand.pod index 96901f109e..1c068c85b3 100644 --- a/doc/crypto/rand.pod +++ b/doc/crypto/rand.pod @@ -8,13 +8,14 @@ rand - pseudo-random number generator #include <openssl/rand.h> + int RAND_set_rand_engine(ENGINE *engine); + int RAND_bytes(unsigned char *buf, int num); int RAND_pseudo_bytes(unsigned char *buf, int num); void RAND_seed(const void *buf, int num); void RAND_add(const void *buf, int num, int entropy); int RAND_status(void); - void RAND_screen(void); int RAND_load_file(const char *file, long max_bytes); int RAND_write_file(const char *file); @@ -22,14 +23,31 @@ rand - pseudo-random number generator int RAND_egd(const char *path); - void RAND_set_rand_method(RAND_METHOD *meth); - RAND_METHOD *RAND_get_rand_method(void); + void RAND_set_rand_method(const RAND_METHOD *meth); + const RAND_METHOD *RAND_get_rand_method(void); RAND_METHOD *RAND_SSLeay(void); void RAND_cleanup(void); + /* For Win32 only */ + void RAND_screen(void); + int RAND_event(UINT, WPARAM, LPARAM); + =head1 DESCRIPTION +Since the introduction of the ENGINE API, the recommended way of controlling +default implementations is by using the ENGINE API functions. The default +B<RAND_METHOD>, as set by RAND_set_rand_method() and returned by +RAND_get_rand_method(), is only used if no ENGINE has been set as the default +"rand" implementation. Hence, these two functions are no longer the recommened +way to control defaults. + +If an alternative B<RAND_METHOD> implementation is being used (either set +directly or as provided by an ENGINE module), then it is entirely responsible +for the generation and management of a cryptographically secure PRNG stream. The +mechanisms described below relate solely to the software PRNG implementation +built in to OpenSSL and used by default. + These functions implement a cryptographically secure pseudo-random number generator (PRNG). It is used by other library functions for example to generate random keys, and applications can use it when they diff --git a/doc/crypto/rsa.pod b/doc/crypto/rsa.pod index 2b93a12b65..45ac53ffc1 100644 --- a/doc/crypto/rsa.pod +++ b/doc/crypto/rsa.pod @@ -16,13 +16,17 @@ rsa - RSA public key cryptosystem unsigned char *to, RSA *rsa, int padding); int RSA_private_decrypt(int flen, unsigned char *from, unsigned char *to, RSA *rsa, int padding); + int RSA_private_encrypt(int flen, unsigned char *from, + unsigned char *to, RSA *rsa,int padding); + int RSA_public_decrypt(int flen, unsigned char *from, + unsigned char *to, RSA *rsa,int padding); int RSA_sign(int type, unsigned char *m, unsigned int m_len, unsigned char *sigret, unsigned int *siglen, RSA *rsa); int RSA_verify(int type, unsigned char *m, unsigned int m_len, unsigned char *sigbuf, unsigned int siglen, RSA *rsa); - int RSA_size(RSA *rsa); + int RSA_size(const RSA *rsa); RSA *RSA_generate_key(int num, unsigned long e, void (*callback)(int,int,void *), void *cb_arg); @@ -32,13 +36,13 @@ rsa - RSA public key cryptosystem int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); void RSA_blinding_off(RSA *rsa); - void RSA_set_default_openssl_method(RSA_METHOD *meth); - RSA_METHOD *RSA_get_default_openssl_method(void); - int RSA_set_method(RSA *rsa, ENGINE *engine); - RSA_METHOD *RSA_get_method(RSA *rsa); + void RSA_set_default_method(const RSA_METHOD *meth); + const RSA_METHOD *RSA_get_default_method(void); + int RSA_set_method(RSA *rsa, const RSA_METHOD *meth); + const RSA_METHOD *RSA_get_method(const RSA *rsa); RSA_METHOD *RSA_PKCS1_SSLeay(void); RSA_METHOD *RSA_null_method(void); - int RSA_flags(RSA *rsa); + int RSA_flags(const RSA *rsa); RSA *RSA_new_method(ENGINE *engine); int RSA_print(BIO *bp, RSA *x, int offset); @@ -49,11 +53,6 @@ rsa - RSA public key cryptosystem int RSA_set_ex_data(RSA *r,int idx,char *arg); char *RSA_get_ex_data(RSA *r, int idx); - int RSA_private_encrypt(int flen, unsigned char *from, - unsigned char *to, RSA *rsa,int padding); - int RSA_public_decrypt(int flen, unsigned char *from, - unsigned char *to, RSA *rsa,int padding); - int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m, unsigned int m_len, unsigned char *sigret, unsigned int *siglen, RSA *rsa); @@ -90,6 +89,14 @@ B<p>, B<q>, B<dmp1>, B<dmq1> and B<iqmp> may be B<NULL> in private keys, but the RSA operations are much faster when these values are available. +Note that RSA keys may use non-standard B<RSA_METHOD> implementations, +either directly or by the use of B<ENGINE> modules. In some cases (eg. an +ENGINE providing support for hardware-embedded keys), these BIGNUM values +will not be used by the implementation or may be used for alternative data +storage. For this reason, applications should generally avoid using RSA +structure elements directly and instead use API functions to query or +modify keys. + =head1 CONFORMING TO SSL, PKCS #1 v2.0 @@ -101,7 +108,7 @@ RSA was covered by a US patent which expired in September 2000. =head1 SEE ALSO L<rsa(1)|rsa(1)>, L<bn(3)|bn(3)>, L<dsa(3)|dsa(3)>, L<dh(3)|dh(3)>, -L<rand(3)|rand(3)>, L<RSA_new(3)|RSA_new(3)>, +L<rand(3)|rand(3)>, L<engine(3)|engine(3)>, L<RSA_new(3)|RSA_new(3)>, L<RSA_public_encrypt(3)|RSA_public_encrypt(3)>, L<RSA_sign(3)|RSA_sign(3)>, L<RSA_size(3)|RSA_size(3)>, L<RSA_generate_key(3)|RSA_generate_key(3)>, diff --git a/doc/ssl/SSL_get_error.pod b/doc/ssl/SSL_get_error.pod index f700bf0ace..fe28dd942a 100644 --- a/doc/ssl/SSL_get_error.pod +++ b/doc/ssl/SSL_get_error.pod @@ -13,7 +13,7 @@ SSL_get_error - obtain result code for TLS/SSL I/O operation =head1 DESCRIPTION SSL_get_error() returns a result code (suitable for the C "switch" -statement) for a preceding call to SSL_connect(), SSL_accept(), +statement) for a preceding call to SSL_connect(), SSL_accept(), SSL_do_handshake(), SSL_read(), SSL_peek(), or SSL_write() on B<ssl>. The value returned by that TLS/SSL I/O function must be passed to SSL_get_error() in parameter B<ret>. diff --git a/makevms.com b/makevms.com index 18b99c2793..ff6d1aca65 100755 --- a/makevms.com +++ b/makevms.com @@ -473,7 +473,7 @@ $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree. $! $ SDIRS := ,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,- DES,RC2,RC4,RC5,IDEA,BF,CAST,- - BN,EC,RSA,DSA,ECDSA,DH,DSO,ENGINE,AES,- + BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,AES,- BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,- EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5 $ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h,- @@ -498,6 +498,7 @@ $ EXHEADER_RSA := rsa.h $ EXHEADER_DSA := dsa.h $ EXHEADER_ECDSA := ecdsa.h $ EXHEADER_DH := dh.h +$ EXHEADER_ECDH := ecdh.h $ EXHEADER_DSO := dso.h $ EXHEADER_ENGINE := engine.h $ EXHEADER_AES := aes.h diff --git a/ssl/Makefile.ssl b/ssl/Makefile.ssl index c89232b769..7f8d026434 100644 --- a/ssl/Makefile.ssl +++ b/ssl/Makefile.ssl @@ -65,7 +65,7 @@ lib: $(LIBOBJ) shared: if [ -n "$(SHARED_LIBS)" ]; then \ - (cd ..; make $(SHARED_LIB)); \ + (cd ..; $(MAKE) $(SHARED_LIB)); \ fi files: @@ -105,13 +105,13 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. bio_ssl.o: ../include/openssl/aes.h ../include/openssl/asn1.h -bio_ssl.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -bio_ssl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -bio_ssl.o: ../include/openssl/buffer.h ../include/openssl/cast.h -bio_ssl.o: ../include/openssl/comp.h ../include/openssl/crypto.h -bio_ssl.o: ../include/openssl/des.h ../include/openssl/des_old.h -bio_ssl.o: ../include/openssl/dh.h ../include/openssl/dsa.h -bio_ssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +bio_ssl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +bio_ssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h +bio_ssl.o: ../include/openssl/cast.h ../include/openssl/comp.h +bio_ssl.o: ../include/openssl/crypto.h ../include/openssl/des.h +bio_ssl.o: ../include/openssl/des_old.h ../include/openssl/dh.h +bio_ssl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +bio_ssl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h bio_ssl.o: ../include/openssl/ecdsa.h ../include/openssl/err.h bio_ssl.o: ../include/openssl/evp.h ../include/openssl/idea.h bio_ssl.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -131,13 +131,13 @@ bio_ssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h bio_ssl.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h bio_ssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h bio_ssl.c kssl.o: ../include/openssl/aes.h ../include/openssl/asn1.h -kssl.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -kssl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -kssl.o: ../include/openssl/buffer.h ../include/openssl/cast.h -kssl.o: ../include/openssl/comp.h ../include/openssl/crypto.h -kssl.o: ../include/openssl/des.h ../include/openssl/des_old.h -kssl.o: ../include/openssl/dh.h ../include/openssl/dsa.h -kssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +kssl.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +kssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h +kssl.o: ../include/openssl/cast.h ../include/openssl/comp.h +kssl.o: ../include/openssl/crypto.h ../include/openssl/des.h +kssl.o: ../include/openssl/des_old.h ../include/openssl/dh.h +kssl.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +kssl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h kssl.o: ../include/openssl/ecdsa.h ../include/openssl/evp.h kssl.o: ../include/openssl/idea.h ../include/openssl/krb5_asn.h kssl.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -157,13 +157,13 @@ kssl.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h kssl.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h kssl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl.c s23_clnt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s23_clnt.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s23_clnt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s23_clnt.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s23_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s23_clnt.o: ../include/openssl/des.h ../include/openssl/des_old.h -s23_clnt.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s23_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s23_clnt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s23_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s23_clnt.o: ../include/openssl/cast.h ../include/openssl/comp.h +s23_clnt.o: ../include/openssl/crypto.h ../include/openssl/des.h +s23_clnt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s23_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s23_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s23_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s23_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h s23_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -184,13 +184,13 @@ s23_clnt.o: ../include/openssl/tls1.h ../include/openssl/ui.h s23_clnt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h s23_clnt.o: ../include/openssl/x509_vfy.h s23_clnt.c ssl_locl.h s23_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s23_lib.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s23_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s23_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s23_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s23_lib.o: ../include/openssl/des.h ../include/openssl/des_old.h -s23_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s23_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s23_lib.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s23_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s23_lib.o: ../include/openssl/cast.h ../include/openssl/comp.h +s23_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h +s23_lib.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s23_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s23_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s23_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s23_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h s23_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -211,13 +211,13 @@ s23_lib.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s23_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_lib.c s23_lib.o: ssl_locl.h s23_meth.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s23_meth.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s23_meth.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s23_meth.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s23_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s23_meth.o: ../include/openssl/des.h ../include/openssl/des_old.h -s23_meth.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s23_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s23_meth.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s23_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s23_meth.o: ../include/openssl/cast.h ../include/openssl/comp.h +s23_meth.o: ../include/openssl/crypto.h ../include/openssl/des.h +s23_meth.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s23_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s23_meth.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s23_meth.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s23_meth.o: ../include/openssl/evp.h ../include/openssl/idea.h s23_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -238,13 +238,13 @@ s23_meth.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s23_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_meth.c s23_meth.o: ssl_locl.h s23_pkt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s23_pkt.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s23_pkt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s23_pkt.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s23_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s23_pkt.o: ../include/openssl/des.h ../include/openssl/des_old.h -s23_pkt.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s23_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s23_pkt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s23_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s23_pkt.o: ../include/openssl/cast.h ../include/openssl/comp.h +s23_pkt.o: ../include/openssl/crypto.h ../include/openssl/des.h +s23_pkt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s23_pkt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s23_pkt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s23_pkt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s23_pkt.o: ../include/openssl/evp.h ../include/openssl/idea.h s23_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -265,13 +265,13 @@ s23_pkt.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s23_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s23_pkt.c s23_pkt.o: ssl_locl.h s23_srvr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s23_srvr.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s23_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s23_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s23_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s23_srvr.o: ../include/openssl/des.h ../include/openssl/des_old.h -s23_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s23_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s23_srvr.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s23_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s23_srvr.o: ../include/openssl/cast.h ../include/openssl/comp.h +s23_srvr.o: ../include/openssl/crypto.h ../include/openssl/des.h +s23_srvr.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s23_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s23_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s23_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s23_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h s23_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -291,41 +291,42 @@ s23_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h s23_srvr.o: ../include/openssl/tls1.h ../include/openssl/ui.h s23_srvr.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h s23_srvr.o: ../include/openssl/x509_vfy.h s23_srvr.c ssl_locl.h -s2_clnt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s2_clnt.o: ../include/openssl/asn1t.h ../include/openssl/bio.h +s2_clnt.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h +s2_clnt.o: ../include/openssl/asn1.h ../include/openssl/bio.h s2_clnt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h s2_clnt.o: ../include/openssl/buffer.h ../include/openssl/cast.h s2_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h s2_clnt.o: ../include/openssl/des.h ../include/openssl/des_old.h s2_clnt.o: ../include/openssl/dh.h ../include/openssl/dsa.h s2_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -s2_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h -s2_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h -s2_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h -s2_clnt.o: ../include/openssl/md2.h ../include/openssl/md4.h -s2_clnt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h -s2_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -s2_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -s2_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -s2_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -s2_clnt.o: ../include/openssl/rand.h ../include/openssl/rc2.h -s2_clnt.o: ../include/openssl/rc4.h ../include/openssl/rc5.h -s2_clnt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h -s2_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h -s2_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -s2_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -s2_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -s2_clnt.o: ../include/openssl/tls1.h ../include/openssl/ui.h -s2_clnt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h -s2_clnt.o: ../include/openssl/x509_vfy.h s2_clnt.c ssl_locl.h +s2_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h +s2_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h +s2_clnt.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s2_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s2_clnt.o: ../include/openssl/md4.h ../include/openssl/md5.h +s2_clnt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s2_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s2_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s2_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s2_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s2_clnt.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s2_clnt.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s2_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s2_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s2_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s2_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s2_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s2_clnt.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +s2_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_clnt.c +s2_clnt.o: ssl_locl.h s2_enc.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s2_enc.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s2_enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s2_enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s2_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s2_enc.o: ../include/openssl/des.h ../include/openssl/des_old.h -s2_enc.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s2_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s2_enc.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s2_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s2_enc.o: ../include/openssl/cast.h ../include/openssl/comp.h +s2_enc.o: ../include/openssl/crypto.h ../include/openssl/des.h +s2_enc.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s2_enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s2_enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s2_enc.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s2_enc.o: ../include/openssl/evp.h ../include/openssl/idea.h s2_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -345,41 +346,41 @@ s2_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h s2_enc.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s2_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_enc.c s2_enc.o: ssl_locl.h -s2_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s2_lib.o: ../include/openssl/asn1t.h ../include/openssl/bio.h +s2_lib.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h +s2_lib.o: ../include/openssl/asn1.h ../include/openssl/bio.h s2_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h s2_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h s2_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h s2_lib.o: ../include/openssl/des.h ../include/openssl/des_old.h s2_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h s2_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -s2_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h -s2_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h -s2_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h -s2_lib.o: ../include/openssl/md2.h ../include/openssl/md4.h -s2_lib.o: ../include/openssl/md5.h ../include/openssl/mdc2.h -s2_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -s2_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -s2_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -s2_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -s2_lib.o: ../include/openssl/rc2.h ../include/openssl/rc4.h -s2_lib.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h -s2_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h -s2_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h -s2_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h -s2_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h -s2_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h -s2_lib.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h -s2_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_lib.c -s2_lib.o: ssl_locl.h +s2_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h +s2_lib.o: ../include/openssl/err.h ../include/openssl/evp.h +s2_lib.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s2_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s2_lib.o: ../include/openssl/md4.h ../include/openssl/md5.h +s2_lib.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s2_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s2_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s2_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s2_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h +s2_lib.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s2_lib.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s2_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s2_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s2_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s2_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s2_lib.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s2_lib.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s2_lib.o: ../include/openssl/x509_vfy.h s2_lib.c ssl_locl.h s2_meth.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s2_meth.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s2_meth.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s2_meth.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s2_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s2_meth.o: ../include/openssl/des.h ../include/openssl/des_old.h -s2_meth.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s2_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s2_meth.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s2_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s2_meth.o: ../include/openssl/cast.h ../include/openssl/comp.h +s2_meth.o: ../include/openssl/crypto.h ../include/openssl/des.h +s2_meth.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s2_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s2_meth.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s2_meth.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s2_meth.o: ../include/openssl/evp.h ../include/openssl/idea.h s2_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -400,13 +401,13 @@ s2_meth.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s2_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_meth.c s2_meth.o: ssl_locl.h s2_pkt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s2_pkt.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s2_pkt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s2_pkt.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s2_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s2_pkt.o: ../include/openssl/des.h ../include/openssl/des_old.h -s2_pkt.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s2_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s2_pkt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s2_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s2_pkt.o: ../include/openssl/cast.h ../include/openssl/comp.h +s2_pkt.o: ../include/openssl/crypto.h ../include/openssl/des.h +s2_pkt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s2_pkt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s2_pkt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s2_pkt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s2_pkt.o: ../include/openssl/evp.h ../include/openssl/idea.h s2_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -426,41 +427,42 @@ s2_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h s2_pkt.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s2_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_pkt.c s2_pkt.o: ssl_locl.h -s2_srvr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s2_srvr.o: ../include/openssl/asn1t.h ../include/openssl/bio.h +s2_srvr.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h +s2_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h s2_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h s2_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h s2_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h s2_srvr.o: ../include/openssl/des.h ../include/openssl/des_old.h s2_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h s2_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -s2_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h -s2_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h -s2_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h -s2_srvr.o: ../include/openssl/md2.h ../include/openssl/md4.h -s2_srvr.o: ../include/openssl/md5.h ../include/openssl/mdc2.h -s2_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -s2_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -s2_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -s2_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -s2_srvr.o: ../include/openssl/rand.h ../include/openssl/rc2.h -s2_srvr.o: ../include/openssl/rc4.h ../include/openssl/rc5.h -s2_srvr.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h -s2_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h -s2_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -s2_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -s2_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -s2_srvr.o: ../include/openssl/tls1.h ../include/openssl/ui.h -s2_srvr.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h -s2_srvr.o: ../include/openssl/x509_vfy.h s2_srvr.c ssl_locl.h +s2_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h +s2_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h +s2_srvr.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s2_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s2_srvr.o: ../include/openssl/md4.h ../include/openssl/md5.h +s2_srvr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s2_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s2_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s2_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s2_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s2_srvr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s2_srvr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s2_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s2_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s2_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s2_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s2_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s2_srvr.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +s2_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_srvr.c +s2_srvr.o: ssl_locl.h s3_both.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s3_both.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s3_both.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s3_both.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s3_both.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s3_both.o: ../include/openssl/des.h ../include/openssl/des_old.h -s3_both.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s3_both.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s3_both.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s3_both.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s3_both.o: ../include/openssl/cast.h ../include/openssl/comp.h +s3_both.o: ../include/openssl/crypto.h ../include/openssl/des.h +s3_both.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s3_both.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s3_both.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s3_both.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s3_both.o: ../include/openssl/evp.h ../include/openssl/idea.h s3_both.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -480,41 +482,42 @@ s3_both.o: ../include/openssl/stack.h ../include/openssl/symhacks.h s3_both.o: ../include/openssl/tls1.h ../include/openssl/ui.h s3_both.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h s3_both.o: ../include/openssl/x509_vfy.h s3_both.c ssl_locl.h -s3_clnt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s3_clnt.o: ../include/openssl/asn1t.h ../include/openssl/bio.h +s3_clnt.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h +s3_clnt.o: ../include/openssl/asn1.h ../include/openssl/bio.h s3_clnt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h s3_clnt.o: ../include/openssl/buffer.h ../include/openssl/cast.h s3_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h s3_clnt.o: ../include/openssl/des.h ../include/openssl/des_old.h s3_clnt.o: ../include/openssl/dh.h ../include/openssl/dsa.h s3_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -s3_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h -s3_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h -s3_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h -s3_clnt.o: ../include/openssl/md2.h ../include/openssl/md4.h -s3_clnt.o: ../include/openssl/md5.h ../include/openssl/mdc2.h -s3_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -s3_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -s3_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -s3_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -s3_clnt.o: ../include/openssl/rand.h ../include/openssl/rc2.h -s3_clnt.o: ../include/openssl/rc4.h ../include/openssl/rc5.h -s3_clnt.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h -s3_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h -s3_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -s3_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -s3_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -s3_clnt.o: ../include/openssl/tls1.h ../include/openssl/ui.h -s3_clnt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h -s3_clnt.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_clnt.c ssl_locl.h +s3_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h +s3_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h +s3_clnt.o: ../include/openssl/idea.h ../include/openssl/kssl.h +s3_clnt.o: ../include/openssl/lhash.h ../include/openssl/md2.h +s3_clnt.o: ../include/openssl/md4.h ../include/openssl/md5.h +s3_clnt.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +s3_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +s3_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +s3_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h +s3_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +s3_clnt.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +s3_clnt.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +s3_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +s3_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h +s3_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +s3_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +s3_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +s3_clnt.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +s3_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl_lcl.h +s3_clnt.o: s3_clnt.c ssl_locl.h s3_enc.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s3_enc.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s3_enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s3_enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s3_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s3_enc.o: ../include/openssl/des.h ../include/openssl/des_old.h -s3_enc.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s3_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s3_enc.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s3_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s3_enc.o: ../include/openssl/cast.h ../include/openssl/comp.h +s3_enc.o: ../include/openssl/crypto.h ../include/openssl/des.h +s3_enc.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s3_enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s3_enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s3_enc.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s3_enc.o: ../include/openssl/evp.h ../include/openssl/idea.h s3_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -535,13 +538,13 @@ s3_enc.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s3_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s3_enc.c s3_enc.o: ssl_locl.h s3_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s3_lib.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s3_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s3_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s3_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s3_lib.o: ../include/openssl/des.h ../include/openssl/des_old.h -s3_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s3_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s3_lib.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s3_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s3_lib.o: ../include/openssl/cast.h ../include/openssl/comp.h +s3_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h +s3_lib.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s3_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s3_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s3_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s3_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h s3_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -562,13 +565,13 @@ s3_lib.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s3_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl_lcl.h s3_lib.o: s3_lib.c ssl_locl.h s3_meth.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s3_meth.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s3_meth.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s3_meth.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s3_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s3_meth.o: ../include/openssl/des.h ../include/openssl/des_old.h -s3_meth.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s3_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s3_meth.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s3_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s3_meth.o: ../include/openssl/cast.h ../include/openssl/comp.h +s3_meth.o: ../include/openssl/crypto.h ../include/openssl/des.h +s3_meth.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s3_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s3_meth.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s3_meth.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s3_meth.o: ../include/openssl/evp.h ../include/openssl/idea.h s3_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -589,13 +592,13 @@ s3_meth.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s3_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s3_meth.c s3_meth.o: ssl_locl.h s3_pkt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s3_pkt.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -s3_pkt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -s3_pkt.o: ../include/openssl/buffer.h ../include/openssl/cast.h -s3_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h -s3_pkt.o: ../include/openssl/des.h ../include/openssl/des_old.h -s3_pkt.o: ../include/openssl/dh.h ../include/openssl/dsa.h -s3_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +s3_pkt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +s3_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +s3_pkt.o: ../include/openssl/cast.h ../include/openssl/comp.h +s3_pkt.o: ../include/openssl/crypto.h ../include/openssl/des.h +s3_pkt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +s3_pkt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +s3_pkt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h s3_pkt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h s3_pkt.o: ../include/openssl/evp.h ../include/openssl/idea.h s3_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -615,42 +618,42 @@ s3_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h s3_pkt.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h s3_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s3_pkt.c s3_pkt.o: ssl_locl.h -s3_srvr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -s3_srvr.o: ../include/openssl/asn1t.h ../include/openssl/bio.h +s3_srvr.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h +s3_srvr.o: ../include/openssl/asn1.h ../include/openssl/bio.h s3_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h s3_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h s3_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h s3_srvr.o: ../include/openssl/des.h ../include/openssl/des_old.h s3_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h s3_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -s3_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h -s3_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h -s3_srvr.o: ../include/openssl/krb5_asn.h ../include/openssl/kssl.h -s3_srvr.o: ../include/openssl/lhash.h ../include/openssl/md2.h -s3_srvr.o: ../include/openssl/md4.h ../include/openssl/md5.h -s3_srvr.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h -s3_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h -s3_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -s3_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h -s3_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h -s3_srvr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h -s3_srvr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h -s3_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h -s3_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h -s3_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h -s3_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h -s3_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h -s3_srvr.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h -s3_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl_lcl.h -s3_srvr.o: s3_srvr.c ssl_locl.h +s3_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h +s3_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h +s3_srvr.o: ../include/openssl/idea.h ../include/openssl/krb5_asn.h +s3_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +s3_srvr.o: ../include/openssl/md2.h ../include/openssl/md4.h +s3_srvr.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +s3_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +s3_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +s3_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +s3_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +s3_srvr.o: ../include/openssl/rand.h ../include/openssl/rc2.h +s3_srvr.o: ../include/openssl/rc4.h ../include/openssl/rc5.h +s3_srvr.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h +s3_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h +s3_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h +s3_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h +s3_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +s3_srvr.o: ../include/openssl/tls1.h ../include/openssl/ui.h +s3_srvr.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h +s3_srvr.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_srvr.c ssl_locl.h ssl_algs.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ssl_algs.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ssl_algs.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ssl_algs.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ssl_algs.o: ../include/openssl/comp.h ../include/openssl/crypto.h -ssl_algs.o: ../include/openssl/des.h ../include/openssl/des_old.h -ssl_algs.o: ../include/openssl/dh.h ../include/openssl/dsa.h -ssl_algs.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ssl_algs.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_algs.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_algs.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_algs.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_algs.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_algs.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_algs.o: ../include/openssl/ec.h ../include/openssl/ecdh.h ssl_algs.o: ../include/openssl/ecdsa.h ../include/openssl/err.h ssl_algs.o: ../include/openssl/evp.h ../include/openssl/idea.h ssl_algs.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -670,42 +673,43 @@ ssl_algs.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h ssl_algs.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h ssl_algs.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_algs.c ssl_algs.o: ssl_locl.h -ssl_asn1.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ssl_asn1.o: ../include/openssl/asn1_mac.h ../include/openssl/asn1t.h +ssl_asn1.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h +ssl_asn1.o: ../include/openssl/asn1.h ../include/openssl/asn1_mac.h ssl_asn1.o: ../include/openssl/bio.h ../include/openssl/blowfish.h ssl_asn1.o: ../include/openssl/bn.h ../include/openssl/buffer.h ssl_asn1.o: ../include/openssl/cast.h ../include/openssl/comp.h ssl_asn1.o: ../include/openssl/crypto.h ../include/openssl/des.h ssl_asn1.o: ../include/openssl/des_old.h ../include/openssl/dh.h ssl_asn1.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -ssl_asn1.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h -ssl_asn1.o: ../include/openssl/err.h ../include/openssl/evp.h -ssl_asn1.o: ../include/openssl/idea.h ../include/openssl/kssl.h -ssl_asn1.o: ../include/openssl/lhash.h ../include/openssl/md2.h -ssl_asn1.o: ../include/openssl/md4.h ../include/openssl/md5.h -ssl_asn1.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h -ssl_asn1.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h -ssl_asn1.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -ssl_asn1.o: ../include/openssl/pem.h ../include/openssl/pem2.h -ssl_asn1.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h -ssl_asn1.o: ../include/openssl/rc4.h ../include/openssl/rc5.h -ssl_asn1.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h -ssl_asn1.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ssl_asn1.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -ssl_asn1.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -ssl_asn1.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ssl_asn1.o: ../include/openssl/tls1.h ../include/openssl/ui.h -ssl_asn1.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h -ssl_asn1.o: ../include/openssl/x509_vfy.h ssl_asn1.c ssl_locl.h +ssl_asn1.o: ../include/openssl/ec.h ../include/openssl/ecdh.h +ssl_asn1.o: ../include/openssl/ecdsa.h ../include/openssl/err.h +ssl_asn1.o: ../include/openssl/evp.h ../include/openssl/idea.h +ssl_asn1.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ssl_asn1.o: ../include/openssl/md2.h ../include/openssl/md4.h +ssl_asn1.o: ../include/openssl/md5.h ../include/openssl/mdc2.h +ssl_asn1.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ssl_asn1.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ssl_asn1.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ssl_asn1.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ssl_asn1.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +ssl_asn1.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +ssl_asn1.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +ssl_asn1.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ssl_asn1.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ssl_asn1.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ssl_asn1.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ssl_asn1.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +ssl_asn1.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_asn1.c +ssl_asn1.o: ssl_locl.h ssl_cert.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ssl_cert.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ssl_cert.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ssl_cert.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ssl_cert.o: ../include/openssl/comp.h ../include/openssl/conf.h -ssl_cert.o: ../include/openssl/crypto.h ../include/openssl/des.h -ssl_cert.o: ../include/openssl/des_old.h ../include/openssl/dh.h -ssl_cert.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -ssl_cert.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +ssl_cert.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_cert.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_cert.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_cert.o: ../include/openssl/conf.h ../include/openssl/crypto.h +ssl_cert.o: ../include/openssl/des.h ../include/openssl/des_old.h +ssl_cert.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ssl_cert.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ssl_cert.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h ssl_cert.o: ../include/openssl/err.h ../include/openssl/evp.h ssl_cert.o: ../include/openssl/idea.h ../include/openssl/kssl.h ssl_cert.o: ../include/openssl/lhash.h ../include/openssl/md2.h @@ -726,13 +730,13 @@ ssl_cert.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h ssl_cert.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h ssl_cert.o: ssl_cert.c ssl_locl.h ssl_ciph.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ssl_ciph.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ssl_ciph.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ssl_ciph.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ssl_ciph.o: ../include/openssl/comp.h ../include/openssl/crypto.h -ssl_ciph.o: ../include/openssl/des.h ../include/openssl/des_old.h -ssl_ciph.o: ../include/openssl/dh.h ../include/openssl/dsa.h -ssl_ciph.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ssl_ciph.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_ciph.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_ciph.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_ciph.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_ciph.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_ciph.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_ciph.o: ../include/openssl/ec.h ../include/openssl/ecdh.h ssl_ciph.o: ../include/openssl/ecdsa.h ../include/openssl/err.h ssl_ciph.o: ../include/openssl/evp.h ../include/openssl/idea.h ssl_ciph.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -753,13 +757,13 @@ ssl_ciph.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h ssl_ciph.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_ciph.c ssl_ciph.o: ssl_locl.h ssl_err.o: ../include/openssl/aes.h ../include/openssl/asn1.h -ssl_err.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ssl_err.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ssl_err.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ssl_err.o: ../include/openssl/comp.h ../include/openssl/crypto.h -ssl_err.o: ../include/openssl/des.h ../include/openssl/des_old.h -ssl_err.o: ../include/openssl/dh.h ../include/openssl/dsa.h -ssl_err.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ssl_err.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_err.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_err.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_err.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_err.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_err.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_err.o: ../include/openssl/ec.h ../include/openssl/ecdh.h ssl_err.o: ../include/openssl/ecdsa.h ../include/openssl/err.h ssl_err.o: ../include/openssl/evp.h ../include/openssl/idea.h ssl_err.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -779,13 +783,13 @@ ssl_err.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h ssl_err.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h ssl_err.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_err.c ssl_err2.o: ../include/openssl/aes.h ../include/openssl/asn1.h -ssl_err2.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ssl_err2.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ssl_err2.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ssl_err2.o: ../include/openssl/comp.h ../include/openssl/crypto.h -ssl_err2.o: ../include/openssl/des.h ../include/openssl/des_old.h -ssl_err2.o: ../include/openssl/dh.h ../include/openssl/dsa.h -ssl_err2.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ssl_err2.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_err2.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_err2.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_err2.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_err2.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_err2.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_err2.o: ../include/openssl/ec.h ../include/openssl/ecdh.h ssl_err2.o: ../include/openssl/ecdsa.h ../include/openssl/err.h ssl_err2.o: ../include/openssl/evp.h ../include/openssl/idea.h ssl_err2.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -805,14 +809,14 @@ ssl_err2.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h ssl_err2.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h ssl_err2.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_err2.c ssl_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ssl_lib.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ssl_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ssl_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ssl_lib.o: ../include/openssl/comp.h ../include/openssl/conf.h -ssl_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h -ssl_lib.o: ../include/openssl/des_old.h ../include/openssl/dh.h -ssl_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -ssl_lib.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +ssl_lib.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_lib.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_lib.o: ../include/openssl/conf.h ../include/openssl/crypto.h +ssl_lib.o: ../include/openssl/des.h ../include/openssl/des_old.h +ssl_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ssl_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ssl_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h ssl_lib.o: ../include/openssl/err.h ../include/openssl/evp.h ssl_lib.o: ../include/openssl/idea.h ../include/openssl/kssl.h ssl_lib.o: ../include/openssl/lhash.h ../include/openssl/md2.h @@ -833,13 +837,13 @@ ssl_lib.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h ssl_lib.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h kssl_lcl.h ssl_lib.o: ssl_lib.c ssl_locl.h ssl_rsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ssl_rsa.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ssl_rsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ssl_rsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ssl_rsa.o: ../include/openssl/comp.h ../include/openssl/crypto.h -ssl_rsa.o: ../include/openssl/des.h ../include/openssl/des_old.h -ssl_rsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h -ssl_rsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ssl_rsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_rsa.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_rsa.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_rsa.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_rsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h ssl_rsa.o: ../include/openssl/ecdsa.h ../include/openssl/err.h ssl_rsa.o: ../include/openssl/evp.h ../include/openssl/idea.h ssl_rsa.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -859,41 +863,42 @@ ssl_rsa.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h ssl_rsa.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h ssl_rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h ssl_rsa.o: ssl_rsa.c -ssl_sess.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ssl_sess.o: ../include/openssl/asn1t.h ../include/openssl/bio.h +ssl_sess.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h +ssl_sess.o: ../include/openssl/asn1.h ../include/openssl/bio.h ssl_sess.o: ../include/openssl/blowfish.h ../include/openssl/bn.h ssl_sess.o: ../include/openssl/buffer.h ../include/openssl/cast.h ssl_sess.o: ../include/openssl/comp.h ../include/openssl/crypto.h ssl_sess.o: ../include/openssl/des.h ../include/openssl/des_old.h ssl_sess.o: ../include/openssl/dh.h ../include/openssl/dsa.h ssl_sess.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ssl_sess.o: ../include/openssl/ecdsa.h ../include/openssl/err.h -ssl_sess.o: ../include/openssl/evp.h ../include/openssl/idea.h -ssl_sess.o: ../include/openssl/kssl.h ../include/openssl/lhash.h -ssl_sess.o: ../include/openssl/md2.h ../include/openssl/md4.h -ssl_sess.o: ../include/openssl/md5.h ../include/openssl/mdc2.h -ssl_sess.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -ssl_sess.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ssl_sess.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ssl_sess.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ssl_sess.o: ../include/openssl/rand.h ../include/openssl/rc2.h -ssl_sess.o: ../include/openssl/rc4.h ../include/openssl/rc5.h -ssl_sess.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h -ssl_sess.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ssl_sess.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -ssl_sess.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -ssl_sess.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ssl_sess.o: ../include/openssl/tls1.h ../include/openssl/ui.h -ssl_sess.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h -ssl_sess.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_sess.c +ssl_sess.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h +ssl_sess.o: ../include/openssl/err.h ../include/openssl/evp.h +ssl_sess.o: ../include/openssl/idea.h ../include/openssl/kssl.h +ssl_sess.o: ../include/openssl/lhash.h ../include/openssl/md2.h +ssl_sess.o: ../include/openssl/md4.h ../include/openssl/md5.h +ssl_sess.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h +ssl_sess.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +ssl_sess.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ssl_sess.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ssl_sess.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +ssl_sess.o: ../include/openssl/rc2.h ../include/openssl/rc4.h +ssl_sess.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h +ssl_sess.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +ssl_sess.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ssl_sess.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ssl_sess.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ssl_sess.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ssl_sess.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h +ssl_sess.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h +ssl_sess.o: ssl_sess.c ssl_stat.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ssl_stat.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ssl_stat.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ssl_stat.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ssl_stat.o: ../include/openssl/comp.h ../include/openssl/crypto.h -ssl_stat.o: ../include/openssl/des.h ../include/openssl/des_old.h -ssl_stat.o: ../include/openssl/dh.h ../include/openssl/dsa.h -ssl_stat.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ssl_stat.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_stat.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_stat.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_stat.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_stat.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_stat.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_stat.o: ../include/openssl/ec.h ../include/openssl/ecdh.h ssl_stat.o: ../include/openssl/ecdsa.h ../include/openssl/err.h ssl_stat.o: ../include/openssl/evp.h ../include/openssl/idea.h ssl_stat.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -914,13 +919,13 @@ ssl_stat.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h ssl_stat.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h ssl_stat.o: ssl_stat.c ssl_txt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ssl_txt.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ssl_txt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ssl_txt.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ssl_txt.o: ../include/openssl/comp.h ../include/openssl/crypto.h -ssl_txt.o: ../include/openssl/des.h ../include/openssl/des_old.h -ssl_txt.o: ../include/openssl/dh.h ../include/openssl/dsa.h -ssl_txt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ssl_txt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssl_txt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssl_txt.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssl_txt.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssl_txt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssl_txt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssl_txt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h ssl_txt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h ssl_txt.o: ../include/openssl/evp.h ../include/openssl/idea.h ssl_txt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -941,13 +946,13 @@ ssl_txt.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h ssl_txt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h ssl_txt.o: ssl_txt.c t1_clnt.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -t1_clnt.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -t1_clnt.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -t1_clnt.o: ../include/openssl/buffer.h ../include/openssl/cast.h -t1_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h -t1_clnt.o: ../include/openssl/des.h ../include/openssl/des_old.h -t1_clnt.o: ../include/openssl/dh.h ../include/openssl/dsa.h -t1_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +t1_clnt.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +t1_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h +t1_clnt.o: ../include/openssl/cast.h ../include/openssl/comp.h +t1_clnt.o: ../include/openssl/crypto.h ../include/openssl/des.h +t1_clnt.o: ../include/openssl/des_old.h ../include/openssl/dh.h +t1_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +t1_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h t1_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h t1_clnt.o: ../include/openssl/evp.h ../include/openssl/idea.h t1_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -968,13 +973,13 @@ t1_clnt.o: ../include/openssl/tls1.h ../include/openssl/ui.h t1_clnt.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h t1_clnt.o: ../include/openssl/x509_vfy.h ssl_locl.h t1_clnt.c t1_enc.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -t1_enc.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -t1_enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -t1_enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h -t1_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h -t1_enc.o: ../include/openssl/des.h ../include/openssl/des_old.h -t1_enc.o: ../include/openssl/dh.h ../include/openssl/dsa.h -t1_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +t1_enc.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +t1_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h +t1_enc.o: ../include/openssl/cast.h ../include/openssl/comp.h +t1_enc.o: ../include/openssl/crypto.h ../include/openssl/des.h +t1_enc.o: ../include/openssl/des_old.h ../include/openssl/dh.h +t1_enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +t1_enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h t1_enc.o: ../include/openssl/ecdsa.h ../include/openssl/err.h t1_enc.o: ../include/openssl/evp.h ../include/openssl/hmac.h t1_enc.o: ../include/openssl/idea.h ../include/openssl/kssl.h @@ -995,13 +1000,13 @@ t1_enc.o: ../include/openssl/tls1.h ../include/openssl/ui.h t1_enc.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h t1_enc.o: ../include/openssl/x509_vfy.h ssl_locl.h t1_enc.c t1_lib.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -t1_lib.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -t1_lib.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -t1_lib.o: ../include/openssl/buffer.h ../include/openssl/cast.h -t1_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h -t1_lib.o: ../include/openssl/des.h ../include/openssl/des_old.h -t1_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h -t1_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +t1_lib.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +t1_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h +t1_lib.o: ../include/openssl/cast.h ../include/openssl/comp.h +t1_lib.o: ../include/openssl/crypto.h ../include/openssl/des.h +t1_lib.o: ../include/openssl/des_old.h ../include/openssl/dh.h +t1_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +t1_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h t1_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h t1_lib.o: ../include/openssl/evp.h ../include/openssl/idea.h t1_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -1022,13 +1027,13 @@ t1_lib.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h t1_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h t1_lib.o: t1_lib.c t1_meth.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -t1_meth.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -t1_meth.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -t1_meth.o: ../include/openssl/buffer.h ../include/openssl/cast.h -t1_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h -t1_meth.o: ../include/openssl/des.h ../include/openssl/des_old.h -t1_meth.o: ../include/openssl/dh.h ../include/openssl/dsa.h -t1_meth.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +t1_meth.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +t1_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h +t1_meth.o: ../include/openssl/cast.h ../include/openssl/comp.h +t1_meth.o: ../include/openssl/crypto.h ../include/openssl/des.h +t1_meth.o: ../include/openssl/des_old.h ../include/openssl/dh.h +t1_meth.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +t1_meth.o: ../include/openssl/ec.h ../include/openssl/ecdh.h t1_meth.o: ../include/openssl/ecdsa.h ../include/openssl/err.h t1_meth.o: ../include/openssl/evp.h ../include/openssl/idea.h t1_meth.o: ../include/openssl/kssl.h ../include/openssl/lhash.h @@ -1049,13 +1054,13 @@ t1_meth.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h t1_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h t1_meth.o: t1_meth.c t1_srvr.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -t1_srvr.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -t1_srvr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -t1_srvr.o: ../include/openssl/buffer.h ../include/openssl/cast.h -t1_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h -t1_srvr.o: ../include/openssl/des.h ../include/openssl/des_old.h -t1_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h -t1_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +t1_srvr.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +t1_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h +t1_srvr.o: ../include/openssl/cast.h ../include/openssl/comp.h +t1_srvr.o: ../include/openssl/crypto.h ../include/openssl/des.h +t1_srvr.o: ../include/openssl/des_old.h ../include/openssl/dh.h +t1_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +t1_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h t1_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h t1_srvr.o: ../include/openssl/evp.h ../include/openssl/idea.h t1_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c index 4cb1184161..570d0664ed 100644 --- a/ssl/s2_clnt.c +++ b/ssl/s2_clnt.c @@ -116,6 +116,7 @@ #include <openssl/buffer.h> #include <openssl/objects.h> #include <openssl/evp.h> +#include "cryptlib.h" static SSL_METHOD *ssl2_get_client_method(int ver); static int get_server_finished(SSL *s); @@ -535,6 +536,12 @@ static int get_server_hello(SSL *s) } s->s2->conn_id_length=s->s2->tmp.conn_id_length; + if (s->s2->conn_id_length > sizeof s->s2->conn_id) + { + ssl2_return_error(s, SSL2_PE_UNDEFINED_ERROR); + SSLerr(SSL_F_GET_SERVER_HELLO, SSL_R_SSL2_CONNECTION_ID_TOO_LONG); + return -1; + } memcpy(s->s2->conn_id,p,s->s2->tmp.conn_id_length); return(1); } @@ -636,6 +643,12 @@ static int client_master_key(SSL *s) /* make key_arg data */ i=EVP_CIPHER_iv_length(c); sess->key_arg_length=i; + if (i > SSL_MAX_KEY_ARG_LENGTH) + { + ssl2_return_error(s, SSL2_PE_UNDEFINED_ERROR); + SSLerr(SSL_F_CLIENT_MASTER_KEY, ERR_R_INTERNAL_ERROR); + return -1; + } if (i > 0) RAND_pseudo_bytes(sess->key_arg,i); /* make a master key */ @@ -643,6 +656,12 @@ static int client_master_key(SSL *s) sess->master_key_length=i; if (i > 0) { + if (i > sizeof sess->master_key) + { + ssl2_return_error(s, SSL2_PE_UNDEFINED_ERROR); + SSLerr(SSL_F_CLIENT_MASTER_KEY, ERR_R_INTERNAL_ERROR); + return -1; + } if (RAND_bytes(sess->master_key,i) <= 0) { ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); @@ -686,6 +705,12 @@ static int client_master_key(SSL *s) d+=enc; karg=sess->key_arg_length; s2n(karg,p); /* key arg size */ + if (karg > sizeof sess->key_arg) + { + ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); + SSLerr(SSL_F_CLIENT_MASTER_KEY, ERR_R_INTERNAL_ERROR); + return -1; + } memcpy(d,sess->key_arg,(unsigned int)karg); d+=karg; @@ -706,6 +731,11 @@ static int client_finished(SSL *s) { p=(unsigned char *)s->init_buf->data; *(p++)=SSL2_MT_CLIENT_FINISHED; + if (s->s2->conn_id_length > sizeof s->s2->conn_id) + { + SSLerr(SSL_F_CLIENT_FINISHED, ERR_R_INTERNAL_ERROR); + return -1; + } memcpy(p,s->s2->conn_id,(unsigned int)s->s2->conn_id_length); s->state=SSL2_ST_SEND_CLIENT_FINISHED_B; @@ -978,8 +1008,9 @@ static int get_server_finished(SSL *s) { if (!(s->options & SSL_OP_MICROSOFT_SESS_ID_BUG)) { - if (memcmp(buf,s->session->session_id, - (unsigned int)s->session->session_id_length) != 0) + if ((s->session->session_id_length > sizeof s->session->session_id) + || (0 != memcmp(buf, s->session->session_id, + (unsigned int)s->session->session_id_length))) { ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); SSLerr(SSL_F_GET_SERVER_FINISHED,SSL_R_SSL_SESSION_ID_IS_DIFFERENT); diff --git a/ssl/s2_enc.c b/ssl/s2_enc.c index a28e747d2d..690252e3d3 100644 --- a/ssl/s2_enc.c +++ b/ssl/s2_enc.c @@ -96,7 +96,8 @@ int ssl2_enc_init(SSL *s, int client) num=c->key_len; s->s2->key_material_length=num*2; - ssl2_generate_key_material(s); + if (ssl2_generate_key_material(s) <= 0) + return 0; EVP_EncryptInit_ex(ws,c,NULL,&(s->s2->key_material[(client)?num:0]), s->session->key_arg); diff --git a/ssl/s2_lib.c b/ssl/s2_lib.c index 25823d46e5..cc0dcfa956 100644 --- a/ssl/s2_lib.c +++ b/ssl/s2_lib.c @@ -63,6 +63,7 @@ #include <openssl/objects.h> #include <openssl/evp.h> #include <openssl/md5.h> +#include "cryptlib.h" static long ssl2_default_timeout(void ); const char *ssl2_version_str="SSLv2" OPENSSL_VERSION_PTEXT; @@ -415,12 +416,15 @@ int ssl2_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p) return(3); } -void ssl2_generate_key_material(SSL *s) +int ssl2_generate_key_material(SSL *s) { unsigned int i; EVP_MD_CTX ctx; unsigned char *km; unsigned char c='0'; + const EVP_MD *md5; + + md5 = EVP_md5(); #ifdef CHARSET_EBCDIC c = os_toascii['0']; /* Must be an ASCII '0', not EBCDIC '0', @@ -428,9 +432,23 @@ void ssl2_generate_key_material(SSL *s) #endif EVP_MD_CTX_init(&ctx); km=s->s2->key_material; - for (i=0; i<s->s2->key_material_length; i+=MD5_DIGEST_LENGTH) + + if (s->session->master_key_length < 0 || s->session->master_key_length > sizeof s->session->master_key) + { + SSLerr(SSL_F_SSL2_GENERATE_KEY_MATERIAL, ERR_R_INTERNAL_ERROR); + return 0; + } + + for (i=0; i<s->s2->key_material_length; i += EVP_MD_size(md5)) { - EVP_DigestInit_ex(&ctx,EVP_md5(), NULL); + if (((km - s->s2->key_material) + EVP_MD_size(md5)) > sizeof s->s2->key_material) + { + /* EVP_DigestFinal_ex() below would write beyond buffer */ + SSLerr(SSL_F_SSL2_GENERATE_KEY_MATERIAL, ERR_R_INTERNAL_ERROR); + return 0; + } + + EVP_DigestInit_ex(&ctx, md5, NULL); EVP_DigestUpdate(&ctx,s->session->master_key,s->session->master_key_length); EVP_DigestUpdate(&ctx,&c,1); @@ -438,9 +456,11 @@ void ssl2_generate_key_material(SSL *s) EVP_DigestUpdate(&ctx,s->s2->challenge,s->s2->challenge_length); EVP_DigestUpdate(&ctx,s->s2->conn_id,s->s2->conn_id_length); EVP_DigestFinal_ex(&ctx,km,NULL); - km+=MD5_DIGEST_LENGTH; + km += EVP_MD_size(md5); } + EVP_MD_CTX_cleanup(&ctx); + return 1; } void ssl2_return_error(SSL *s, int err) @@ -465,9 +485,14 @@ void ssl2_write_error(SSL *s) buf[2]=(s->error_code)&0xff; /* state=s->rwstate;*/ - error=s->error; + + error=s->error; /* number of bytes left to write */ s->error=0; + if (error < 0 || error > sizeof buf) /* can't happen */ + return; + i=ssl2_write(s,&(buf[3-error]),error); + /* if (i == error) s->rwstate=state; */ if (i < 0) diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c index 56da65195e..2d3b667d91 100644 --- a/ssl/s2_srvr.c +++ b/ssl/s2_srvr.c @@ -116,6 +116,7 @@ #include <openssl/rand.h> #include <openssl/objects.h> #include <openssl/evp.h> +#include "cryptlib.h" static SSL_METHOD *ssl2_get_server_method(int ver); static int get_client_master_key(SSL *s); @@ -398,8 +399,7 @@ static int get_client_master_key(SSL *s) SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_READ_WRONG_PACKET_TYPE); } else - SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, - SSL_R_PEER_ERROR); + SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, SSL_R_PEER_ERROR); return(-1); } @@ -407,8 +407,7 @@ static int get_client_master_key(SSL *s) if (cp == NULL) { ssl2_return_error(s,SSL2_PE_NO_CIPHER); - SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, - SSL_R_NO_CIPHER_MATCH); + SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, SSL_R_NO_CIPHER_MATCH); return(-1); } s->session->cipher= cp; @@ -417,15 +416,28 @@ static int get_client_master_key(SSL *s) n2s(p,i); s->s2->tmp.clear=i; n2s(p,i); s->s2->tmp.enc=i; n2s(p,i); s->session->key_arg_length=i; + if(s->session->key_arg_length > SSL_MAX_KEY_ARG_LENGTH) + { + ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); + SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, SSL_R_KEY_ARG_TOO_LONG); + return -1; + } s->state=SSL2_ST_GET_CLIENT_MASTER_KEY_B; } /* SSL2_ST_GET_CLIENT_MASTER_KEY_B */ p=(unsigned char *)s->init_buf->data; + if (s->init_buf->length < SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER) + { + ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); + SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, ERR_R_INTERNAL_ERROR); + return -1; + } keya=s->session->key_arg_length; len = 10 + (unsigned long)s->s2->tmp.clear + (unsigned long)s->s2->tmp.enc + (unsigned long)keya; if (len > SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER) { + ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); SSLerr(SSL_F_GET_CLIENT_MASTER_KEY,SSL_R_MESSAGE_TOO_LONG); return -1; } @@ -504,6 +516,13 @@ static int get_client_master_key(SSL *s) #endif if (is_export) i+=s->s2->tmp.clear; + + if (i > SSL_MAX_MASTER_KEY_LENGTH) + { + ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); + SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, ERR_R_INTERNAL_ERROR); + return -1; + } s->session->master_key_length=i; memcpy(s->session->master_key,p,(unsigned int)i); return(1); @@ -554,6 +573,7 @@ static int get_client_hello(SSL *s) if ( (i < SSL2_MIN_CHALLENGE_LENGTH) || (i > SSL2_MAX_CHALLENGE_LENGTH)) { + ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); SSLerr(SSL_F_GET_CLIENT_HELLO,SSL_R_INVALID_CHALLENGE_LENGTH); return(-1); } @@ -565,6 +585,7 @@ static int get_client_hello(SSL *s) len = 9 + (unsigned long)s->s2->tmp.cipher_spec_length + (unsigned long)s->s2->challenge_length + (unsigned long)s->s2->tmp.session_id_length; if (len > SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER) { + ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); SSLerr(SSL_F_GET_CLIENT_HELLO,SSL_R_MESSAGE_TOO_LONG); return -1; } @@ -670,6 +691,12 @@ static int get_client_hello(SSL *s) p+=s->s2->tmp.session_id_length; /* challenge */ + if (s->s2->challenge_length > sizeof s->s2->challenge) + { + ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); + SSLerr(SSL_F_GET_CLIENT_HELLO, ERR_R_INTERNAL_ERROR); + return -1; + } memcpy(s->s2->challenge,p,(unsigned int)s->s2->challenge_length); return(1); mem_err: @@ -826,6 +853,12 @@ static int get_client_finished(SSL *s) } /* SSL2_ST_GET_CLIENT_FINISHED_B */ + if (s->s2->conn_id_length > sizeof s->s2->conn_id) + { + ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR); + SSLerr(SSL_F_GET_CLIENT_FINISHED, ERR_R_INTERNAL_ERROR); + return -1; + } len = 1 + (unsigned long)s->s2->conn_id_length; n = (int)len - s->init_num; i = ssl2_read(s,(char *)&(p[s->init_num]),n); @@ -853,6 +886,11 @@ static int server_verify(SSL *s) { p=(unsigned char *)s->init_buf->data; *(p++)=SSL2_MT_SERVER_VERIFY; + if (s->s2->challenge_length > sizeof s->s2->challenge) + { + SSLerr(SSL_F_SERVER_VERIFY, ERR_R_INTERNAL_ERROR); + return -1; + } memcpy(p,s->s2->challenge,(unsigned int)s->s2->challenge_length); /* p+=s->s2->challenge_length; */ @@ -872,8 +910,12 @@ static int server_finish(SSL *s) p=(unsigned char *)s->init_buf->data; *(p++)=SSL2_MT_SERVER_FINISHED; - memcpy(p,s->session->session_id, - (unsigned int)s->session->session_id_length); + if (s->session->session_id_length > sizeof s->session->session_id) + { + SSLerr(SSL_F_SERVER_FINISH, ERR_R_INTERNAL_ERROR); + return -1; + } + memcpy(p,s->session->session_id, (unsigned int)s->session->session_id_length); /* p+=s->session->session_id_length; */ s->state=SSL2_ST_SEND_SERVER_FINISHED_B; diff --git a/ssl/s3_both.c b/ssl/s3_both.c index 8864366f59..805c6eecdd 100644 --- a/ssl/s3_both.c +++ b/ssl/s3_both.c @@ -108,6 +108,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECC cipher suite support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <limits.h> #include <string.h> @@ -520,6 +525,12 @@ int ssl_cert_type(X509 *x, EVP_PKEY *pkey) else ret= -1; } } +#ifndef OPENSSL_NO_EC + else if (i == EVP_PKEY_EC) + { + ret = SSL_PKEY_ECC; + } +#endif else ret= -1; diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index bd9ce5db55..3784e7d8c2 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -108,6 +108,32 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * ECC cipher suite support in OpenSSL originally written by + * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories. + * + */ #include <stdio.h> #include "ssl_locl.h" @@ -117,6 +143,7 @@ #include <openssl/objects.h> #include <openssl/evp.h> #include <openssl/md5.h> +#include "cryptlib.h" static SSL_METHOD *ssl3_get_client_method(int ver); static int ssl3_client_hello(SSL *s); @@ -130,6 +157,12 @@ static int ssl3_send_client_key_exchange(SSL *s); static int ssl3_get_key_exchange(SSL *s); static int ssl3_get_server_certificate(SSL *s); static int ssl3_check_cert_and_algorithm(SSL *s); + +#ifndef OPENSSL_NO_ECDH +static int curve_id2nid(int curve_id); +int check_srvr_ecc_cert_and_alg(X509 *x, SSL_CIPHER *cs); +#endif + static SSL_METHOD *ssl3_get_client_method(int ver) { if (ver == SSL3_VERSION) @@ -261,7 +294,7 @@ int ssl3_connect(SSL *s) case SSL3_ST_CR_CERT_A: case SSL3_ST_CR_CERT_B: - /* Check if it is anon DH */ + /* Check if it is anon DH/ECDH */ if (!(s->s3->tmp.new_cipher->algorithms & SSL_aNULL)) { ret=ssl3_get_server_certificate(s); @@ -328,6 +361,13 @@ int ssl3_connect(SSL *s) * sent back */ /* For TLS, cert_req is set to 2, so a cert chain * of nothing is sent, but no verify packet is sent */ + /* XXX: For now, we do not support client + * authentication in ECDH cipher suites with + * ECDH (rather than ECDSA) certificates. + * We need to skip the certificate verify + * message when client's ECDH public key is sent + * inside the client certificate. + */ if (s->s3->tmp.cert_req == 1) { s->state=SSL3_ST_CW_CERT_VRFY_A; @@ -545,6 +585,11 @@ static int ssl3_client_hello(SSL *s) *(p++)=i; if (i != 0) { + if (i > sizeof s->session->session_id) + { + SSLerr(SSL_F_SSL3_CLIENT_HELLO, ERR_R_INTERNAL_ERROR); + goto err; + } memcpy(p,s->session->session_id,i); p+=i; } @@ -626,6 +671,14 @@ static int ssl3_get_server_hello(SSL *s) /* get the session-id */ j= *(p++); + if(j > sizeof s->session->session_id) + { + al=SSL_AD_ILLEGAL_PARAMETER; + SSLerr(SSL_F_SSL3_GET_SERVER_HELLO, + SSL_R_SSL3_SESSION_ID_TOO_LONG); + goto f_err; + } + if ((j != 0) && (j != SSL3_SESSION_ID_SIZE)) { /* SSLref returns 16 :-( */ @@ -930,6 +983,13 @@ static int ssl3_get_key_exchange(SSL *s) #ifndef OPENSSL_NO_DH DH *dh=NULL; #endif +#ifndef OPENSSL_NO_ECDH + EC_KEY *ecdh = NULL; + BN_CTX *bn_ctx = NULL; + EC_POINT *srvr_ecpoint = NULL; + int curve_nid = 0; + int encoded_pt_len = 0; +#endif /* use same message size as in ssl3_get_certificate_request() * as ServerKeyExchange message may be skipped */ @@ -966,6 +1026,13 @@ static int ssl3_get_key_exchange(SSL *s) s->session->sess_cert->peer_dh_tmp=NULL; } #endif +#ifndef OPENSSL_NO_ECDH + if (s->session->sess_cert->peer_ecdh_tmp) + { + EC_KEY_free(s->session->sess_cert->peer_ecdh_tmp); + s->session->sess_cert->peer_ecdh_tmp=NULL; + } +#endif } else { @@ -1107,6 +1174,101 @@ static int ssl3_get_key_exchange(SSL *s) goto f_err; } #endif /* !OPENSSL_NO_DH */ + +#ifndef OPENSSL_NO_ECDH + else if (alg & SSL_kECDHE) + { + if ((ecdh=EC_KEY_new()) == NULL) + { + SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE); + goto err; + } + + /* Extract elliptic curve parameters and the + * server's ephemeral ECDH public key. + * Keep accumulating lengths of various components in + * param_len and make sure it never exceeds n. + */ + + /* XXX: For now we only support named (not generic) curves + * and the ECParameters in this case is just two bytes. + */ + param_len=2; + if ((param_len > n) || + (*p != NAMED_CURVE_TYPE) || + ((curve_nid = curve_id2nid(*(p + 1))) == 0)) + { + al=SSL_AD_INTERNAL_ERROR; + SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS); + goto f_err; + } + + if (!(ecdh->group=EC_GROUP_new_by_nid(curve_nid))) + { + SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_EC_LIB); + goto err; + } + + if (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && + (EC_GROUP_get_degree(ecdh->group) > 163)) + { + al=SSL_AD_EXPORT_RESTRICTION; + SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER); + goto f_err; + } + + p+=2; + + /* Next, get the encoded ECPoint */ + if (((srvr_ecpoint = EC_POINT_new(ecdh->group)) == NULL) || + ((bn_ctx = BN_CTX_new()) == NULL)) + { + SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE); + goto err; + } + + encoded_pt_len = *p; /* length of encoded point */ + p+=1; + param_len += (1 + encoded_pt_len); + if ((param_len > n) || + (EC_POINT_oct2point(ecdh->group, srvr_ecpoint, + p, encoded_pt_len, bn_ctx) == 0)) + { + al=SSL_AD_DECODE_ERROR; + SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_ECPOINT); + goto f_err; + } + + n-=param_len; + p+=encoded_pt_len; + + /* The ECC/TLS specification does not mention + * the use of DSA to sign ECParameters in the server + * key exchange message. We do support RSA and ECDSA. + */ + if (0) ; +#ifndef OPENSSL_NO_RSA + else if (alg & SSL_aRSA) + pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_RSA_ENC].x509); +#endif +#ifndef OPENSSL_NO_ECDSA + else if (alg & SSL_aECDSA) + pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_ECC].x509); +#endif + /* else anonymous ECDH, so no certificate or pkey. */ + ecdh->pub_key = srvr_ecpoint; + s->session->sess_cert->peer_ecdh_tmp=ecdh; + ecdh=NULL; + BN_CTX_free(bn_ctx); + srvr_ecpoint = NULL; + } + else if (alg & SSL_kECDH) + { + al=SSL_AD_UNEXPECTED_MESSAGE; + SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE); + goto f_err; + } +#endif /* !OPENSSL_NO_ECDH */ if (alg & SSL_aFZA) { al=SSL_AD_HANDSHAKE_FAILURE; @@ -1117,7 +1279,6 @@ static int ssl3_get_key_exchange(SSL *s) /* p points to the next byte, there are 'n' bytes left */ - /* if it was signed, check the signature */ if (pkey != NULL) { @@ -1187,6 +1348,24 @@ static int ssl3_get_key_exchange(SSL *s) } else #endif +#ifndef OPENSSL_NO_ECDSA + if (pkey->type == EVP_PKEY_EC) + { + /* let's do ECDSA */ + EVP_VerifyInit_ex(&md_ctx,EVP_ecdsa(), NULL); + EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); + EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); + EVP_VerifyUpdate(&md_ctx,param,param_len); + if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + { + /* bad signature */ + al=SSL_AD_DECRYPT_ERROR; + SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_BAD_SIGNATURE); + goto f_err; + } + } + else +#endif { SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR); goto err; @@ -1222,6 +1401,12 @@ err: if (dh != NULL) DH_free(dh); #endif +#ifndef OPENSSL_NO_ECDH + BN_CTX_free(bn_ctx); + EC_POINT_free(srvr_ecpoint); + if (ecdh != NULL) + EC_KEY_free(ecdh); +#endif EVP_MD_CTX_cleanup(&md_ctx); return(-1); } @@ -1409,6 +1594,14 @@ static int ssl3_send_client_key_exchange(SSL *s) #ifndef OPENSSL_NO_KRB5 KSSL_ERR kssl_err; #endif /* OPENSSL_NO_KRB5 */ +#ifndef OPENSSL_NO_ECDH + EC_KEY *clnt_ecdh = NULL; + EC_POINT *srvr_ecpoint = NULL; + EVP_PKEY *srvr_pub_pkey = NULL; + unsigned char *encodedPoint = NULL; + int encoded_pt_len = 0; + BN_CTX * bn_ctx = NULL; +#endif if (s->state == SSL3_ST_CW_KEY_EXCH_A) { @@ -1588,6 +1781,11 @@ static int ssl3_send_client_key_exchange(SSL *s) SSL_MAX_MASTER_KEY_LENGTH); EVP_EncryptFinal_ex(&ciph_ctx,&(epms[outl]),&padl); outl += padl; + if (outl > sizeof epms) + { + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); + goto err; + } EVP_CIPHER_CTX_cleanup(&ciph_ctx); /* KerberosWrapper.EncryptedPreMasterSecret */ @@ -1661,10 +1859,180 @@ static int ssl3_send_client_key_exchange(SSL *s) /* perhaps clean things up a bit EAY EAY EAY EAY*/ } #endif + +#ifndef OPENSSL_NO_ECDH + else if ((l & SSL_kECDH) || (l & SSL_kECDHE)) + { + EC_GROUP *srvr_group = NULL; + int ecdh_clnt_cert = 0; + + /* Did we send out the client's + * ECDH share for use in premaster + * computation as part of client certificate? + * If so, set ecdh_clnt_cert to 1. + */ + if ((l & SSL_kECDH) && (s->cert != NULL)) + { + /* XXX: For now, we do not support client + * authentication using ECDH certificates. + * To add such support, one needs to add + * code that checks for appropriate + * conditions and sets ecdh_clnt_cert to 1. + * For example, the cert have an ECC + * key on the same curve as the server's + * and the key should be authorized for + * key agreement. + * + * One also needs to add code in ssl3_connect + * to skip sending the certificate verify + * message. + * + * if ((s->cert->key->privatekey != NULL) && + * (s->cert->key->privatekey->type == + * EVP_PKEY_EC) && ...) + * ecdh_clnt_cert = 1; + */ + } + + if (s->session->sess_cert->peer_ecdh_tmp != NULL) + { + srvr_group = s->session->sess_cert-> \ + peer_ecdh_tmp->group; + srvr_ecpoint = s->session->sess_cert-> \ + peer_ecdh_tmp->pub_key; + } + else + { + /* Get the Server Public Key from Cert */ + srvr_pub_pkey = X509_get_pubkey(s->session-> \ + sess_cert->peer_pkeys[SSL_PKEY_ECC].x509); + if ((srvr_pub_pkey == NULL) || + (srvr_pub_pkey->type != EVP_PKEY_EC) || + (srvr_pub_pkey->pkey.eckey == NULL)) + { + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, + ERR_R_INTERNAL_ERROR); + goto err; + } + + srvr_group = srvr_pub_pkey->pkey.eckey->group; + srvr_ecpoint = + srvr_pub_pkey->pkey.eckey->pub_key; + } + + if ((srvr_group == NULL) || (srvr_ecpoint == NULL)) + { + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, + ERR_R_INTERNAL_ERROR); + goto err; + } + + if ((clnt_ecdh=EC_KEY_new()) == NULL) + { + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE); + goto err; + } + + clnt_ecdh->group = srvr_group; + if (ecdh_clnt_cert) + { + /* Reuse key info from our certificate + * We only need our private key to perform + * the ECDH computation. + */ + clnt_ecdh->priv_key = BN_dup(s->cert->key-> \ + privatekey->pkey.eckey->priv_key); + } + else + { + /* Generate a new ECDH key pair */ + if (!(EC_KEY_generate_key(clnt_ecdh))) + { + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, ERR_R_ECDH_LIB); + goto err; + } + } + + /* use the 'p' output buffer for the ECDH key, but + * make sure to clear it out afterwards + */ + + n=ECDH_compute_key(p, srvr_ecpoint, clnt_ecdh); + if (n <= 0) + { + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, + ERR_R_ECDH_LIB); + goto err; + } + + /* generate master key from the result */ + s->session->master_key_length = s->method->ssl3_enc \ + -> generate_master_secret(s, + s->session->master_key, + p, n); + + memset(p, 0, n); /* clean up */ + + if (ecdh_clnt_cert) + { + /* Send empty client key exch message */ + n = 0; + } + else + { + /* First check the size of encoding and + * allocate memory accordingly. + */ + encoded_pt_len = + EC_POINT_point2oct(clnt_ecdh->group, + clnt_ecdh->pub_key, + POINT_CONVERSION_UNCOMPRESSED, + NULL, 0, NULL); + + encodedPoint = (unsigned char *) + OPENSSL_malloc(encoded_pt_len * + sizeof(unsigned char)); + bn_ctx = BN_CTX_new(); + if ((encodedPoint == NULL) || + (bn_ctx == NULL)) + { + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE); + goto err; + } + + /* Encode the public key */ + n = EC_POINT_point2oct(clnt_ecdh->group, + clnt_ecdh->pub_key, + POINT_CONVERSION_UNCOMPRESSED, + encodedPoint, encoded_pt_len, bn_ctx); + + *p = n; /* length of encoded point */ + /* Encoded point will be copied here */ + p += 1; + /* copy the point */ + memcpy((unsigned char *)p, encodedPoint, n); + /* increment n to account for length field */ + n += 1; + } + + /* Free allocated memory */ + BN_CTX_free(bn_ctx); + if (encodedPoint != NULL) OPENSSL_free(encodedPoint); + if (clnt_ecdh != NULL) + { + /* group is shared */ + clnt_ecdh->group = NULL; + EC_KEY_free(clnt_ecdh); + } + EVP_PKEY_free(srvr_pub_pkey); + } +#endif /* !OPENSSL_NO_ECDH */ else { - ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_HANDSHAKE_FAILURE); - SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR); + ssl3_send_alert(s, SSL3_AL_FATAL, + SSL_AD_HANDSHAKE_FAILURE); + SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, + ERR_R_INTERNAL_ERROR); goto err; } @@ -1680,6 +2048,17 @@ static int ssl3_send_client_key_exchange(SSL *s) /* SSL3_ST_CW_KEY_EXCH_B */ return(ssl3_do_write(s,SSL3_RT_HANDSHAKE)); err: +#ifndef OPENSSL_NO_ECDH + BN_CTX_free(bn_ctx); + if (encodedPoint != NULL) OPENSSL_free(encodedPoint); + if (clnt_ecdh != NULL) + { + /* group is shared */ + clnt_ecdh->group = NULL; + EC_KEY_free(clnt_ecdh); + } + EVP_PKEY_free(srvr_pub_pkey); +#endif return(-1); } @@ -1738,6 +2117,23 @@ static int ssl3_send_client_verify(SSL *s) } else #endif +#ifndef OPENSSL_NO_ECDSA + if (pkey->type == EVP_PKEY_EC) + { + if (!ECDSA_sign(pkey->save_type, + &(data[MD5_DIGEST_LENGTH]), + SHA_DIGEST_LENGTH,&(p[2]), + (unsigned int *)&j,pkey->pkey.eckey)) + { + SSLerr(SSL_F_SSL3_SEND_CLIENT_VERIFY, + ERR_R_ECDSA_LIB); + goto err; + } + s2n(j,p); + n=j+2; + } + else +#endif { SSLerr(SSL_F_SSL3_SEND_CLIENT_VERIFY,ERR_R_INTERNAL_ERROR); goto err; @@ -1869,6 +2265,21 @@ static int ssl3_check_cert_and_algorithm(SSL *s) /* This is the passed certificate */ idx=sc->peer_cert_type; +#ifndef OPENSSL_NO_ECDH + if (idx == SSL_PKEY_ECC) + { + if (check_srvr_ecc_cert_and_alg(sc->peer_pkeys[idx].x509, + s->s3->tmp.new_cipher) == 0) + { /* check failed */ + SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_BAD_ECC_CERT); + goto f_err; + } + else + { + return 1; + } + } +#endif pkey=X509_get_pubkey(sc->peer_pkeys[idx].x509); i=X509_certificate_type(sc->peer_pkeys[idx].x509,pkey); EVP_PKEY_free(pkey); @@ -1954,3 +2365,44 @@ err: return(0); } + +#ifndef OPENSSL_NO_ECDH +/* This is the complement of nid2curve_id in s3_srvr.c. */ +static int curve_id2nid(int curve_id) +{ + /* ECC curves from draft-ietf-tls-ecc-01.txt (Mar 15, 2001) */ + static int nid_list[26] = + { + 0, + NID_sect163k1, /* sect163k1 (1) */ + NID_sect163r1, /* sect163r1 (2) */ + NID_sect163r2, /* sect163r2 (3) */ + NID_sect193r1, /* sect193r1 (4) */ + NID_sect193r2, /* sect193r2 (5) */ + NID_sect233k1, /* sect233k1 (6) */ + NID_sect233r1, /* sect233r1 (7) */ + NID_sect239k1, /* sect239k1 (8) */ + NID_sect283k1, /* sect283k1 (9) */ + NID_sect283r1, /* sect283r1 (10) */ + NID_sect409k1, /* sect409k1 (11) */ + NID_sect409r1, /* sect409r1 (12) */ + NID_sect571k1, /* sect571k1 (13) */ + NID_sect571r1, /* sect571r1 (14) */ + NID_secp160k1, /* secp160k1 (15) */ + NID_secp160r1, /* secp160r1 (16) */ + NID_secp160r2, /* secp160r2 (17) */ + NID_secp192k1, /* secp192k1 (18) */ + NID_X9_62_prime192v1, /* secp192r1 (19) */ + NID_secp224k1, /* secp224k1 (20) */ + NID_secp224r1, /* secp224r1 (21) */ + NID_secp256k1, /* secp256k1 (22) */ + NID_X9_62_prime256v1, /* secp256r1 (23) */ + NID_secp384r1, /* secp384r1 (24) */ + NID_secp521r1 /* secp521r1 (25) */ + }; + + if ((curve_id < 1) || (curve_id > 25)) return 0; + + return nid_list[curve_id]; +} +#endif diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 14b2f13ae2..40730ca11d 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -108,6 +108,32 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * ECC cipher suite support in OpenSSL originally written by + * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories. + * + */ #include <stdio.h> #include <openssl/objects.h> @@ -871,6 +897,356 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL_ALL_STRENGTHS, }, +#ifndef OPENSSL_NO_ECDH + /* Cipher 47 */ + { + 1, + TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA, + TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA, + SSL_kECDH|SSL_aECDSA|SSL_eNULL|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP, + 0, + 0, + 0, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 48 */ + { + 1, + TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA, + TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA, + SSL_kECDH|SSL_aECDSA|SSL_RC4|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP, + 0, + 128, + 128, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 49 */ + { + 1, + TLS1_TXT_ECDH_ECDSA_WITH_DES_CBC_SHA, + TLS1_CK_ECDH_ECDSA_WITH_DES_CBC_SHA, + SSL_kECDH|SSL_aECDSA|SSL_DES|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP|SSL_LOW, + 0, + 56, + 56, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 4A */ + { + 1, + TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA, + TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA, + SSL_kECDH|SSL_aECDSA|SSL_3DES|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP|SSL_HIGH, + 0, + 168, + 168, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 4B */ + { + 1, + TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA, + TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA, + SSL_kECDH|SSL_aECDSA|SSL_AES|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP|SSL_MEDIUM, + 0, + 128, + 128, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 4C */ + { + 1, + TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA, + TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA, + SSL_kECDH|SSL_aECDSA|SSL_AES|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP|SSL_HIGH, + 0, + 256, + 256, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 5B */ + /* XXX NOTE: The ECC/TLS draft has a bug and reuses 4B for this */ + { + 1, + TLS1_TXT_ECDH_ECDSA_EXPORT_WITH_RC4_40_SHA, + TLS1_CK_ECDH_ECDSA_EXPORT_WITH_RC4_40_SHA, + SSL_kECDH|SSL_aECDSA|SSL_RC4|SSL_SHA|SSL_TLSV1, + SSL_EXPORT|SSL_EXP40, + 0, + 40, + 128, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 5C */ + /* XXX NOTE: The ECC/TLS draft has a bug and reuses 4C for this */ + { + 1, + TLS1_TXT_ECDH_ECDSA_EXPORT_WITH_RC4_56_SHA, + TLS1_CK_ECDH_ECDSA_EXPORT_WITH_RC4_56_SHA, + SSL_kECDH|SSL_aECDSA|SSL_RC4|SSL_SHA|SSL_TLSV1, + SSL_EXPORT|SSL_EXP56, + 0, + 56, + 128, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 4D */ + { + 1, + TLS1_TXT_ECDH_RSA_WITH_NULL_SHA, + TLS1_CK_ECDH_RSA_WITH_NULL_SHA, + SSL_kECDH|SSL_aRSA|SSL_eNULL|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP, + 0, + 0, + 0, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 4E */ + { + 1, + TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA, + TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA, + SSL_kECDH|SSL_aRSA|SSL_RC4|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP, + 0, + 128, + 128, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 4F */ + { + 1, + TLS1_TXT_ECDH_RSA_WITH_DES_CBC_SHA, + TLS1_CK_ECDH_RSA_WITH_DES_CBC_SHA, + SSL_kECDH|SSL_aRSA|SSL_DES|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP|SSL_LOW, + 0, + 56, + 56, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 50 */ + { + 1, + TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA, + TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA, + SSL_kECDH|SSL_aRSA|SSL_3DES|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP|SSL_HIGH, + 0, + 168, + 168, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 51 */ + { + 1, + TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA, + TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA, + SSL_kECDH|SSL_aRSA|SSL_AES|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP|SSL_MEDIUM, + 0, + 128, + 128, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 52 */ + { + 1, + TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA, + TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA, + SSL_kECDH|SSL_aRSA|SSL_AES|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP|SSL_HIGH, + 0, + 256, + 256, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 53 */ + { + 1, + TLS1_TXT_ECDH_RSA_EXPORT_WITH_RC4_40_SHA, + TLS1_CK_ECDH_RSA_EXPORT_WITH_RC4_40_SHA, + SSL_kECDH|SSL_aRSA|SSL_RC4|SSL_SHA|SSL_TLSV1, + SSL_EXPORT|SSL_EXP40, + 0, + 40, + 128, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 54 */ + { + 1, + TLS1_TXT_ECDH_RSA_EXPORT_WITH_RC4_56_SHA, + TLS1_CK_ECDH_RSA_EXPORT_WITH_RC4_56_SHA, + SSL_kECDH|SSL_aRSA|SSL_RC4|SSL_SHA|SSL_TLSV1, + SSL_EXPORT|SSL_EXP56, + 0, + 56, + 128, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 55 */ + { + 1, + TLS1_TXT_ECDH_anon_WITH_NULL_SHA, + TLS1_CK_ECDH_anon_WITH_NULL_SHA, + SSL_kECDHE|SSL_aNULL|SSL_eNULL|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP, + 0, + 0, + 0, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 56 */ + { + 1, + TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA, + TLS1_CK_ECDH_anon_WITH_RC4_128_SHA, + SSL_kECDHE|SSL_aNULL|SSL_RC4|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP, + 0, + 128, + 128, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 57 */ + { + 1, + TLS1_TXT_ECDH_anon_WITH_DES_CBC_SHA, + TLS1_CK_ECDH_anon_WITH_DES_CBC_SHA, + SSL_kECDHE|SSL_aNULL|SSL_DES|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP|SSL_LOW, + 0, + 56, + 56, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 58 */ + { + 1, + TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA, + TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA, + SSL_kECDHE|SSL_aNULL|SSL_3DES|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP|SSL_HIGH, + 0, + 168, + 168, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 59 */ + { + 1, + TLS1_TXT_ECDH_anon_EXPORT_WITH_DES_40_CBC_SHA, + TLS1_CK_ECDH_anon_EXPORT_WITH_DES_40_CBC_SHA, + SSL_kECDHE|SSL_aNULL|SSL_DES|SSL_SHA|SSL_TLSV1, + SSL_EXPORT|SSL_EXP40, + 0, + 40, + 56, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 5A */ + { + 1, + TLS1_TXT_ECDH_anon_EXPORT_WITH_RC4_40_SHA, + TLS1_CK_ECDH_anon_EXPORT_WITH_RC4_40_SHA, + SSL_kECDHE|SSL_aNULL|SSL_RC4|SSL_SHA|SSL_TLSV1, + SSL_EXPORT|SSL_EXP40, + 0, + 40, + 128, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 77 XXX: ECC ciphersuites offering forward secrecy + * are not yet specified in the ECC/TLS draft but our code + * allows them to be implemented very easily. To add such + * a cipher suite, one needs to add two constant definitions + * to tls1.h and a new structure in this file as shown below. We + * illustrate the process for the made-up cipher + * ECDHE-ECDSA-AES128-SHA. + */ + { + 1, + TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + SSL_kECDHE|SSL_aECDSA|SSL_AES|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP|SSL_MEDIUM, + 0, + 128, + 128, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + + /* Cipher 78 XXX: Another made-up ECC cipher suite that + * offers forward secrecy (ECDHE-RSA-AES128-SHA). + */ + { + 1, + TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA, + TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA, + SSL_kECDHE|SSL_aRSA|SSL_AES|SSL_SHA|SSL_TLSV1, + SSL_NOT_EXP|SSL_MEDIUM, + 0, + 128, + 128, + SSL_ALL_CIPHERS, + SSL_ALL_STRENGTHS, + }, + +#endif /* !OPENSSL_NO_ECDH */ + /* end of list */ }; @@ -982,6 +1358,11 @@ void ssl3_free(SSL *s) if (s->s3->tmp.dh != NULL) DH_free(s->s3->tmp.dh); #endif +#ifndef OPENSSL_NO_ECDH + if (s->s3->tmp.ecdh != NULL) + EC_KEY_free(s->s3->tmp.ecdh); +#endif + if (s->s3->tmp.ca_names != NULL) sk_X509_NAME_pop_free(s->s3->tmp.ca_names,X509_NAME_free); EVP_MD_CTX_cleanup(&s->s3->finish_dgst1); @@ -1009,6 +1390,10 @@ void ssl3_clear(SSL *s) if (s->s3->tmp.dh != NULL) DH_free(s->s3->tmp.dh); #endif +#ifndef OPENSSL_NO_ECDH + if (s->s3->tmp.ecdh != NULL) + EC_KEY_free(s->s3->tmp.ecdh); +#endif rp = s->s3->rbuf.buf; wp = s->s3->wbuf.buf; @@ -1147,6 +1532,44 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg) } break; #endif +#ifndef OPENSSL_NO_ECDH + case SSL_CTRL_SET_TMP_ECDH: + { + EC_KEY *ecdh = NULL; + + if (parg == NULL) + { + SSLerr(SSL_F_SSL3_CTRL, ERR_R_PASSED_NULL_PARAMETER); + return(ret); + } + if (!EC_KEY_up_ref((EC_KEY *)parg)) + { + SSLerr(SSL_F_SSL3_CTRL,ERR_R_ECDH_LIB); + return(ret); + } + ecdh = (EC_KEY *)parg; + if (!(s->options & SSL_OP_SINGLE_ECDH_USE)) + { + if (!EC_KEY_generate_key(ecdh)) + { + EC_KEY_free(ecdh); + SSLerr(SSL_F_SSL3_CTRL,ERR_R_ECDH_LIB); + return(ret); + } + } + if (s->cert->ecdh_tmp != NULL) + EC_KEY_free(s->cert->ecdh_tmp); + s->cert->ecdh_tmp = ecdh; + ret = 1; + } + break; + case SSL_CTRL_SET_TMP_ECDH_CB: + { + SSLerr(SSL_F_SSL3_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return(ret); + } + break; +#endif /* !OPENSSL_NO_ECDH */ default: break; } @@ -1191,6 +1614,13 @@ long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)()) } break; #endif +#ifndef OPENSSL_NO_ECDH + case SSL_CTRL_SET_TMP_ECDH_CB: + { + s->cert->ecdh_tmp_cb = (EC_KEY *(*)(SSL *, int, int))fp; + } + break; +#endif default: break; } @@ -1283,6 +1713,47 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg) } break; #endif +#ifndef OPENSSL_NO_ECDH + case SSL_CTRL_SET_TMP_ECDH: + { + EC_KEY *ecdh = NULL; + + if (parg == NULL) + { + SSLerr(SSL_F_SSL3_CTX_CTRL,ERR_R_ECDH_LIB); + return 0; + } + if (!EC_KEY_up_ref((EC_KEY *)parg)) + { + SSLerr(SSL_F_SSL3_CTRL,ERR_R_ECDH_LIB); + return 0; + } + ecdh = (EC_KEY *)parg; + if (!(ctx->options & SSL_OP_SINGLE_ECDH_USE)) + { + if (!EC_KEY_generate_key(ecdh)) + { + EC_KEY_free(ecdh); + SSLerr(SSL_F_SSL3_CTX_CTRL,ERR_R_ECDH_LIB); + return 0; + } + } + + if (cert->ecdh_tmp != NULL) + { + EC_KEY_free(cert->ecdh_tmp); + } + cert->ecdh_tmp = ecdh; + return 1; + } + /* break; */ + case SSL_CTRL_SET_TMP_ECDH_CB: + { + SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return(0); + } + break; +#endif /* !OPENSSL_NO_ECDH */ /* A Thawte special :-) */ case SSL_CTRL_EXTRA_CHAIN_CERT: if (ctx->extra_certs == NULL) @@ -1321,6 +1792,13 @@ long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)()) } break; #endif +#ifndef OPENSSL_NO_ECDH + case SSL_CTRL_SET_TMP_ECDH_CB: + { + cert->ecdh_tmp_cb = (EC_KEY *(*)(SSL *, int, int))fp; + } + break; +#endif default: return(0); } @@ -1465,7 +1943,6 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, } if (!ok) continue; - j=sk_SSL_CIPHER_find(allow,c); if (j >= 0) { @@ -1510,6 +1987,26 @@ int ssl3_get_req_cert_type(SSL *s, unsigned char *p) #ifndef OPENSSL_NO_DSA p[ret++]=SSL3_CT_DSS_SIGN; #endif +#ifndef OPENSSL_NO_ECDH + /* We should ask for fixed ECDH certificates only + * for SSL_kECDH (and not SSL_kECDHE) + */ + if ((alg & SSL_kECDH) && (s->version >= TLS1_VERSION)) + { + p[ret++]=TLS_CT_RSA_FIXED_ECDH; + p[ret++]=TLS_CT_ECDSA_FIXED_ECDH; + } +#endif + +#ifndef OPENSSL_NO_ECDSA + /* ECDSA certs can be used with RSA cipher suites as well + * so we don't need to check for SSL_kECDH or SSL_kECDHE + */ + if (s->version >= TLS1_VERSION) + { + p[ret++]=TLS_CT_ECDSA_SIGN; + } +#endif return(ret); } diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 270afb8166..4b374a9cd6 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -108,11 +108,36 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * ECC cipher suite support in OpenSSL originally written by + * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories. + * + */ #define REUSE_CIPHER_BUG #define NETSCAPE_HANG_BUG - #include <stdio.h> #include "ssl_locl.h" #include "kssl_lcl.h" @@ -123,6 +148,7 @@ #include <openssl/x509.h> #include <openssl/krb5_asn.h> #include <openssl/md5.h> +#include "cryptlib.h" static SSL_METHOD *ssl3_get_server_method(int ver); static int ssl3_get_client_hello(SSL *s); @@ -136,6 +162,10 @@ static int ssl3_get_client_certificate(SSL *s); static int ssl3_get_cert_verify(SSL *s); static int ssl3_send_hello_request(SSL *s); +#ifndef OPENSSL_NO_ECDH +static int nid2curve_id(int nid); +#endif + static SSL_METHOD *ssl3_get_server_method(int ver) { if (ver == SSL3_VERSION) @@ -299,7 +329,7 @@ int ssl3_accept(SSL *s) case SSL3_ST_SW_CERT_A: case SSL3_ST_SW_CERT_B: - /* Check if it is anon DH */ + /* Check if it is anon DH or anon ECDH */ if (!(s->s3->tmp.new_cipher->algorithms & SSL_aNULL)) { ret=ssl3_send_server_certificate(s); @@ -330,9 +360,18 @@ int ssl3_accept(SSL *s) else s->s3->tmp.use_rsa_tmp=0; + /* only send if a DH key exchange, fortezza or - * RSA but we have a sign only certificate */ + * RSA but we have a sign only certificate + * + * For ECC ciphersuites, we send a serverKeyExchange + * message only if the cipher suite is either + * ECDH-anon or ECDHE. In other cases, the + * server certificate contains the server's + * public key for key exchange. + */ if (s->s3->tmp.use_rsa_tmp + || (l & SSL_kECDHE) || (l & (SSL_DH|SSL_kFZA)) || ((l & SSL_kRSA) && (s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL @@ -435,19 +474,33 @@ int ssl3_accept(SSL *s) case SSL3_ST_SR_KEY_EXCH_A: case SSL3_ST_SR_KEY_EXCH_B: ret=ssl3_get_client_key_exchange(s); - if (ret <= 0) goto end; - s->state=SSL3_ST_SR_CERT_VRFY_A; - s->init_num=0; - - /* We need to get hashes here so if there is - * a client cert, it can be verified */ - s->method->ssl3_enc->cert_verify_mac(s, - &(s->s3->finish_dgst1), - &(s->s3->tmp.cert_verify_md[0])); - s->method->ssl3_enc->cert_verify_mac(s, - &(s->s3->finish_dgst2), - &(s->s3->tmp.cert_verify_md[MD5_DIGEST_LENGTH])); + if (ret <= 0) + goto end; + if (ret == 2) + { + /* For the ECDH ciphersuites when + * the client sends its ECDH pub key in + * a certificate, the CertificateVerify + * message is not sent. + */ + s->state=SSL3_ST_SR_FINISHED_A; + s->init_num = 0; + } + else + { + s->state=SSL3_ST_SR_CERT_VRFY_A; + s->init_num=0; + /* We need to get hashes here so if there is + * a client cert, it can be verified + */ + s->method->ssl3_enc->cert_verify_mac(s, + &(s->s3->finish_dgst1), + &(s->s3->tmp.cert_verify_md[0])); + s->method->ssl3_enc->cert_verify_mac(s, + &(s->s3->finish_dgst2), + &(s->s3->tmp.cert_verify_md[MD5_DIGEST_LENGTH])); + } break; case SSL3_ST_SR_CERT_VRFY_A: @@ -964,6 +1017,11 @@ static int ssl3_send_server_hello(SSL *s) s->session->session_id_length=0; sl=s->session->session_id_length; + if (sl > sizeof s->session->session_id) + { + SSLerr(SSL_F_SSL3_SEND_SERVER_HELLO, ERR_R_INTERNAL_ERROR); + return -1; + } *(p++)=sl; memcpy(p,s->session->session_id,sl); p+=sl; @@ -1030,6 +1088,13 @@ static int ssl3_send_server_key_exchange(SSL *s) #ifndef OPENSSL_NO_DH DH *dh=NULL,*dhp; #endif +#ifndef OPENSSL_NO_ECDH + EC_KEY *ecdh=NULL, *ecdhp; + unsigned char *encodedPoint = NULL; + int encodedlen = 0; + int curve_id = 0; + BN_CTX *bn_ctx = NULL; +#endif EVP_PKEY *pkey; unsigned char *p,*d; int al,i; @@ -1138,6 +1203,131 @@ static int ssl3_send_server_key_exchange(SSL *s) } else #endif +#ifndef OPENSSL_NO_ECDH + if (type & SSL_kECDHE) + { + ecdhp=cert->ecdh_tmp; + if ((ecdhp == NULL) && (s->cert->ecdh_tmp_cb != NULL)) + { + ecdhp=s->cert->ecdh_tmp_cb(s, + SSL_C_IS_EXPORT(s->s3->tmp.new_cipher), + SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher)); + } + if (ecdhp == NULL) + { + al=SSL_AD_HANDSHAKE_FAILURE; + SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_MISSING_TMP_ECDH_KEY); + goto f_err; + } + + if (s->s3->tmp.ecdh != NULL) + { + EC_KEY_free(s->s3->tmp.ecdh); + SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); + goto err; + } + + /* Duplicate the ECDH structure. */ + if (ecdhp == NULL) + { + SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB); + goto err; + } + if (!EC_KEY_up_ref(ecdhp)) + { + SSLerr(SSL_F_SSL3_CTRL,ERR_R_ECDH_LIB); + goto err; + } + ecdh = ecdhp; + + s->s3->tmp.ecdh=ecdh; + if ((ecdh->pub_key == NULL) || + (ecdh->priv_key == NULL) || + (s->options & SSL_OP_SINGLE_ECDH_USE)) + { + if(!EC_KEY_generate_key(ecdh)) + { + SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB); + goto err; + } + } + + if ((ecdh->group == NULL) || + (ecdh->pub_key == NULL) || + (ecdh->priv_key == NULL)) + { + SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB); + goto err; + } + + if (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && + (EC_GROUP_get_degree(ecdh->group) > 163)) + { + SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER); + goto err; + } + + /* XXX: For now, we only support ephemeral ECDH + * keys over named (not generic) curves. For + * supported named curves, curve_id is non-zero. + */ + if ((curve_id = + nid2curve_id(EC_GROUP_get_nid(ecdh->group))) + == 0) + { + SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_UNSUPPORTED_ELLIPTIC_CURVE); + goto err; + } + + /* Encode the public key. + * First check the size of encoding and + * allocate memory accordingly. + */ + encodedlen = EC_POINT_point2oct(ecdh->group, + ecdh->pub_key, + POINT_CONVERSION_UNCOMPRESSED, + NULL, 0, NULL); + + encodedPoint = (unsigned char *) + OPENSSL_malloc(encodedlen*sizeof(unsigned char)); + bn_ctx = BN_CTX_new(); + if ((encodedPoint == NULL) || (bn_ctx == NULL)) + { + SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_MALLOC_FAILURE); + goto err; + } + + + encodedlen = EC_POINT_point2oct(ecdh->group, + ecdh->pub_key, + POINT_CONVERSION_UNCOMPRESSED, + encodedPoint, encodedlen, bn_ctx); + + if (encodedlen == 0) + { + SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB); + goto err; + } + + BN_CTX_free(bn_ctx); bn_ctx=NULL; + + /* XXX: For now, we only support named (not + * generic) curves in ECDH ephemeral key exchanges. + * In this situation, we need three additional bytes + * to encode the entire ServerECDHParams + * structure. + */ + n = 3 + encodedlen; + + /* We'll generate the serverKeyExchange message + * explicitly so we can set these to NULLs + */ + r[0]=NULL; + r[1]=NULL; + r[2]=NULL; + } + else +#endif /* !OPENSSL_NO_ECDH */ { al=SSL_AD_HANDSHAKE_FAILURE; SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE); @@ -1180,6 +1370,29 @@ static int ssl3_send_server_key_exchange(SSL *s) p+=nr[i]; } +#ifndef OPENSSL_NO_ECDH + if (type & SSL_kECDHE) + { + /* XXX: For now, we only support named (not generic) curves. + * In this situation, the serverKeyExchange message has: + * [1 byte CurveType], [1 byte CurveName] + * [1 byte length of encoded point], followed by + * the actual encoded point itself + */ + *p = NAMED_CURVE_TYPE; + p += 1; + *p = curve_id; + p += 1; + *p = encodedlen; + p += 1; + memcpy((unsigned char*)p, + (unsigned char *)encodedPoint, + encodedlen); + OPENSSL_free(encodedPoint); + p += encodedlen; + } +#endif + /* not anonymous */ if (pkey != NULL) { @@ -1232,6 +1445,25 @@ static int ssl3_send_server_key_exchange(SSL *s) } else #endif +#if !defined(OPENSSL_NO_ECDSA) + if (pkey->type == EVP_PKEY_EC) + { + /* let's do ECDSA */ + EVP_SignInit_ex(&md_ctx,EVP_ecdsa(), NULL); + EVP_SignUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); + EVP_SignUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); + EVP_SignUpdate(&md_ctx,&(d[4]),n); + if (!EVP_SignFinal(&md_ctx,&(p[2]), + (unsigned int *)&i,pkey)) + { + SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_LIB_ECDSA); + goto err; + } + s2n(i,p); + n+=i+2; + } + else +#endif { /* Is this error check actually needed? */ al=SSL_AD_HANDSHAKE_FAILURE; @@ -1255,6 +1487,10 @@ static int ssl3_send_server_key_exchange(SSL *s) f_err: ssl3_send_alert(s,SSL3_AL_FATAL,al); err: +#ifndef OPENSSL_NO_ECDH + if (encodedPoint != NULL) OPENSSL_free(encodedPoint); + BN_CTX_free(bn_ctx); +#endif EVP_MD_CTX_cleanup(&md_ctx); return(-1); } @@ -1365,6 +1601,13 @@ static int ssl3_get_client_key_exchange(SSL *s) KSSL_ERR kssl_err; #endif /* OPENSSL_NO_KRB5 */ +#ifndef OPENSSL_NO_ECDH + EC_KEY *srvr_ecdh = NULL; + EVP_PKEY *clnt_pub_pkey = NULL; + EC_POINT *clnt_ecpoint = NULL; + BN_CTX *bn_ctx = NULL; +#endif + n=ssl3_get_message(s, SSL3_ST_SR_KEY_EXCH_A, SSL3_ST_SR_KEY_EXCH_B, @@ -1559,8 +1802,8 @@ static int ssl3_get_client_key_exchange(SSL *s) EVP_CIPHER *enc = NULL; unsigned char iv[EVP_MAX_IV_LENGTH]; unsigned char pms[SSL_MAX_MASTER_KEY_LENGTH - + EVP_MAX_IV_LENGTH + 1]; - int padl, outl = sizeof(pms); + + EVP_MAX_BLOCK_LENGTH]; + int padl, outl; krb5_timestamp authtime = 0; krb5_ticket_times ttimes; @@ -1583,6 +1826,16 @@ static int ssl3_get_client_key_exchange(SSL *s) enc_pms.data = (char *)p; p+=enc_pms.length; + /* Note that the length is checked again below, + ** after decryption + */ + if(enc_pms.length > sizeof pms) + { + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + SSL_R_DATA_LENGTH_TOO_LONG); + goto err; + } + if (n != enc_ticket.length + authenticator.length + enc_pms.length + 6) { @@ -1695,6 +1948,138 @@ static int ssl3_get_client_key_exchange(SSL *s) } else #endif /* OPENSSL_NO_KRB5 */ + +#ifndef OPENSSL_NO_ECDH + if ((l & SSL_kECDH) || (l & SSL_kECDHE)) + { + int ret = 1; + + /* initialize structures for server's ECDH key pair */ + if ((srvr_ecdh = EC_KEY_new()) == NULL) + { + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + ERR_R_MALLOC_FAILURE); + goto err; + } + + /* Let's get server private key and group information */ + if (l & SSL_kECDH) + { + /* use the certificate */ + srvr_ecdh->group = s->cert->key->privatekey-> \ + pkey.eckey->group; + srvr_ecdh->priv_key = s->cert->key->privatekey-> \ + pkey.eckey->priv_key; + } + else + { + /* use the ephermeral values we saved when + * generating the ServerKeyExchange msg. + */ + srvr_ecdh->group = s->s3->tmp.ecdh->group; + srvr_ecdh->priv_key = s->s3->tmp.ecdh->priv_key; + } + + /* Let's get client's public key */ + if ((clnt_ecpoint = EC_POINT_new(srvr_ecdh->group)) + == NULL) + { + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + ERR_R_MALLOC_FAILURE); + goto err; + } + + if (n == 0L) + { + /* Client Publickey was in Client Certificate */ + + if (l & SSL_kECDHE) + { + al=SSL_AD_HANDSHAKE_FAILURE; + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_MISSING_TMP_ECDH_KEY); + goto f_err; + } + if (((clnt_pub_pkey=X509_get_pubkey(s->session->peer)) + == NULL) || + (clnt_pub_pkey->type != EVP_PKEY_EC)) + { + /* XXX: For now, we do not support client + * authentication using ECDH certificates + * so this branch (n == 0L) of the code is + * never executed. When that support is + * added, we ought to ensure the key + * received in the certificate is + * authorized for key agreement. + * ECDH_compute_key implicitly checks that + * the two ECDH shares are for the same + * group. + */ + al=SSL_AD_HANDSHAKE_FAILURE; + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + SSL_R_UNABLE_TO_DECODE_ECDH_CERTS); + goto f_err; + } + + EC_POINT_copy(clnt_ecpoint, + clnt_pub_pkey->pkey.eckey->pub_key); + ret = 2; /* Skip certificate verify processing */ + } + else + { + /* Get client's public key from encoded point + * in the ClientKeyExchange message. + */ + if ((bn_ctx = BN_CTX_new()) == NULL) + { + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + ERR_R_MALLOC_FAILURE); + goto err; + } + + /* Get encoded point length */ + i = *p; + p += 1; + if (EC_POINT_oct2point(srvr_ecdh->group, + clnt_ecpoint, p, i, bn_ctx) == 0) + { + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + ERR_R_EC_LIB); + goto err; + } + /* p is pointing to somewhere in the buffer + * currently, so set it to the start + */ + p=(unsigned char *)s->init_buf->data; + } + + /* Compute the shared pre-master secret */ + i = ECDH_compute_key(p, clnt_ecpoint, srvr_ecdh); + if (i <= 0) + { + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + ERR_R_ECDH_LIB); + goto err; + } + + EVP_PKEY_free(clnt_pub_pkey); + EC_POINT_free(clnt_ecpoint); + if (srvr_ecdh != NULL) + { + srvr_ecdh->priv_key = NULL; + srvr_ecdh->group = NULL; + EC_KEY_free(srvr_ecdh); + } + BN_CTX_free(bn_ctx); + + /* Compute the master secret */ + s->session->master_key_length = s->method->ssl3_enc-> \ + generate_master_secret(s, s->session->master_key, p, i); + + memset(p, 0, i); + return (ret); + } + else +#endif { al=SSL_AD_HANDSHAKE_FAILURE; SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, @@ -1705,9 +2090,20 @@ static int ssl3_get_client_key_exchange(SSL *s) return(1); f_err: ssl3_send_alert(s,SSL3_AL_FATAL,al); -#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_RSA) +#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_ECDH) err: #endif +#ifndef NO_OPENSSL_ECDH + EVP_PKEY_free(clnt_pub_pkey); + EC_POINT_free(clnt_ecpoint); + if (srvr_ecdh != NULL) + { + srvr_ecdh->priv_key = NULL; + srvr_ecdh->group = NULL; + EC_KEY_free(srvr_ecdh); + } + BN_CTX_free(bn_ctx); +#endif return(-1); } @@ -1831,6 +2227,23 @@ static int ssl3_get_cert_verify(SSL *s) } else #endif +#ifndef OPENSSL_NO_ECDSA + if (pkey->type == EVP_PKEY_EC) + { + j=ECDSA_verify(pkey->save_type, + &(s->s3->tmp.cert_verify_md[MD5_DIGEST_LENGTH]), + SHA_DIGEST_LENGTH,p,i,pkey->pkey.eckey); + if (j <= 0) + { + /* bad signature */ + al=SSL_AD_DECRYPT_ERROR; + SSLerr(SSL_F_SSL3_GET_CERT_VERIFY, + SSL_R_BAD_ECDSA_SIGNATURE); + goto f_err; + } + } + else +#endif { SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,ERR_R_INTERNAL_ERROR); al=SSL_AD_UNSUPPORTED_CERTIFICATE; @@ -2031,3 +2444,66 @@ int ssl3_send_server_certificate(SSL *s) /* SSL3_ST_SW_CERT_B */ return(ssl3_do_write(s,SSL3_RT_HANDSHAKE)); } + + +#ifndef OPENSSL_NO_ECDH +/* This is the complement of curve_id2nid in s3_clnt.c. */ +static int nid2curve_id(int nid) +{ + /* ECC curves from draft-ietf-tls-ecc-01.txt (Mar 15, 2001) */ + switch (nid) { + case NID_sect163k1: /* sect163k1 (1) */ + return 1; + case NID_sect163r1: /* sect163r1 (2) */ + return 2; + case NID_sect163r2: /* sect163r2 (3) */ + return 3; + case NID_sect193r1: /* sect193r1 (4) */ + return 4; + case NID_sect193r2: /* sect193r2 (5) */ + return 5; + case NID_sect233k1: /* sect233k1 (6) */ + return 6; + case NID_sect233r1: /* sect233r1 (7) */ + return 7; + case NID_sect239k1: /* sect239k1 (8) */ + return 8; + case NID_sect283k1: /* sect283k1 (9) */ + return 9; + case NID_sect283r1: /* sect283r1 (10) */ + return 10; + case NID_sect409k1: /* sect409k1 (11) */ + return 11; + case NID_sect409r1: /* sect409r1 (12) */ + return 12; + case NID_sect571k1: /* sect571k1 (13) */ + return 13; + case NID_sect571r1: /* sect571r1 (14) */ + return 14; + case NID_secp160k1: /* secp160k1 (15) */ + return 15; + case NID_secp160r1: /* secp160r1 (16) */ + return 16; + case NID_secp160r2: /* secp160r2 (17) */ + return 17; + case NID_secp192k1: /* secp192k1 (18) */ + return 18; + case NID_X9_62_prime192v1: /* secp192r1 (19) */ + return 19; + case NID_secp224k1: /* secp224k1 (20) */ + return 20; + case NID_secp224r1: /* secp224r1 (21) */ + return 21; + case NID_secp256k1: /* secp256k1 (22) */ + return 22; + case NID_X9_62_prime256v1: /* secp256r1 (23) */ + return 23; + case NID_secp384r1: /* secp384r1 (24) */ + return 24; + case NID_secp521r1: /* secp521r1 (25) */ + return 25; + default: + return 0; + } +} +#endif @@ -161,6 +161,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECC cipher suite support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #ifndef HEADER_SSL_H #define HEADER_SSL_H @@ -265,6 +270,7 @@ extern "C" { #define SSL_TXT_SSLV3 "SSLv3" #define SSL_TXT_TLSV1 "TLSv1" #define SSL_TXT_ALL "ALL" +#define SSL_TXT_ECC "ECCdraft" /* ECC ciphersuites are not yet official */ /* * COMPLEMENTOF* definitions. These identifiers are used to (de-select) @@ -470,6 +476,8 @@ typedef struct ssl_session_st /* As server, disallow session resumption on renegotiation */ #define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000L +/* If set, always create a new key when using tmp_ecdh parameters */ +#define SSL_OP_SINGLE_ECDH_USE 0x00080000L /* If set, always create a new key when using tmp_dh parameters */ #define SSL_OP_SINGLE_DH_USE 0x00100000L /* Set to always use the tmp_rsa key when doing RSA operations, @@ -1074,19 +1082,21 @@ size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count); #define SSL_CTRL_NEED_TMP_RSA 1 #define SSL_CTRL_SET_TMP_RSA 2 #define SSL_CTRL_SET_TMP_DH 3 -#define SSL_CTRL_SET_TMP_RSA_CB 4 -#define SSL_CTRL_SET_TMP_DH_CB 5 - -#define SSL_CTRL_GET_SESSION_REUSED 6 -#define SSL_CTRL_GET_CLIENT_CERT_REQUEST 7 -#define SSL_CTRL_GET_NUM_RENEGOTIATIONS 8 -#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 9 -#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 10 -#define SSL_CTRL_GET_FLAGS 11 -#define SSL_CTRL_EXTRA_CHAIN_CERT 12 - -#define SSL_CTRL_SET_MSG_CALLBACK 13 -#define SSL_CTRL_SET_MSG_CALLBACK_ARG 14 +#define SSL_CTRL_SET_TMP_ECDH 4 +#define SSL_CTRL_SET_TMP_RSA_CB 5 +#define SSL_CTRL_SET_TMP_DH_CB 6 +#define SSL_CTRL_SET_TMP_ECDH_CB 7 + +#define SSL_CTRL_GET_SESSION_REUSED 8 +#define SSL_CTRL_GET_CLIENT_CERT_REQUEST 9 +#define SSL_CTRL_GET_NUM_RENEGOTIATIONS 10 +#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11 +#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12 +#define SSL_CTRL_GET_FLAGS 13 +#define SSL_CTRL_EXTRA_CHAIN_CERT 14 + +#define SSL_CTRL_SET_MSG_CALLBACK 15 +#define SSL_CTRL_SET_MSG_CALLBACK_ARG 16 /* Stats */ #define SSL_CTRL_SESS_NUMBER 20 @@ -1129,6 +1139,8 @@ size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count); SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa) #define SSL_CTX_set_tmp_dh(ctx,dh) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh) +#define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \ + SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh) #define SSL_need_tmp_RSA(ssl) \ SSL_ctrl(ssl,SSL_CTRL_NEED_TMP_RSA,0,NULL) @@ -1136,6 +1148,8 @@ size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count); SSL_ctrl(ssl,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa) #define SSL_set_tmp_dh(ssl,dh) \ SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)dh) +#define SSL_set_tmp_ecdh(ssl,ecdh) \ + SSL_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh) #define SSL_CTX_add_extra_chain_cert(ctx,x509) \ SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509) @@ -1445,6 +1459,14 @@ void SSL_set_tmp_dh_callback(SSL *ssl, DH *(*dh)(SSL *ssl,int is_export, int keylength)); #endif +#ifndef OPENSSL_NO_ECDH +void SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx, + EC_KEY *(*ecdh)(SSL *ssl,int is_export, + int keylength)); +void SSL_set_tmp_ecdh_callback(SSL *ssl, + EC_KEY *(*ecdh)(SSL *ssl,int is_export, + int keylength)); +#endif #ifndef OPENSSL_NO_COMP int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm); @@ -1462,6 +1484,7 @@ void ERR_load_SSL_strings(void); /* Function codes. */ #define SSL_F_CLIENT_CERTIFICATE 100 +#define SSL_F_CLIENT_FINISHED 238 #define SSL_F_CLIENT_HELLO 101 #define SSL_F_CLIENT_MASTER_KEY 102 #define SSL_F_D2I_SSL_SESSION 103 @@ -1475,7 +1498,9 @@ void ERR_load_SSL_strings(void); #define SSL_F_I2D_SSL_SESSION 111 #define SSL_F_READ_N 112 #define SSL_F_REQUEST_CERTIFICATE 113 +#define SSL_F_SERVER_FINISH 239 #define SSL_F_SERVER_HELLO 114 +#define SSL_F_SERVER_VERIFY 240 #define SSL_F_SSL23_ACCEPT 115 #define SSL_F_SSL23_CLIENT_HELLO 116 #define SSL_F_SSL23_CONNECT 117 @@ -1487,6 +1512,7 @@ void ERR_load_SSL_strings(void); #define SSL_F_SSL2_ACCEPT 122 #define SSL_F_SSL2_CONNECT 123 #define SSL_F_SSL2_ENC_INIT 124 +#define SSL_F_SSL2_GENERATE_KEY_MATERIAL 241 #define SSL_F_SSL2_PEEK 234 #define SSL_F_SSL2_READ 125 #define SSL_F_SSL2_READ_INTERNAL 236 @@ -1523,6 +1549,7 @@ void ERR_load_SSL_strings(void); #define SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE 152 #define SSL_F_SSL3_SEND_CLIENT_VERIFY 153 #define SSL_F_SSL3_SEND_SERVER_CERTIFICATE 154 +#define SSL_F_SSL3_SEND_SERVER_HELLO 242 #define SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE 155 #define SSL_F_SSL3_SETUP_BUFFERS 156 #define SSL_F_SSL3_SETUP_KEY_BLOCK 157 @@ -1614,6 +1641,9 @@ void ERR_load_SSL_strings(void); #define SSL_R_BAD_DH_P_LENGTH 110 #define SSL_R_BAD_DIGEST_LENGTH 111 #define SSL_R_BAD_DSA_SIGNATURE 112 +#define SSL_R_BAD_ECC_CERT 1117 +#define SSL_R_BAD_ECDSA_SIGNATURE 1112 +#define SSL_R_BAD_ECPOINT 1113 #define SSL_R_BAD_HELLO_REQUEST 105 #define SSL_R_BAD_LENGTH 271 #define SSL_R_BAD_MAC_DECODE 113 @@ -1654,6 +1684,7 @@ void ERR_load_SSL_strings(void); #define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC 1109 #define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148 #define SSL_R_DIGEST_CHECK_FAILED 149 +#define SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER 1119 #define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 150 #define SSL_R_ERROR_GENERATING_TMP_RSA_KEY 1092 #define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST 151 @@ -1667,6 +1698,7 @@ void ERR_load_SSL_strings(void); #define SSL_R_INVALID_COMMAND 280 #define SSL_R_INVALID_PURPOSE 278 #define SSL_R_INVALID_TRUST 279 +#define SSL_R_KEY_ARG_TOO_LONG 1112 #define SSL_R_KRB5 1104 #define SSL_R_KRB5_C_CC_PRINC 1094 #define SSL_R_KRB5_C_GET_CRED 1095 @@ -1693,6 +1725,7 @@ void ERR_load_SSL_strings(void); #define SSL_R_MISSING_RSA_ENCRYPTING_CERT 169 #define SSL_R_MISSING_RSA_SIGNING_CERT 170 #define SSL_R_MISSING_TMP_DH_KEY 171 +#define SSL_R_MISSING_TMP_ECDH_KEY 1114 #define SSL_R_MISSING_TMP_RSA_KEY 172 #define SSL_R_MISSING_TMP_RSA_PKEY 173 #define SSL_R_MISSING_VERIFY_MESSAGE 174 @@ -1746,6 +1779,8 @@ void ERR_load_SSL_strings(void); #define SSL_R_SHORT_READ 219 #define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220 #define SSL_R_SSL23_DOING_SESSION_ID_REUSE 221 +#define SSL_R_SSL2_CONNECTION_ID_TOO_LONG 1114 +#define SSL_R_SSL3_SESSION_ID_TOO_LONG 1113 #define SSL_R_SSL3_SESSION_ID_TOO_SHORT 222 #define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042 #define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020 @@ -1788,8 +1823,10 @@ void ERR_load_SSL_strings(void); #define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG 234 #define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER 235 #define SSL_R_UNABLE_TO_DECODE_DH_CERTS 236 +#define SSL_R_UNABLE_TO_DECODE_ECDH_CERTS 1115 #define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY 237 #define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS 238 +#define SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS 1116 #define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS 239 #define SSL_R_UNABLE_TO_FIND_SSL_METHOD 240 #define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES 241 @@ -1810,6 +1847,7 @@ void ERR_load_SSL_strings(void); #define SSL_R_UNKNOWN_STATE 255 #define SSL_R_UNSUPPORTED_CIPHER 256 #define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM 257 +#define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE 1118 #define SSL_R_UNSUPPORTED_OPTION 1091 #define SSL_R_UNSUPPORTED_PROTOCOL 258 #define SSL_R_UNSUPPORTED_SSL_VERSION 259 diff --git a/ssl/ssl3.h b/ssl/ssl3.h index 8fd6951d77..59211fef70 100644 --- a/ssl/ssl3.h +++ b/ssl/ssl3.h @@ -108,6 +108,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECC cipher suite support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #ifndef HEADER_SSL3_H #define HEADER_SSL3_H @@ -285,7 +290,12 @@ typedef struct ssl3_buffer_st #define SSL3_CT_RSA_EPHEMERAL_DH 5 #define SSL3_CT_DSS_EPHEMERAL_DH 6 #define SSL3_CT_FORTEZZA_DMS 20 -#define SSL3_CT_NUMBER 7 +/* SSL3_CT_NUMBER is used to size arrays and it must be large + * enough to contain all of the cert types defined either for + * SSLv3 and TLSv1. + */ +#define SSL3_CT_NUMBER 7 + #define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS 0x0001 #define SSL3_FLAGS_DELAY_CLIENT_FINISHED 0x0002 @@ -370,6 +380,11 @@ typedef struct ssl3_state_st #ifndef OPENSSL_NO_DH DH *dh; #endif + +#ifndef OPENSSL_NO_ECDH + EC_KEY *ecdh; /* holds short lived ECDH key */ +#endif + /* used when SSL_ST_FLUSH_DATA is entered */ int next_state; diff --git a/ssl/ssl_algs.c b/ssl/ssl_algs.c index 3d1299ee7b..7c8a451fc5 100644 --- a/ssl/ssl_algs.c +++ b/ssl/ssl_algs.c @@ -101,6 +101,9 @@ int SSL_library_init(void) EVP_add_digest_alias(SN_dsaWithSHA1,"DSS1"); EVP_add_digest_alias(SN_dsaWithSHA1,"dss1"); #endif +#ifndef OPENSSL_NO_ECDSA + EVP_add_digest(EVP_ecdsa()); +#endif /* If you want support for phased out ciphers, add the following */ #if 0 EVP_add_digest(EVP_sha()); diff --git a/ssl/ssl_asn1.c b/ssl/ssl_asn1.c index b1c2d17153..3723fc2e37 100644 --- a/ssl/ssl_asn1.c +++ b/ssl/ssl_asn1.c @@ -62,6 +62,7 @@ #include <openssl/asn1_mac.h> #include <openssl/objects.h> #include <openssl/x509.h> +#include "cryptlib.h" typedef struct ssl_session_asn1_st { @@ -293,7 +294,9 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp, i=SSL2_MAX_SSL_SESSION_ID_LENGTH; if (os.length > i) - os.length=i; + os.length = i; + if (os.length > sizeof ret->session_id) /* can't happen */ + os.length = sizeof ret->session_id; ret->session_id_length=os.length; memcpy(ret->session_id,os.data,os.length); diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index 263a1dc34d..c6dbc94d65 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -103,6 +103,11 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECC cipher suite support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <stdio.h> @@ -234,6 +239,15 @@ CERT *ssl_cert_dup(CERT *cert) ret->dh_tmp_cb = cert->dh_tmp_cb; #endif +#ifndef OPENSSL_NO_ECDH + if (cert->ecdh_tmp) + { + EC_KEY_up_ref(cert->ecdh_tmp); + ret->ecdh_tmp = cert->ecdh_tmp; + } + ret->ecdh_tmp_cb = cert->ecdh_tmp_cb; +#endif + for (i = 0; i < SSL_PKEY_NUM; i++) { if (cert->pkeys[i].x509 != NULL) @@ -268,7 +282,11 @@ CERT *ssl_cert_dup(CERT *cert) case SSL_PKEY_DH_DSA: /* We have a DH key. */ break; - + + case SSL_PKEY_ECC: + /* We have an ECC key */ + break; + default: /* Can't happen. */ SSLerr(SSL_F_SSL_CERT_DUP, SSL_R_LIBRARY_BUG); @@ -294,6 +312,10 @@ err: if (ret->dh_tmp != NULL) DH_free(ret->dh_tmp); #endif +#ifndef OPENSSL_NO_ECDH + if (ret->ecdh_tmp != NULL) + EC_KEY_free(ret->ecdh_tmp); +#endif for (i = 0; i < SSL_PKEY_NUM; i++) { @@ -333,6 +355,9 @@ void ssl_cert_free(CERT *c) #ifndef OPENSSL_NO_DH if (c->dh_tmp) DH_free(c->dh_tmp); #endif +#ifndef OPENSSL_NO_ECDH + if (c->ecdh_tmp) EC_KEY_free(c->ecdh_tmp); +#endif for (i=0; i<SSL_PKEY_NUM; i++) { @@ -439,6 +464,10 @@ void ssl_sess_cert_free(SESS_CERT *sc) if (sc->peer_dh_tmp != NULL) DH_free(sc->peer_dh_tmp); #endif +#ifndef OPENSSL_NO_ECDH + if (sc->peer_ecdh_tmp != NULL) + EC_KEY_free(sc->peer_ecdh_tmp); +#endif OPENSSL_free(sc); } diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 37f58886a6..0660275422 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -55,7 +55,11 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ - +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECC cipher suite support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <stdio.h> #include <openssl/objects.h> #include <openssl/comp.h> @@ -101,18 +105,20 @@ typedef struct cipher_order_st static const SSL_CIPHER cipher_aliases[]={ /* Don't include eNULL unless specifically enabled. */ - {0,SSL_TXT_ALL, 0,SSL_ALL & ~SSL_eNULL, SSL_ALL ,0,0,0,SSL_ALL,SSL_ALL}, /* must be first */ - {0,SSL_TXT_CMPALL,0,SSL_eNULL,0,0,0,0,SSL_ENC_MASK,0}, /* COMPLEMENT OF ALL */ + /* Don't include ECC in ALL because these ciphers are not yet official. */ + {0,SSL_TXT_ALL, 0,SSL_ALL & ~SSL_eNULL & ~SSL_kECDH & ~SSL_kECDHE, SSL_ALL ,0,0,0,SSL_ALL,SSL_ALL}, /* must be first */ + /* TODO: COMPLEMENT OF ALL and COMPLEMENT OF DEFAULT do not have ECC cipher suites handled properly. */ + {0,SSL_TXT_CMPALL,0,SSL_eNULL,0,0,0,0,SSL_ENC_MASK,0}, /* COMPLEMENT OF ALL */ {0,SSL_TXT_CMPDEF,0,SSL_ADH, 0,0,0,0,SSL_AUTH_MASK,0}, - {0,SSL_TXT_kKRB5,0,SSL_kKRB5,0,0,0,0,SSL_MKEY_MASK,0}, /* VRS Kerberos5 */ + {0,SSL_TXT_kKRB5,0,SSL_kKRB5,0,0,0,0,SSL_MKEY_MASK,0}, /* VRS Kerberos5 */ {0,SSL_TXT_kRSA,0,SSL_kRSA, 0,0,0,0,SSL_MKEY_MASK,0}, {0,SSL_TXT_kDHr,0,SSL_kDHr, 0,0,0,0,SSL_MKEY_MASK,0}, {0,SSL_TXT_kDHd,0,SSL_kDHd, 0,0,0,0,SSL_MKEY_MASK,0}, {0,SSL_TXT_kEDH,0,SSL_kEDH, 0,0,0,0,SSL_MKEY_MASK,0}, {0,SSL_TXT_kFZA,0,SSL_kFZA, 0,0,0,0,SSL_MKEY_MASK,0}, {0,SSL_TXT_DH, 0,SSL_DH, 0,0,0,0,SSL_MKEY_MASK,0}, + {0,SSL_TXT_ECC, 0,(SSL_kECDH|SSL_kECDHE), 0,0,0,0,SSL_MKEY_MASK,0}, {0,SSL_TXT_EDH, 0,SSL_EDH, 0,0,0,0,SSL_MKEY_MASK|SSL_AUTH_MASK,0}, - {0,SSL_TXT_aKRB5,0,SSL_aKRB5,0,0,0,0,SSL_AUTH_MASK,0}, /* VRS Kerberos5 */ {0,SSL_TXT_aRSA,0,SSL_aRSA, 0,0,0,0,SSL_AUTH_MASK,0}, {0,SSL_TXT_aDSS,0,SSL_aDSS, 0,0,0,0,SSL_AUTH_MASK,0}, @@ -314,7 +320,9 @@ static unsigned long ssl_cipher_get_disabled(void) #ifdef OPENSSL_NO_KRB5 mask |= SSL_kKRB5|SSL_aKRB5; #endif - +#ifdef OPENSSL_NO_ECDH + mask |= SSL_kECDH|SSL_kECDHE; +#endif #ifdef SSL_FORBID_ENULL mask |= SSL_eNULL; #endif @@ -916,7 +924,7 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len) pkl=SSL_C_EXPORT_PKEYLENGTH(cipher); kl=SSL_C_EXPORT_KEYLENGTH(cipher); exp=is_export?" export":""; - + if (alg & SSL_SSLV2) ver="SSLv2"; else if (alg & SSL_SSLV3) @@ -945,6 +953,10 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len) case SSL_kEDH: kx=is_export?(pkl == 512 ? "DH(512)" : "DH(1024)"):"DH"; break; + case SSL_kECDH: + case SSL_kECDHE: + kx=is_export?"ECDH(<=163)":"ECDH"; + break; default: kx="unknown"; } @@ -968,6 +980,9 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len) case SSL_aNULL: au="None"; break; + case SSL_aECDSA: + au="ECDSA"; + break; default: au="unknown"; break; diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c index c32c4ef6e9..18aea72f13 100644 --- a/ssl/ssl_err.c +++ b/ssl/ssl_err.c @@ -1,6 +1,6 @@ /* ssl/ssl_err.c */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -67,6 +67,7 @@ static ERR_STRING_DATA SSL_str_functs[]= { {ERR_PACK(0,SSL_F_CLIENT_CERTIFICATE,0), "CLIENT_CERTIFICATE"}, +{ERR_PACK(0,SSL_F_CLIENT_FINISHED,0), "CLIENT_FINISHED"}, {ERR_PACK(0,SSL_F_CLIENT_HELLO,0), "CLIENT_HELLO"}, {ERR_PACK(0,SSL_F_CLIENT_MASTER_KEY,0), "CLIENT_MASTER_KEY"}, {ERR_PACK(0,SSL_F_D2I_SSL_SESSION,0), "d2i_SSL_SESSION"}, @@ -80,7 +81,9 @@ static ERR_STRING_DATA SSL_str_functs[]= {ERR_PACK(0,SSL_F_I2D_SSL_SESSION,0), "i2d_SSL_SESSION"}, {ERR_PACK(0,SSL_F_READ_N,0), "READ_N"}, {ERR_PACK(0,SSL_F_REQUEST_CERTIFICATE,0), "REQUEST_CERTIFICATE"}, +{ERR_PACK(0,SSL_F_SERVER_FINISH,0), "SERVER_FINISH"}, {ERR_PACK(0,SSL_F_SERVER_HELLO,0), "SERVER_HELLO"}, +{ERR_PACK(0,SSL_F_SERVER_VERIFY,0), "SERVER_VERIFY"}, {ERR_PACK(0,SSL_F_SSL23_ACCEPT,0), "SSL23_ACCEPT"}, {ERR_PACK(0,SSL_F_SSL23_CLIENT_HELLO,0), "SSL23_CLIENT_HELLO"}, {ERR_PACK(0,SSL_F_SSL23_CONNECT,0), "SSL23_CONNECT"}, @@ -92,6 +95,7 @@ static ERR_STRING_DATA SSL_str_functs[]= {ERR_PACK(0,SSL_F_SSL2_ACCEPT,0), "SSL2_ACCEPT"}, {ERR_PACK(0,SSL_F_SSL2_CONNECT,0), "SSL2_CONNECT"}, {ERR_PACK(0,SSL_F_SSL2_ENC_INIT,0), "SSL2_ENC_INIT"}, +{ERR_PACK(0,SSL_F_SSL2_GENERATE_KEY_MATERIAL,0), "SSL2_GENERATE_KEY_MATERIAL"}, {ERR_PACK(0,SSL_F_SSL2_PEEK,0), "SSL2_PEEK"}, {ERR_PACK(0,SSL_F_SSL2_READ,0), "SSL2_READ"}, {ERR_PACK(0,SSL_F_SSL2_READ_INTERNAL,0), "SSL2_READ_INTERNAL"}, @@ -128,6 +132,7 @@ static ERR_STRING_DATA SSL_str_functs[]= {ERR_PACK(0,SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,0), "SSL3_SEND_CLIENT_KEY_EXCHANGE"}, {ERR_PACK(0,SSL_F_SSL3_SEND_CLIENT_VERIFY,0), "SSL3_SEND_CLIENT_VERIFY"}, {ERR_PACK(0,SSL_F_SSL3_SEND_SERVER_CERTIFICATE,0), "SSL3_SEND_SERVER_CERTIFICATE"}, +{ERR_PACK(0,SSL_F_SSL3_SEND_SERVER_HELLO,0), "SSL3_SEND_SERVER_HELLO"}, {ERR_PACK(0,SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,0), "SSL3_SEND_SERVER_KEY_EXCHANGE"}, {ERR_PACK(0,SSL_F_SSL3_SETUP_BUFFERS,0), "SSL3_SETUP_BUFFERS"}, {ERR_PACK(0,SSL_F_SSL3_SETUP_KEY_BLOCK,0), "SSL3_SETUP_KEY_BLOCK"}, @@ -222,6 +227,9 @@ static ERR_STRING_DATA SSL_str_reasons[]= {SSL_R_BAD_DH_P_LENGTH ,"bad dh p length"}, {SSL_R_BAD_DIGEST_LENGTH ,"bad digest length"}, {SSL_R_BAD_DSA_SIGNATURE ,"bad dsa signature"}, +{SSL_R_BAD_ECC_CERT ,"bad ecc cert"}, +{SSL_R_BAD_ECDSA_SIGNATURE ,"bad ecdsa signature"}, +{SSL_R_BAD_ECPOINT ,"bad ecpoint"}, {SSL_R_BAD_HELLO_REQUEST ,"bad hello request"}, {SSL_R_BAD_LENGTH ,"bad length"}, {SSL_R_BAD_MAC_DECODE ,"bad mac decode"}, @@ -262,6 +270,7 @@ static ERR_STRING_DATA SSL_str_reasons[]= {SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC,"decryption failed or bad record mac"}, {SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG ,"dh public value length is wrong"}, {SSL_R_DIGEST_CHECK_FAILED ,"digest check failed"}, +{SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER ,"ecgroup too large for cipher"}, {SSL_R_ENCRYPTED_LENGTH_TOO_LONG ,"encrypted length too long"}, {SSL_R_ERROR_GENERATING_TMP_RSA_KEY ,"error generating tmp rsa key"}, {SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST ,"error in received cipher list"}, @@ -275,6 +284,7 @@ static ERR_STRING_DATA SSL_str_reasons[]= {SSL_R_INVALID_COMMAND ,"invalid command"}, {SSL_R_INVALID_PURPOSE ,"invalid purpose"}, {SSL_R_INVALID_TRUST ,"invalid trust"}, +{SSL_R_KEY_ARG_TOO_LONG ,"key arg too long"}, {SSL_R_KRB5 ,"krb5"}, {SSL_R_KRB5_C_CC_PRINC ,"krb5 client cc principal (no tkt?)"}, {SSL_R_KRB5_C_GET_CRED ,"krb5 client get cred"}, @@ -301,6 +311,7 @@ static ERR_STRING_DATA SSL_str_reasons[]= {SSL_R_MISSING_RSA_ENCRYPTING_CERT ,"missing rsa encrypting cert"}, {SSL_R_MISSING_RSA_SIGNING_CERT ,"missing rsa signing cert"}, {SSL_R_MISSING_TMP_DH_KEY ,"missing tmp dh key"}, +{SSL_R_MISSING_TMP_ECDH_KEY ,"missing tmp ecdh key"}, {SSL_R_MISSING_TMP_RSA_KEY ,"missing tmp rsa key"}, {SSL_R_MISSING_TMP_RSA_PKEY ,"missing tmp rsa pkey"}, {SSL_R_MISSING_VERIFY_MESSAGE ,"missing verify message"}, @@ -354,6 +365,8 @@ static ERR_STRING_DATA SSL_str_reasons[]= {SSL_R_SHORT_READ ,"short read"}, {SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE,"signature for non signing certificate"}, {SSL_R_SSL23_DOING_SESSION_ID_REUSE ,"ssl23 doing session id reuse"}, +{SSL_R_SSL2_CONNECTION_ID_TOO_LONG ,"ssl2 connection id too long"}, +{SSL_R_SSL3_SESSION_ID_TOO_LONG ,"ssl3 session id too long"}, {SSL_R_SSL3_SESSION_ID_TOO_SHORT ,"ssl3 session id too short"}, {SSL_R_SSLV3_ALERT_BAD_CERTIFICATE ,"sslv3 alert bad certificate"}, {SSL_R_SSLV3_ALERT_BAD_RECORD_MAC ,"sslv3 alert bad record mac"}, @@ -396,8 +409,10 @@ static ERR_STRING_DATA SSL_str_reasons[]= {SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG,"tls rsa encrypted value length is wrong"}, {SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER ,"tried to use unsupported cipher"}, {SSL_R_UNABLE_TO_DECODE_DH_CERTS ,"unable to decode dh certs"}, +{SSL_R_UNABLE_TO_DECODE_ECDH_CERTS ,"unable to decode ecdh certs"}, {SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY ,"unable to extract public key"}, {SSL_R_UNABLE_TO_FIND_DH_PARAMETERS ,"unable to find dh parameters"}, +{SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS ,"unable to find ecdh parameters"}, {SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS,"unable to find public key parameters"}, {SSL_R_UNABLE_TO_FIND_SSL_METHOD ,"unable to find ssl method"}, {SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES ,"unable to load ssl2 md5 routines"}, @@ -418,6 +433,7 @@ static ERR_STRING_DATA SSL_str_reasons[]= {SSL_R_UNKNOWN_STATE ,"unknown state"}, {SSL_R_UNSUPPORTED_CIPHER ,"unsupported cipher"}, {SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM ,"unsupported compression algorithm"}, +{SSL_R_UNSUPPORTED_ELLIPTIC_CURVE ,"unsupported elliptic curve"}, {SSL_R_UNSUPPORTED_OPTION ,"unsupported option"}, {SSL_R_UNSUPPORTED_PROTOCOL ,"unsupported protocol"}, {SSL_R_UNSUPPORTED_SSL_VERSION ,"unsupported ssl version"}, diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index ab172aeaec..eda3cfd116 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -110,7 +110,11 @@ * Hudson (tjh@cryptsoft.com). * */ - +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECC cipher suite support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #ifdef REF_CHECK # include <assert.h> @@ -1467,6 +1471,10 @@ void ssl_set_cert_masks(CERT *c, SSL_CIPHER *cipher) int rsa_enc_export,dh_rsa_export,dh_dsa_export; int rsa_tmp_export,dh_tmp_export,kl; unsigned long mask,emask; + int have_ecc_cert, have_ecdh_tmp, ecdh_ok, ecdsa_ok, ecc_pkey_size; + X509 *x = NULL; + EVP_PKEY *ecc_pkey = NULL; + int signature_nid = 0; if (c == NULL) return; @@ -1487,6 +1495,9 @@ void ssl_set_cert_masks(CERT *c, SSL_CIPHER *cipher) dh_tmp=dh_tmp_export=0; #endif +#ifndef OPENSSL_NO_ECDH + have_ecdh_tmp=(c->ecdh_tmp != NULL || c->ecdh_tmp_cb != NULL); +#endif cpk= &(c->pkeys[SSL_PKEY_RSA_ENC]); rsa_enc= (cpk->x509 != NULL && cpk->privatekey != NULL); rsa_enc_export=(rsa_enc && EVP_PKEY_size(cpk->privatekey)*8 <= kl); @@ -1501,7 +1512,8 @@ void ssl_set_cert_masks(CERT *c, SSL_CIPHER *cipher) /* FIX THIS EAY EAY EAY */ dh_dsa= (cpk->x509 != NULL && cpk->privatekey != NULL); dh_dsa_export=(dh_dsa && EVP_PKEY_size(cpk->privatekey)*8 <= kl); - + cpk= &(c->pkeys[SSL_PKEY_ECC]); + have_ecc_cert= (cpk->x509 != NULL && cpk->privatekey != NULL); mask=0; emask=0; @@ -1541,7 +1553,7 @@ void ssl_set_cert_masks(CERT *c, SSL_CIPHER *cipher) if (rsa_enc || rsa_sign) { mask|=SSL_aRSA; - emask|=SSL_aRSA; + mask|=SSL_aRSA; } if (dsa_sign) @@ -1558,11 +1570,127 @@ void ssl_set_cert_masks(CERT *c, SSL_CIPHER *cipher) emask|=SSL_kKRB5|SSL_aKRB5; #endif + /* An ECC certificate may be usable for ECDH and/or + * ECDSA cipher suites depending on the key usage extension. + */ + if (have_ecc_cert) + { + /* This call populates extension flags (ex_flags) */ + x = (c->pkeys[SSL_PKEY_ECC]).x509; + X509_check_purpose(x, -1, 0); + ecdh_ok = (x->ex_flags & EXFLAG_KUSAGE) ? + (x->ex_kusage & X509v3_KU_KEY_AGREEMENT) : 1; + ecdsa_ok = (x->ex_flags & EXFLAG_KUSAGE) ? + (x->ex_kusage & X509v3_KU_DIGITAL_SIGNATURE) : 1; + ecc_pkey = X509_get_pubkey(x); + ecc_pkey_size = (ecc_pkey != NULL) ? + EVP_PKEY_bits(ecc_pkey) : 0; + EVP_PKEY_free(ecc_pkey); + if ((x->sig_alg) && (x->sig_alg->algorithm)) + signature_nid = OBJ_obj2nid(x->sig_alg->algorithm); +#ifndef OPENSSL_NO_ECDH + if (ecdh_ok) + { + if ((signature_nid == NID_md5WithRSAEncryption) || + (signature_nid == NID_md4WithRSAEncryption) || + (signature_nid == NID_md2WithRSAEncryption)) + { + mask|=SSL_kECDH|SSL_aRSA; + if (ecc_pkey_size <= 163) + emask|=SSL_kECDH|SSL_aRSA; + } + if (signature_nid == NID_ecdsa_with_SHA1) + { + mask|=SSL_kECDH|SSL_aECDSA; + if (ecc_pkey_size <= 163) + emask|=SSL_kECDH|SSL_aECDSA; + } + } +#endif +#ifndef OPENSSL_NO_ECDSA + if (ecdsa_ok) + { + mask|=SSL_aECDSA; + emask|=SSL_aECDSA; + } +#endif + } + +#ifndef OPENSSL_NO_ECDH + if (have_ecdh_tmp) + { + mask|=SSL_kECDHE; + emask|=SSL_kECDHE; + } +#endif c->mask=mask; c->export_mask=emask; c->valid=1; } +/* This handy macro borrowed from crypto/x509v3/v3_purp.c */ +#define ku_reject(x, usage) \ + (((x)->ex_flags & EXFLAG_KUSAGE) && !((x)->ex_kusage & (usage))) + +int check_srvr_ecc_cert_and_alg(X509 *x, SSL_CIPHER *cs) + { + unsigned long alg = cs->algorithms; + EVP_PKEY *pkey = NULL; + int keysize = 0; + int signature_nid = 0; + + if (SSL_C_IS_EXPORT(cs)) + { + /* ECDH key length in export ciphers must be <= 163 bits */ + pkey = X509_get_pubkey(x); + if (pkey == NULL) return 0; + keysize = EVP_PKEY_bits(pkey); + EVP_PKEY_free(pkey); + if (keysize > 163) return 0; + } + + /* This call populates the ex_flags field correctly */ + X509_check_purpose(x, -1, 0); + if ((x->sig_alg) && (x->sig_alg->algorithm)) + signature_nid = OBJ_obj2nid(x->sig_alg->algorithm); + if (alg & SSL_kECDH) + { + /* key usage, if present, must allow key agreement */ + if (ku_reject(x, X509v3_KU_KEY_AGREEMENT)) + { + return 0; + } + if (alg & SSL_aECDSA) + { + /* signature alg must be ECDSA */ + if (signature_nid != NID_ecdsa_with_SHA1) + { + return 0; + } + } + if (alg & SSL_aRSA) + { + /* signature alg must be RSA */ + if ((signature_nid != NID_md5WithRSAEncryption) && + (signature_nid != NID_md4WithRSAEncryption) && + (signature_nid != NID_md2WithRSAEncryption)) + { + return 0; + } + } + } + else if (alg & SSL_aECDSA) + { + /* key usage, if present, must allow signing */ + if (ku_reject(x, X509v3_KU_DIGITAL_SIGNATURE)) + { + return 0; + } + } + + return 1; /* all checks are ok */ + } + /* THIS NEEDS CLEANING UP */ X509 *ssl_get_server_send_cert(SSL *s) { @@ -1577,7 +1705,26 @@ X509 *ssl_get_server_send_cert(SSL *s) mask=is_export?c->export_mask:c->mask; kalg=alg&(SSL_MKEY_MASK|SSL_AUTH_MASK); - if (kalg & SSL_kDHr) + if (kalg & SSL_kECDH) + { + /* we don't need to look at SSL_kECDHE + * since no certificate is needed for + * anon ECDH and for authenticated + * ECDHE, the check for the auth + * algorithm will set i correctly + * NOTE: For ECDH-RSA, we need an ECC + * not an RSA cert but for ECDHE-RSA + * we need an RSA cert. Placing the + * checks for SSL_kECDH before RSA + * checks ensures the correct cert is chosen. + */ + i=SSL_PKEY_ECC; + } + else if (kalg & SSL_aECDSA) + { + i=SSL_PKEY_ECC; + } + else if (kalg & SSL_kDHr) i=SSL_PKEY_DH_RSA; else if (kalg & SSL_kDHd) i=SSL_PKEY_DH_DSA; @@ -1601,6 +1748,7 @@ X509 *ssl_get_server_send_cert(SSL *s) return(NULL); } if (c->pkeys[i].x509 == NULL) return(NULL); + return(c->pkeys[i].x509); } @@ -1624,6 +1772,9 @@ EVP_PKEY *ssl_get_sign_pkey(SSL *s,SSL_CIPHER *cipher) else return(NULL); } + else if ((alg & SSL_aECDSA) && + (c->pkeys[SSL_PKEY_ECC].privatekey != NULL)) + return(c->pkeys[SSL_PKEY_ECC].privatekey); else /* if (alg & SSL_aNULL) */ { SSLerr(SSL_F_SSL_GET_SIGN_PKEY,ERR_R_INTERNAL_ERROR); @@ -2271,6 +2422,20 @@ void SSL_set_tmp_dh_callback(SSL *ssl,DH *(*dh)(SSL *ssl,int is_export, } #endif +#ifndef OPENSSL_NO_ECDH +void SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx,EC_KEY *(*ecdh)(SSL *ssl,int is_export, + int keylength)) + { + SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH_CB,(void (*)())ecdh); + } + +void SSL_set_tmp_ecdh_callback(SSL *ssl,EC_KEY *(*ecdh)(SSL *ssl,int is_export, + int keylength)) + { + SSL_callback_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH_CB,(void (*)())ecdh); + } +#endif + void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)) { diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h index fe4ac839cf..4adf5f5b1c 100644 --- a/ssl/ssl_locl.h +++ b/ssl/ssl_locl.h @@ -108,6 +108,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECC cipher suite support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #ifndef HEADER_SSL_LOCL_H #define HEADER_SSL_LOCL_H @@ -227,52 +232,56 @@ * that the different entities within are mutually exclusive: * ONLY ONE BIT PER MASK CAN BE SET AT A TIME. */ -#define SSL_MKEY_MASK 0x0000003FL +#define SSL_MKEY_MASK 0x000000FFL #define SSL_kRSA 0x00000001L /* RSA key exchange */ #define SSL_kDHr 0x00000002L /* DH cert RSA CA cert */ #define SSL_kDHd 0x00000004L /* DH cert DSA CA cert */ #define SSL_kFZA 0x00000008L #define SSL_kEDH 0x00000010L /* tmp DH key no DH cert */ #define SSL_kKRB5 0x00000020L /* Kerberos5 key exchange */ +#define SSL_kECDH 0x00000040L /* ECDH w/ long-term keys */ +#define SSL_kECDHE 0x00000080L /* ephemeral ECDH */ #define SSL_EDH (SSL_kEDH|(SSL_AUTH_MASK^SSL_aNULL)) -#define SSL_AUTH_MASK 0x00000FC0L -#define SSL_aRSA 0x00000040L /* Authenticate with RSA */ -#define SSL_aDSS 0x00000080L /* Authenticate with DSS */ +#define SSL_AUTH_MASK 0x00007F00L +#define SSL_aRSA 0x00000100L /* Authenticate with RSA */ +#define SSL_aDSS 0x00000200L /* Authenticate with DSS */ #define SSL_DSS SSL_aDSS -#define SSL_aFZA 0x00000100L -#define SSL_aNULL 0x00000200L /* no Authenticate, ADH */ -#define SSL_aDH 0x00000400L /* no Authenticate, ADH */ -#define SSL_aKRB5 0x00000800L /* Authenticate with KRB5 */ +#define SSL_aFZA 0x00000400L +#define SSL_aNULL 0x00000800L /* no Authenticate, ADH */ +#define SSL_aDH 0x00001000L /* no Authenticate, ADH */ +#define SSL_aKRB5 0x00002000L /* Authenticate with KRB5 */ +#define SSL_aECDSA 0x00004000L /* Authenticate with ECDSA */ #define SSL_NULL (SSL_eNULL) #define SSL_ADH (SSL_kEDH|SSL_aNULL) #define SSL_RSA (SSL_kRSA|SSL_aRSA) #define SSL_DH (SSL_kDHr|SSL_kDHd|SSL_kEDH) +#define SSL_ECDH (SSL_kECDH|SSL_kECDHE) #define SSL_FZA (SSL_aFZA|SSL_kFZA|SSL_eFZA) #define SSL_KRB5 (SSL_kKRB5|SSL_aKRB5) -#define SSL_ENC_MASK 0x0087F000L -#define SSL_DES 0x00001000L -#define SSL_3DES 0x00002000L -#define SSL_RC4 0x00004000L -#define SSL_RC2 0x00008000L -#define SSL_IDEA 0x00010000L -#define SSL_eFZA 0x00020000L -#define SSL_eNULL 0x00040000L -#define SSL_AES 0x00800000L - -#define SSL_MAC_MASK 0x00180000L -#define SSL_MD5 0x00080000L -#define SSL_SHA1 0x00100000L +#define SSL_ENC_MASK 0x043F8000L +#define SSL_DES 0x00008000L +#define SSL_3DES 0x00010000L +#define SSL_RC4 0x00020000L +#define SSL_RC2 0x00040000L +#define SSL_IDEA 0x00080000L +#define SSL_eFZA 0x00100000L +#define SSL_eNULL 0x00200000L +#define SSL_AES 0x04000000L + +#define SSL_MAC_MASK 0x00c00000L +#define SSL_MD5 0x00400000L +#define SSL_SHA1 0x00800000L #define SSL_SHA (SSL_SHA1) -#define SSL_SSL_MASK 0x00600000L -#define SSL_SSLV2 0x00200000L -#define SSL_SSLV3 0x00400000L +#define SSL_SSL_MASK 0x03000000L +#define SSL_SSLV2 0x01000000L +#define SSL_SSLV3 0x02000000L #define SSL_TLSV1 SSL_SSLV3 /* for now */ -/* we have used 007fffff - 9 bits left to go */ +/* we have used 07ffffff - 5 bits left to go. */ /* * Export and cipher strength information. For each cipher we have to decide @@ -344,7 +353,8 @@ #define SSL_PKEY_DSA_SIGN 2 #define SSL_PKEY_DH_RSA 3 #define SSL_PKEY_DH_DSA 4 -#define SSL_PKEY_NUM 5 +#define SSL_PKEY_ECC 5 +#define SSL_PKEY_NUM 6 /* SSL_kRSA <- RSA_ENC | (RSA_TMP & RSA_SIGN) | * <- (EXPORT & (RSA_ENC | RSA_TMP) & RSA_SIGN) @@ -360,6 +370,15 @@ #define CERT_PRIVATE_KEY 2 */ +#ifndef OPENSSL_NO_EC +/* From ECC-TLS draft, used in encoding the curve type in + * ECParameters + */ +#define EXPLICIT_PRIME_CURVE_TYPE 1 +#define EXPLICIT_CHAR2_CURVE_TYPE 2 +#define NAMED_CURVE_TYPE 3 +#endif /* OPENSSL_NO_EC */ + typedef struct cert_pkey_st { X509 *x509; @@ -386,6 +405,11 @@ typedef struct cert_st DH *dh_tmp; DH *(*dh_tmp_cb)(SSL *ssl,int is_export,int keysize); #endif +#ifndef OPENSSL_NO_ECDH + EC_KEY *ecdh_tmp; + /* Callback for generating ephemeral ECDH keys */ + EC_KEY *(*ecdh_tmp_cb)(SSL *ssl,int is_export,int keysize); +#endif CERT_PKEY pkeys[SSL_PKEY_NUM]; @@ -411,6 +435,9 @@ typedef struct sess_cert_st #ifndef OPENSSL_NO_DH DH *peer_dh_tmp; /* not used for SSL 2 */ #endif +#ifndef OPENSSL_NO_ECDH + EC_KEY *peer_ecdh_tmp; +#endif int references; /* actually always 1 at the moment */ } SESS_CERT; @@ -510,7 +537,7 @@ STACK_OF(SSL_CIPHER) *ssl_get_ciphers_by_id(SSL *s); int ssl_verify_alarm_type(long type); int ssl2_enc_init(SSL *s, int client); -void ssl2_generate_key_material(SSL *s); +int ssl2_generate_key_material(SSL *s); void ssl2_enc(SSL *s,int send_data); void ssl2_mac(SSL *s,unsigned char *mac,int send_data); SSL_CIPHER *ssl2_get_cipher_by_char(const unsigned char *p); @@ -613,6 +640,8 @@ int tls1_alert_code(int code); int ssl3_alert_code(int code); int ssl_ok(SSL *s); +int check_srvr_ecc_cert_and_alg(X509 *x, SSL_CIPHER *cs); + SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n); STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void); diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index 6424f775e2..ca1a7427be 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -60,6 +60,7 @@ #include <openssl/lhash.h> #include <openssl/rand.h> #include "ssl_locl.h" +#include "cryptlib.h" static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s); static void SSL_SESSION_list_add(SSL_CTX *ctx,SSL_SESSION *s); @@ -250,6 +251,12 @@ int ssl_get_new_session(SSL *s, int session) ss->session_id_length=0; } + if (s->sid_ctx_length > sizeof ss->sid_ctx) + { + SSLerr(SSL_F_SSL_GET_NEW_SESSION, ERR_R_INTERNAL_ERROR); + SSL_SESSION_free(ss); + return 0; + } memcpy(ss->sid_ctx,s->sid_ctx,s->sid_ctx_length); ss->sid_ctx_length=s->sid_ctx_length; s->session=ss; diff --git a/ssl/ssltest.c b/ssl/ssltest.c index 1afdfa7750..30473b5ff2 100644 --- a/ssl/ssltest.c +++ b/ssl/ssltest.c @@ -108,6 +108,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECC cipher suite support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #define _XOPEN_SOURCE 600 /* Or gethostname won't be declared properly on Linux and GNU platforms. */ @@ -201,6 +206,9 @@ static void sv_usage(void) fprintf(stderr," -dhe1024dsa - use 1024 bit key (with 160-bit subprime) for DHE\n"); fprintf(stderr," -no_dhe - disable DHE\n"); #endif +#ifndef OPENSSL_NO_ECDH + fprintf(stderr," -no_ecdhe - disable ECDHE\n"); +#endif #ifndef OPENSSL_NO_SSL2 fprintf(stderr," -ssl2 - use SSLv2\n"); #endif @@ -221,7 +229,12 @@ static void sv_usage(void) fprintf(stderr," -f - Test even cases that can't work\n"); fprintf(stderr," -time - measure processor time used by client and server\n"); fprintf(stderr," -zlib - use zlib compression\n"); - fprintf(stderr," -time - use rle compression\n"); + fprintf(stderr," -rle - use rle compression\n"); +#ifndef OPENSSL_NO_ECDH + fprintf(stderr," -named_curve arg - Elliptic curve name to use for ephemeral ECDH keys.\n" \ + " Use \"openssl ecparam -list_curves\" for all names\n" \ + " (default is sect163r2).\n"); +#endif } static void print_details(SSL *c_ssl, const char *prefix) @@ -345,6 +358,7 @@ int main(int argc, char *argv[]) char *server_key=NULL; char *client_cert=TEST_CLIENT_CERT; char *client_key=NULL; + char *named_curve = NULL; SSL_CTX *s_ctx=NULL; SSL_CTX *c_ctx=NULL; SSL_METHOD *meth=NULL; @@ -355,7 +369,11 @@ int main(int argc, char *argv[]) DH *dh; int dhe1024 = 0, dhe1024dsa = 0; #endif +#ifndef OPENSSL_NO_ECDH + EC_KEY *ecdh = NULL; +#endif int no_dhe = 0; + int no_ecdhe = 0; int print_time = 0; clock_t s_time = 0, c_time = 0; int comp = 0; @@ -408,6 +426,8 @@ int main(int argc, char *argv[]) #endif else if (strcmp(*argv,"-no_dhe") == 0) no_dhe=1; + else if (strcmp(*argv,"-no_ecdhe") == 0) + no_ecdhe=1; else if (strcmp(*argv,"-ssl2") == 0) ssl2=1; else if (strcmp(*argv,"-tls1") == 0) @@ -494,6 +514,13 @@ int main(int argc, char *argv[]) { comp = COMP_RLE; } +#ifndef OPENSSL_NO_ECDH + else if (strcmp(*argv,"-named_curve") == 0) + { + if (--argc < 1) goto bad; + named_curve = *(++argv); + } +#endif else if (strcmp(*argv,"-app_verify") == 0) { app_verify = 1; @@ -609,6 +636,44 @@ bad: (void)no_dhe; #endif +#ifndef OPENSSL_NO_ECDH + if (!no_ecdhe) + { + ecdh = EC_KEY_new(); + if (ecdh != NULL) + { + if (named_curve) + { + int nid = OBJ_sn2nid(named_curve); + + if (nid == 0) + { + BIO_printf(bio_err, "unknown curve name (%s)\n", named_curve); + EC_KEY_free(ecdh); + goto end; + } + + ecdh->group = EC_GROUP_new_by_nid(nid); + if (ecdh->group == NULL) + { + BIO_printf(bio_err, "unable to create curve (%s)\n", named_curve); + EC_KEY_free(ecdh); + goto end; + } + } + + if (ecdh->group == NULL) + ecdh->group=EC_GROUP_new_by_nid(NID_sect163r2); + + SSL_CTX_set_tmp_ecdh(s_ctx, ecdh); + SSL_CTX_set_options(s_ctx, SSL_OP_SINGLE_ECDH_USE); + EC_KEY_free(ecdh); + } + } +#else + (void)no_ecdhe; +#endif + #ifndef OPENSSL_NO_RSA SSL_CTX_set_tmp_rsa_callback(s_ctx,tmp_rsa_cb); #endif diff --git a/ssl/tls1.h b/ssl/tls1.h index 38838ea9a5..4d7c9a17b2 100644 --- a/ssl/tls1.h +++ b/ssl/tls1.h @@ -55,6 +55,32 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * ECC cipher suite support in OpenSSL originally written by + * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories. + * + */ #ifndef HEADER_TLS1_H #define HEADER_TLS1_H @@ -112,6 +138,48 @@ extern "C" { #define TLS1_CK_DHE_RSA_WITH_AES_256_SHA 0x03000039 #define TLS1_CK_ADH_WITH_AES_256_SHA 0x0300003A +/* ECC ciphersuites from draft-ietf-tls-ecc-01.txt (Mar 15, 2001). + * XXX NOTE: There is a bug in the draft, cipher numbers 4B, and 4C + * are defined twice so we define ECDH_ECDSA_EXPORT cipher + * suites to use 5B and 5C instead (this may change with future + * updates to the IETF draft). + */ +#define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x03000047 +#define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x03000048 +#define TLS1_CK_ECDH_ECDSA_WITH_DES_CBC_SHA 0x03000049 +#define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300004A +#define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0x0300004B +#define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0x0300004C +#define TLS1_CK_ECDH_ECDSA_EXPORT_WITH_RC4_40_SHA 0x0300005B +#define TLS1_CK_ECDH_ECDSA_EXPORT_WITH_RC4_56_SHA 0x0300005C + +#define TLS1_CK_ECDH_RSA_WITH_NULL_SHA 0x0300004D +#define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA 0x0300004E +#define TLS1_CK_ECDH_RSA_WITH_DES_CBC_SHA 0x0300004F +#define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA 0x03000050 +#define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA 0x03000051 +#define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA 0x03000052 +#define TLS1_CK_ECDH_RSA_EXPORT_WITH_RC4_40_SHA 0x03000053 +#define TLS1_CK_ECDH_RSA_EXPORT_WITH_RC4_56_SHA 0x03000054 + +#define TLS1_CK_ECDH_anon_WITH_NULL_SHA 0x03000055 +#define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA 0x03000056 +#define TLS1_CK_ECDH_anon_WITH_DES_CBC_SHA 0x03000057 +#define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA 0x03000058 +#define TLS1_CK_ECDH_anon_EXPORT_WITH_DES_40_CBC_SHA 0x03000059 +#define TLS1_CK_ECDH_anon_EXPORT_WITH_RC4_40_SHA 0x0300005A + +/* XXX: ECC ciphersuites offering forward secrecy are not yet specified + * in the ECC/TLS draft but our code allows them to be implemented + * very easily. To add such a cipher suite, one needs to add two constant + * definitions to this file and a new structure in s3_lib.c. We illustrate + * the process for the made-up ciphers ECDHE-ECDSA-AES128-SHA and + * ECDHE-RSA-AES128-SHA. + */ +#define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0x03000077 +#define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA 0x03000078 + + /* XXX * Inconsistency alert: * The OpenSSL names of ciphers with ephemeral DH here include the string @@ -142,12 +210,47 @@ extern "C" { #define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA" #define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA" +/* ECC ciphersuites from draft-ietf-tls-ecc-01.txt (Mar 15, 2001) */ +#define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA "ECDH-ECDSA-NULL-SHA" +#define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA "ECDH-ECDSA-RC4-SHA" +#define TLS1_TXT_ECDH_ECDSA_WITH_DES_CBC_SHA "ECDH-ECDSA-DES-CBC-SHA" +#define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA "ECDH-ECDSA-DES-CBC3-SHA" +#define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA "ECDH-ECDSA-AES128-SHA" +#define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA "ECDH-ECDSA-AES256-SHA" +#define TLS1_TXT_ECDH_ECDSA_EXPORT_WITH_RC4_40_SHA "EXP-ECDH-ECDSA-RC4-40-SHA" +#define TLS1_TXT_ECDH_ECDSA_EXPORT_WITH_RC4_56_SHA "EXP-ECDH-ECDSA-RC4-56-SHA" + +#define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA "ECDH-RSA-NULL-SHA" +#define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA "ECDH-RSA-RC4-SHA" +#define TLS1_TXT_ECDH_RSA_WITH_DES_CBC_SHA "ECDH-RSA-DES-CBC-SHA" +#define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA "ECDH-RSA-DES-CBC3-SHA" +#define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA "ECDH-RSA-AES128-SHA" +#define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA "ECDH-RSA-AES256-SHA" +#define TLS1_TXT_ECDH_RSA_EXPORT_WITH_RC4_40_SHA "EXP-ECDH-RSA-RC4-40-SHA" +#define TLS1_TXT_ECDH_RSA_EXPORT_WITH_RC4_56_SHA "EXP-ECDH-RSA-RC4-56-SHA" + +#define TLS1_TXT_ECDH_anon_WITH_NULL_SHA "AECDH-NULL-SHA" +#define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA "AECDH-RC4-SHA" +#define TLS1_TXT_ECDH_anon_WITH_DES_CBC_SHA "AECDH-DES-CBC-SHA" +#define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA "AECDH-DES-CBC3-SHA" +#define TLS1_TXT_ECDH_anon_EXPORT_WITH_DES_40_CBC_SHA "EXP-AECDH-DES-40-CBC-SHA" +#define TLS1_TXT_ECDH_anon_EXPORT_WITH_RC4_40_SHA "EXP-AECDH-RC4-40-SHA" + +/* XXX: Made-up ECC cipher suites offering forward secrecy. This is for + * illustration only. + */ +#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "ECDHE-ECDSA-AES128-SHA" +#define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA "ECDHE-RSA-AES128-SHA" + #define TLS_CT_RSA_SIGN 1 #define TLS_CT_DSS_SIGN 2 #define TLS_CT_RSA_FIXED_DH 3 #define TLS_CT_DSS_FIXED_DH 4 -#define TLS_CT_NUMBER 4 +#define TLS_CT_ECDSA_SIGN 5 +#define TLS_CT_RSA_FIXED_ECDH 6 +#define TLS_CT_ECDSA_FIXED_ECDH 7 +#define TLS_CT_NUMBER 7 #define TLS1_FINISH_MAC_LENGTH 12 @@ -193,3 +296,5 @@ extern "C" { #endif #endif + + diff --git a/test/Makefile.ssl b/test/Makefile.ssl index 6adc6b8c6d..c59412fcbe 100644 --- a/test/Makefile.ssl +++ b/test/Makefile.ssl @@ -34,6 +34,7 @@ LIBSSL= -L.. -lssl BNTEST= bntest ECTEST= ectest ECDSATEST= ecdsatest +ECDHTEST= ecdhtest EXPTEST= exptest IDEATEST= ideatest SHATEST= shatest @@ -61,7 +62,7 @@ EVPTEST= evp_test TESTS= alltests -EXE= $(BNTEST) $(ECTEST) $(ECDSATEST) $(IDEATEST) \ +EXE= $(BNTEST) $(ECTEST) $(ECDSATEST) $(ECDHTEST) $(IDEATEST) \ $(MD2TEST) $(MD4TEST) $(MD5TEST) $(HMACTEST) \ $(RC2TEST) $(RC4TEST) $(RC5TEST) \ $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ @@ -71,7 +72,7 @@ EXE= $(BNTEST) $(ECTEST) $(ECDSATEST) $(IDEATEST) \ # $(METHTEST) -OBJ= $(BNTEST).o $(ECTEST).o $(ECDSATEST).o $(IDEATEST).o \ +OBJ= $(BNTEST).o $(ECTEST).o $(ECDSATEST).o $(ECDHTEST).o $(IDEATEST).o \ $(MD2TEST).o $(MD4TEST).o $(MD5TEST).o \ $(HMACTEST).o \ $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ @@ -79,7 +80,7 @@ OBJ= $(BNTEST).o $(ECTEST).o $(ECDSATEST).o $(IDEATEST).o \ $(RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \ $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o \ $(EVPTEST).o -SRC= $(BNTEST).c $(ECTEST).c $(ECDSATEST).c $(IDEATEST).c \ +SRC= $(BNTEST).c $(ECTEST).c $(ECDSATEST).c $(ECDHTEST).c $(IDEATEST).c \ $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \ $(HMACTEST).c \ $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ @@ -130,7 +131,7 @@ alltests.chooser: \ test_des test_idea test_sha test_md4 test_md5 test_hmac \ test_md2 test_mdc2 \ test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_rd \ - test_rand test_bn test_ec test_ecdsa \ + test_rand test_bn test_ec test_ecdsa test_ecdh \ test_enc test_x509 test_rsa test_crl test_sid \ test_gen test_req test_pkcs7 test_verify test_dh test_dsa \ test_ss test_ca test_engine test_evp test_ssl @@ -230,6 +231,10 @@ test_ecdsa: @echo 'test ecdsa' ./$(ECDSATEST) +test_ecdh: + @echo 'test ecdh' + ./$(ECDHTEST) + test_verify: @echo "The following command should have some OK's and some failures" @echo "There are definitly a few expired certificates" @@ -372,6 +377,9 @@ $(EVPTEST): $(EVPTEST).o $(DLIBCRYPTO) $(ECDSATEST): $(ECDSATEST).o $(DLIBCRYPTO) $(CC) -o $(ECDSATEST) $(CFLAGS) $(ECDSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) +$(ECDHTEST): $(ECDHTEST).o $(DLIBCRYPTO) + $(CC) -o $(ECDHTEST) $(CFLAGS) $(ECDHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) + #$(RDTEST).o: $(RDTEST).c # $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(RDTEST).c @@ -386,13 +394,13 @@ dummytest: dummytest.o $(DLIBCRYPTO) bftest.o: ../include/openssl/blowfish.h ../include/openssl/e_os2.h bftest.o: ../include/openssl/opensslconf.h bftest.c bntest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -bntest.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -bntest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -bntest.o: ../include/openssl/buffer.h ../include/openssl/cast.h -bntest.o: ../include/openssl/crypto.h ../include/openssl/des.h -bntest.o: ../include/openssl/des_old.h ../include/openssl/dh.h -bntest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -bntest.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +bntest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +bntest.o: ../include/openssl/bn.h ../include/openssl/buffer.h +bntest.o: ../include/openssl/cast.h ../include/openssl/crypto.h +bntest.o: ../include/openssl/des.h ../include/openssl/des_old.h +bntest.o: ../include/openssl/dh.h ../include/openssl/dsa.h +bntest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +bntest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h bntest.o: ../include/openssl/err.h ../include/openssl/evp.h bntest.o: ../include/openssl/idea.h ../include/openssl/lhash.h bntest.o: ../include/openssl/md2.h ../include/openssl/md4.h @@ -421,25 +429,34 @@ dhtest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h dhtest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h dhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h dhtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h dhtest.c -dsatest.o: ../include/openssl/asn1.h ../include/openssl/asn1t.h -dsatest.o: ../include/openssl/bio.h ../include/openssl/bn.h -dsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h -dsatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -dsatest.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dsatest.o: ../include/openssl/asn1.h ../include/openssl/bio.h +dsatest.o: ../include/openssl/bn.h ../include/openssl/crypto.h +dsatest.o: ../include/openssl/dh.h ../include/openssl/dsa.h +dsatest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +dsatest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h dsatest.o: ../include/openssl/engine.h ../include/openssl/err.h dsatest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h dsatest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h dsatest.o: ../include/openssl/rand.h ../include/openssl/rsa.h dsatest.o: ../include/openssl/safestack.h ../include/openssl/stack.h dsatest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h dsatest.c +ecdhtest.o: ../include/openssl/asn1.h ../include/openssl/bio.h +ecdhtest.o: ../include/openssl/bn.h ../include/openssl/crypto.h +ecdhtest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ecdhtest.o: ../include/openssl/ecdh.h ../include/openssl/err.h +ecdhtest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +ecdhtest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h +ecdhtest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ecdhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h +ecdhtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h ecdhtest.c ecdsatest.o: ../include/openssl/aes.h ../include/openssl/asn1.h -ecdsatest.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ecdsatest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ecdsatest.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ecdsatest.o: ../include/openssl/crypto.h ../include/openssl/des.h -ecdsatest.o: ../include/openssl/des_old.h ../include/openssl/dh.h -ecdsatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -ecdsatest.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +ecdsatest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ecdsatest.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ecdsatest.o: ../include/openssl/cast.h ../include/openssl/crypto.h +ecdsatest.o: ../include/openssl/des.h ../include/openssl/des_old.h +ecdsatest.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ecdsatest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ecdsatest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h ecdsatest.o: ../include/openssl/engine.h ../include/openssl/err.h ecdsatest.o: ../include/openssl/evp.h ../include/openssl/idea.h ecdsatest.o: ../include/openssl/lhash.h ../include/openssl/md2.h @@ -455,22 +472,23 @@ ecdsatest.o: ../include/openssl/sha.h ../include/openssl/stack.h ecdsatest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h ecdsatest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h ecdsatest.o: ../include/openssl/x509_vfy.h ecdsatest.c -ectest.o: ../include/openssl/asn1.h ../include/openssl/asn1t.h -ectest.o: ../include/openssl/bio.h ../include/openssl/bn.h -ectest.o: ../include/openssl/crypto.h ../include/openssl/dh.h -ectest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -ectest.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +ectest.o: ../include/openssl/asn1.h ../include/openssl/bio.h +ectest.o: ../include/openssl/bn.h ../include/openssl/crypto.h +ectest.o: ../include/openssl/dh.h ../include/openssl/dsa.h +ectest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ectest.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h ectest.o: ../include/openssl/engine.h ../include/openssl/err.h -ectest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h -ectest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -ectest.o: ../include/openssl/rand.h ../include/openssl/rsa.h -ectest.o: ../include/openssl/safestack.h ../include/openssl/stack.h -ectest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h ectest.c -enginetest.o: ../include/openssl/asn1.h ../include/openssl/asn1t.h -enginetest.o: ../include/openssl/bio.h ../include/openssl/bn.h -enginetest.o: ../include/openssl/buffer.h ../include/openssl/crypto.h -enginetest.o: ../include/openssl/dh.h ../include/openssl/dsa.h -enginetest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ectest.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +ectest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ectest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h +ectest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +ectest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ectest.o: ../include/openssl/ui.h ectest.c +enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h +enginetest.o: ../include/openssl/bn.h ../include/openssl/buffer.h +enginetest.o: ../include/openssl/crypto.h ../include/openssl/dh.h +enginetest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +enginetest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h enginetest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h enginetest.o: ../include/openssl/err.h ../include/openssl/lhash.h enginetest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h @@ -479,13 +497,13 @@ enginetest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h enginetest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h enginetest.o: ../include/openssl/ui.h enginetest.c evp_test.o: ../include/openssl/aes.h ../include/openssl/asn1.h -evp_test.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -evp_test.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -evp_test.o: ../include/openssl/cast.h ../include/openssl/conf.h -evp_test.o: ../include/openssl/crypto.h ../include/openssl/des.h -evp_test.o: ../include/openssl/des_old.h ../include/openssl/dh.h -evp_test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -evp_test.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +evp_test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +evp_test.o: ../include/openssl/bn.h ../include/openssl/cast.h +evp_test.o: ../include/openssl/conf.h ../include/openssl/crypto.h +evp_test.o: ../include/openssl/des.h ../include/openssl/des_old.h +evp_test.o: ../include/openssl/dh.h ../include/openssl/dsa.h +evp_test.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +evp_test.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h evp_test.o: ../include/openssl/engine.h ../include/openssl/err.h evp_test.o: ../include/openssl/evp.h ../include/openssl/idea.h evp_test.o: ../include/openssl/lhash.h ../include/openssl/md2.h @@ -616,11 +634,11 @@ rmdtest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h rmdtest.o: ../include/openssl/safestack.h ../include/openssl/sha.h rmdtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h rmdtest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h rmdtest.c -rsa_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1t.h -rsa_test.o: ../include/openssl/bio.h ../include/openssl/bn.h -rsa_test.o: ../include/openssl/crypto.h ../include/openssl/dh.h -rsa_test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -rsa_test.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +rsa_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h +rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h +rsa_test.o: ../include/openssl/dh.h ../include/openssl/dsa.h +rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +rsa_test.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h rsa_test.o: ../include/openssl/engine.h ../include/openssl/err.h rsa_test.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h rsa_test.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h @@ -662,13 +680,13 @@ shatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h shatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h shatest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h shatest.c ssltest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h -ssltest.o: ../include/openssl/asn1t.h ../include/openssl/bio.h -ssltest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h -ssltest.o: ../include/openssl/buffer.h ../include/openssl/cast.h -ssltest.o: ../include/openssl/comp.h ../include/openssl/crypto.h -ssltest.o: ../include/openssl/des.h ../include/openssl/des_old.h -ssltest.o: ../include/openssl/dh.h ../include/openssl/dsa.h -ssltest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h +ssltest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h +ssltest.o: ../include/openssl/bn.h ../include/openssl/buffer.h +ssltest.o: ../include/openssl/cast.h ../include/openssl/comp.h +ssltest.o: ../include/openssl/crypto.h ../include/openssl/des.h +ssltest.o: ../include/openssl/des_old.h ../include/openssl/dh.h +ssltest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h +ssltest.o: ../include/openssl/ec.h ../include/openssl/ecdh.h ssltest.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h ssltest.o: ../include/openssl/err.h ../include/openssl/evp.h ssltest.o: ../include/openssl/idea.h ../include/openssl/kssl.h diff --git a/test/maketests.com b/test/maketests.com index d3fd814fe6..39e2b0952d 100644 --- a/test/maketests.com +++ b/test/maketests.com @@ -164,7 +164,7 @@ $ GOSUB CHECK_OPT_FILE $! $! Define The TEST Files. $! -$ TEST_FILES = "BNTEST,ECTEST,ECDSATEST,IDEATEST,"+ - +$ TEST_FILES = "BNTEST,ECTEST,ECDSATEST,ECDHTEST,IDEATEST,"+ - "MD2TEST,MD4TEST,MD5TEST,HMACTEST,"+ - "RC2TEST,RC4TEST,RC5TEST,"+ - "DESTEST,SHATEST,SHA1TEST,MDC2TEST,RMDTEST,"+ - diff --git a/test/tests.com b/test/tests.com index dbc366fe1c..9263c8b843 100644 --- a/test/tests.com +++ b/test/tests.com @@ -25,7 +25,7 @@ $ tests := - test_des,test_idea,test_sha,test_md4,test_md5,test_hmac,- test_md2,test_mdc2,- test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,test_rd,- - test_rand,test_bn,test_ec,test_ecdsa,- + test_rand,test_bn,test_ec,test_ecdsa,test_ecdh,- test_enc,test_x509,test_rsa,test_crl,test_sid,- test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,- test_ss,test_ca,test_engine,test_evp,test_ssl @@ -35,6 +35,7 @@ $ $ BNTEST := bntest $ ECTEST := ectest $ ECDSATEST := ecdsatest +$ ECDHTEST := ecdhtest $ EXPTEST := exptest $ IDEATEST := ideatest $ SHATEST := shatest @@ -190,10 +191,14 @@ $ test_ec: $ write sys$output "test elliptic curves" $ mcr 'texe_dir''ectest' $ return -$ test_ec: +$ test_ecdsa: $ write sys$output "test ecdsa" $ mcr 'texe_dir''ecdsatest' $ return +$ test_ecdh: +$ write sys$output "test ecdh" +$ mcr 'texe_dir''ecdhtest' +$ return $ test_verify: $ write sys$output "The following command should have some OK's and some failures" $ write sys$output "There are definitly a few expired certificates" diff --git a/util/libeay.num b/util/libeay.num index 2a9745107b..491bef679c 100755 --- a/util/libeay.num +++ b/util/libeay.num @@ -457,7 +457,7 @@ RAND_bytes 464 EXIST::FUNCTION: RAND_cleanup 465 EXIST::FUNCTION: RAND_file_name 466 EXIST::FUNCTION: RAND_load_file 467 EXIST::FUNCTION: -RAND_screen 468 EXIST::FUNCTION: +RAND_screen 468 EXIST:WIN32:FUNCTION: RAND_seed 469 EXIST::FUNCTION: RAND_write_file 470 EXIST::FUNCTION: RC2_cbc_encrypt 471 EXIST::FUNCTION:RC2 @@ -1762,7 +1762,7 @@ RAND_status 2254 EXIST::FUNCTION: bn_dump1 2255 NOEXIST::FUNCTION: DES_check_key_parity 2256 EXIST::FUNCTION:DES lh_num_items 2257 EXIST::FUNCTION: -RAND_event 2258 EXIST::FUNCTION: +RAND_event 2258 EXIST:WIN32:FUNCTION: DSO_new 2259 EXIST::FUNCTION: DSO_new_method 2260 EXIST::FUNCTION: DSO_free 2261 EXIST::FUNCTION: @@ -2784,68 +2784,69 @@ CONF_modules_free 3226 EXIST::FUNCTION: NCONF_default 3227 EXIST::FUNCTION: OPENSSL_no_config 3228 EXIST::FUNCTION: NCONF_WIN32 3229 EXIST::FUNCTION: -ECDSA_set_conversion_form 3230 EXIST::FUNCTION:ECDSA +ECDSA_set_conversion_form 3230 NOEXIST::FUNCTION: EC_GROUP_new_by_name 3231 EXIST::FUNCTION:EC -d2i_ECDSA_PUBKEY 3232 EXIST::FUNCTION:ECDSA -PEM_read_bio_ECDSAPrivateKey 3233 EXIST::FUNCTION:ECDSA +d2i_ECDSA_PUBKEY 3232 NOEXIST::FUNCTION: +PEM_read_bio_ECDSAPrivateKey 3233 NOEXIST::FUNCTION: EC_GROUP_get_asn1_flag 3234 EXIST::FUNCTION:EC ECDSA_SIG_new 3235 EXIST::FUNCTION:ECDSA ECDSA_verify 3236 EXIST::FUNCTION:ECDSA EC_POINT_point2hex 3237 EXIST::FUNCTION:EC -i2d_ECDSAParameters 3238 EXIST::FUNCTION:ECDSA -i2d_ECDSAPrivateKey_bio 3239 EXIST::FUNCTION:BIO,ECDSA -EC_ASN1_group2pkparameters 3240 EXIST::FUNCTION:EC +i2d_ECDSAParameters 3238 NOEXIST::FUNCTION: +i2d_ECDSAPrivateKey_bio 3239 NOEXIST::FUNCTION: +EC_ASN1_group2pkparameters 3240 NOEXIST::FUNCTION: PEM_write_bio_ECDSAParameters 3241 NOEXIST::FUNCTION: -ECDSAParameters_print_fp 3242 EXIST::FUNCTION:ECDSA,FP_API +ECDSAParameters_print_fp 3242 NOEXIST::FUNCTION: EC_GROUP_check 3243 EXIST::FUNCTION:EC ENGINE_set_default_ECDSA 3244 EXIST::FUNCTION: -PEM_read_bio_ECDSA_PUBKEY 3245 EXIST::FUNCTION:ECDSA -ECDSA_check_key 3246 EXIST::FUNCTION:ECDSA -ECDSA_new_method 3247 EXIST::FUNCTION:ECDSA -d2i_ECPARAMETERS 3248 EXIST::FUNCTION:EC -d2i_ECDSAPrivateKey_bio 3249 EXIST::FUNCTION:BIO,ECDSA -i2d_ECDSA_PUBKEY 3250 EXIST::FUNCTION:ECDSA +PEM_read_bio_ECDSA_PUBKEY 3245 NOEXIST::FUNCTION: +ECDSA_check_key 3246 NOEXIST::FUNCTION: +ECDSA_new_method 3247 NOEXIST::FUNCTION: +d2i_ECPARAMETERS 3248 NOEXIST::FUNCTION: +d2i_ECDSAPrivateKey_bio 3249 NOEXIST::FUNCTION: +i2d_ECDSA_PUBKEY 3250 NOEXIST::FUNCTION: EC_POINT_hex2point 3251 EXIST::FUNCTION:EC -i2d_ECDSA_PUBKEY_fp 3252 EXIST::FUNCTION:ECDSA,FP_API +i2d_ECDSA_PUBKEY_fp 3252 NOEXIST::FUNCTION: ENGINE_unregister_ECDSA 3253 EXIST::FUNCTION: -ECDSA_free 3254 EXIST::FUNCTION:ECDSA -ECDSAParameters_print 3255 EXIST::FUNCTION:BIO,ECDSA +ECDSA_free 3254 NOEXIST::FUNCTION: +ECDSAParameters_print 3255 NOEXIST::FUNCTION: EC_POINT_bn2point 3256 EXIST::FUNCTION:EC -PEM_write_bio_ECDSA_PUBKEY 3257 EXIST::FUNCTION:ECDSA +PEM_write_bio_ECDSA_PUBKEY 3257 NOEXIST::FUNCTION: ECDSA_set_method 3258 EXIST::FUNCTION:ECDSA -ECDSA_print 3259 EXIST::FUNCTION:BIO,ECDSA -i2d_ECPARAMETERS 3260 EXIST::FUNCTION:EC -d2i_ECPKPARAMETERS 3261 EXIST::FUNCTION:EC -EVP_PKEY_get1_ECDSA 3262 EXIST::FUNCTION:ECDSA +ECDSA_print 3259 NOEXIST::FUNCTION: +i2d_ECPARAMETERS 3260 NOEXIST::FUNCTION: +d2i_ECPKPARAMETERS 3261 NOEXIST::FUNCTION: +EVP_PKEY_get1_ECDSA 3262 NOEXIST::FUNCTION: ECDSA_SIG_free 3263 EXIST::FUNCTION:ECDSA ENGINE_get_default_ECDSA 3264 EXIST::FUNCTION: -PEM_write_ECDSAPrivateKey 3265 EXIST:!WIN16:FUNCTION:ECDSA +PEM_write_ECDSAPrivateKey 3265 NOEXIST::FUNCTION: ECDSA_sign_setup 3266 EXIST::FUNCTION:ECDSA ENGINE_get_ECDSA 3267 EXIST::FUNCTION: ECDSA_get_default_method 3268 EXIST::FUNCTION:ECDSA -d2i_ECDSA_PUBKEY_bio 3269 EXIST::FUNCTION:BIO,ECDSA +d2i_ECDSA_PUBKEY_bio 3269 NOEXIST::FUNCTION: ECDSA_sign 3270 EXIST::FUNCTION:ECDSA ENGINE_register_ECDSA 3271 EXIST::FUNCTION: -d2i_ECDSAPrivateKey_fp 3272 EXIST::FUNCTION:ECDSA,FP_API +d2i_ECDSAPrivateKey_fp 3272 NOEXIST::FUNCTION: EC_GROUP_set_asn1_flag 3273 EXIST::FUNCTION:EC -ECPKPARAMETERS_it 3274 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:EC -ECPKPARAMETERS_it 3274 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:EC -ECDSA_print_fp 3275 EXIST::FUNCTION:ECDSA,FP_API -i2d_ECDSAPrivateKey 3276 EXIST::FUNCTION:ECDSA -d2i_ECDSAParameters 3277 EXIST::FUNCTION:ECDSA -PEM_write_bio_ECDSAPrivateKey 3278 EXIST::FUNCTION:ECDSA +ECPKPARAMETERS_it 3274 NOEXIST::FUNCTION: +ECPKPARAMETERS_it 3274 NOEXIST::FUNCTION: +ECDSA_print_fp 3275 NOEXIST::FUNCTION: +i2d_ECDSAPrivateKey 3276 NOEXIST::FUNCTION: +d2i_ECDSAParameters 3277 NOEXIST::FUNCTION: +PEM_write_bio_ECDSAPrivateKey 3278 NOEXIST::FUNCTION: ERR_load_ECDSA_strings 3279 EXIST::FUNCTION:ECDSA d2i_ECParameters 3280 EXIST::FUNCTION:EC d2i_ECDSA_SIG 3281 EXIST::FUNCTION:ECDSA ECDSA_size 3282 EXIST::FUNCTION:ECDSA EC_GROUP_set_nid 3283 EXIST::FUNCTION:EC -EVP_PKEY_set1_ECDSA 3284 EXIST::FUNCTION:ECDSA +EVP_PKEY_set1_ECDSA 3284 NOEXIST::FUNCTION: EC_GROUP_get_nid 3285 EXIST::FUNCTION:EC -d2i_ECDSA_PUBKEY_fp 3286 EXIST::FUNCTION:ECDSA,FP_API +d2i_ECDSA_PUBKEY_fp 3286 NOEXIST::FUNCTION: EC_METHOD_get_field_type 3287 EXIST::FUNCTION:EC -EC_GROUP_get_point_conversion_form 3288 EXIST::FUNCTION:EC +EC_GROUP_get_point_conversion_form 3288 EXIST:!VMS:FUNCTION:EC +EC_GROUP_get_point_conv_form 3288 EXIST:VMS:FUNCTION:EC ECDSA_OpenSSL 3289 EXIST::FUNCTION:ECDSA -i2d_ECPKPARAMETERS 3290 EXIST::FUNCTION:EC +i2d_ECPKPARAMETERS 3290 NOEXIST::FUNCTION: PEM_read_ECDSAParameters 3291 NOEXIST::FUNCTION: ECDSA_get_ex_data 3292 EXIST::FUNCTION:ECDSA ECDSA_do_verify 3293 EXIST::FUNCTION:ECDSA @@ -2855,34 +2856,35 @@ i2d_ECParameters 3296 EXIST::FUNCTION:EC d2i_ECPKParameters 3297 EXIST::FUNCTION:EC i2d_ECDSA_SIG 3298 EXIST::FUNCTION:ECDSA PEM_read_bio_ECDSAParameters 3299 NOEXIST::FUNCTION: -ECDSAPublicKey_get_octet_string 3300 EXIST::FUNCTION:ECDSA -ECDSA_new 3301 EXIST::FUNCTION:ECDSA +ECDSAPublicKey_get_octet_string 3300 NOEXIST::FUNCTION: +ECDSA_new 3301 NOEXIST::FUNCTION: EVP_ecdsa 3302 EXIST::FUNCTION:SHA -ECPARAMETERS_it 3303 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:EC -ECPARAMETERS_it 3303 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:EC +ECPARAMETERS_it 3303 NOEXIST::FUNCTION: +ECPARAMETERS_it 3303 NOEXIST::FUNCTION: ECDSA_set_default_method 3304 EXIST::FUNCTION:ECDSA ENGINE_set_ECDSA 3305 EXIST::FUNCTION: ECDSA_get_ex_new_index 3306 EXIST::FUNCTION:ECDSA -EC_GROUP_set_point_conversion_form 3307 EXIST::FUNCTION:EC -PEM_write_ECDSA_PUBKEY 3308 EXIST:!WIN16:FUNCTION:ECDSA +EC_GROUP_set_point_conversion_form 3307 EXIST:!VMS:FUNCTION:EC +EC_GROUP_set_point_conv_form 3307 EXIST:VMS:FUNCTION:EC +PEM_write_ECDSA_PUBKEY 3308 NOEXIST::FUNCTION: EC_GROUP_check_discriminant 3309 EXIST::FUNCTION:EC -ECDSA_set_default_conversion_form 3310 EXIST::FUNCTION:ECDSA +ECDSA_set_default_conversion_form 3310 NOEXIST::FUNCTION: ECDSA_set_ex_data 3311 EXIST::FUNCTION:ECDSA -ECDSA_get_default_conversion_form 3312 EXIST::FUNCTION:ECDSA -i2d_ECDSA_PUBKEY_bio 3313 EXIST::FUNCTION:BIO,ECDSA -EC_ASN1_pkparameters2group 3314 EXIST::FUNCTION:EC -d2i_ECDSAPrivateKey 3315 EXIST::FUNCTION:ECDSA +ECDSA_get_default_conversion_form 3312 NOEXIST::FUNCTION: +i2d_ECDSA_PUBKEY_bio 3313 NOEXIST::FUNCTION: +EC_ASN1_pkparameters2group 3314 NOEXIST::FUNCTION: +d2i_ECDSAPrivateKey 3315 NOEXIST::FUNCTION: EC_GROUP_new_by_nid 3316 EXIST::FUNCTION:EC -PEM_read_ECDSA_PUBKEY 3317 EXIST:!WIN16:FUNCTION:ECDSA -ECDSA_up_ref 3318 EXIST::FUNCTION:ECDSA +PEM_read_ECDSA_PUBKEY 3317 NOEXIST::FUNCTION: +ECDSA_up_ref 3318 NOEXIST::FUNCTION: ENGINE_register_all_ECDSA 3319 EXIST::FUNCTION: -ECDSA_get_conversion_form 3320 EXIST::FUNCTION:ECDSA +ECDSA_get_conversion_form 3320 NOEXIST::FUNCTION: i2d_ECPKParameters 3321 EXIST::FUNCTION:EC -ECDSA_generate_key 3322 EXIST::FUNCTION:ECDSA +ECDSA_generate_key 3322 NOEXIST::FUNCTION: PEM_write_ECDSAParameters 3323 NOEXIST::FUNCTION: -i2d_ECDSAPrivateKey_fp 3324 EXIST::FUNCTION:ECDSA,FP_API -PEM_read_ECDSAPrivateKey 3325 EXIST:!WIN16:FUNCTION:ECDSA -ECDSAPublicKey_set_octet_string 3326 EXIST::FUNCTION:ECDSA +i2d_ECDSAPrivateKey_fp 3324 NOEXIST::FUNCTION: +PEM_read_ECDSAPrivateKey 3325 NOEXIST::FUNCTION: +ECDSAPublicKey_set_octet_string 3326 NOEXIST::FUNCTION: ECPKParameters_print_fp 3327 EXIST::FUNCTION:EC,FP_API EVP_des_ede3_ecb 3328 EXIST::FUNCTION:DES EC_GROUP_set_seed 3329 EXIST::FUNCTION:EC @@ -2900,3 +2902,101 @@ EVP_des_ede_ecb 3339 EXIST::FUNCTION:DES d2i_ASN1_UNIVERSALSTRING 3340 EXIST::FUNCTION: PEM_read_bio_ECPKParameters 3341 EXIST::FUNCTION:EC ASN1_UNIVERSALSTRING_new 3342 EXIST::FUNCTION: +EC_PRIVATEKEY_new 3343 NOEXIST::FUNCTION: +EC_PRIVATEKEY_it 3344 NOEXIST::FUNCTION: +EC_PRIVATEKEY_it 3344 NOEXIST::FUNCTION: +DSO_merge 3345 EXIST::FUNCTION: +d2i_EC_PRIVATEKEY 3346 NOEXIST::FUNCTION: +ECDSA_get_enc_flag 3347 NOEXIST::FUNCTION: +ECDSA_set_enc_flag 3348 NOEXIST::FUNCTION: +i2d_EC_PRIVATEKEY 3349 NOEXIST::FUNCTION: +EC_PRIVATEKEY_free 3350 NOEXIST::FUNCTION: +EC_POINT_get_affine_coordinates_GF2m 3351 EXIST::FUNCTION:EC +BN_GF2m_mod_sqr_arr 3352 EXIST::FUNCTION: +EC_GROUP_new_curve_GF2m 3353 EXIST::FUNCTION:EC +EC_GF2m_simple_method 3354 EXIST::FUNCTION:EC +EC_GROUP_set_curve_GF2m 3355 EXIST::FUNCTION:EC +EC_GROUP_dup 3356 EXIST::FUNCTION:EC +BN_GF2m_mod_solve_quad 3357 EXIST::FUNCTION: +BN_GF2m_mod_div 3358 EXIST::FUNCTION: +EC_POINT_set_compressed_coordinates_GF2m 3359 EXIST::FUNCTION:EC +BN_GF2m_mod_sqr 3360 EXIST::FUNCTION: +BN_GF2m_add 3361 EXIST::FUNCTION: +BN_GF2m_mod_solve_quad_arr 3362 EXIST::FUNCTION: +BN_GF2m_mod_arr 3363 EXIST::FUNCTION: +EC_GROUP_get_curve_GF2m 3364 EXIST::FUNCTION:EC +BN_GF2m_mod_sqrt_arr 3365 EXIST::FUNCTION: +BN_GF2m_mod_mul_arr 3366 EXIST::FUNCTION: +BN_GF2m_mod_exp 3367 EXIST::FUNCTION: +BN_GF2m_mod_inv 3368 EXIST::FUNCTION: +BN_GF2m_mod_div_arr 3369 EXIST::FUNCTION: +BN_GF2m_arr2poly 3370 EXIST::FUNCTION: +BN_GF2m_mod_sqrt 3371 EXIST::FUNCTION: +BN_GF2m_mod_mul 3372 EXIST::FUNCTION: +EC_GROUP_get_degree 3373 EXIST::FUNCTION:EC +BN_GF2m_mod 3374 EXIST::FUNCTION: +BN_GF2m_mod_inv_arr 3375 EXIST::FUNCTION: +BN_GF2m_mod_exp_arr 3376 EXIST::FUNCTION: +BN_GF2m_poly2arr 3377 EXIST::FUNCTION: +EC_POINT_dup 3378 EXIST::FUNCTION:EC +EC_POINT_set_affine_coordinates_GF2m 3379 EXIST::FUNCTION:EC +i2d_EC_PUBKEY 3380 EXIST::FUNCTION:EC +i2d_ECPrivateKey 3381 EXIST::FUNCTION:EC +EC_KEY_free 3382 EXIST::FUNCTION:EC +PEM_write_bio_ECPrivateKey 3383 EXIST::FUNCTION:EC +ECDSA_DATA_new_method 3384 EXIST::FUNCTION:ECDSA +i2d_ECPrivateKey_bio 3385 EXIST::FUNCTION:BIO,EC +d2i_ECPrivateKey_fp 3386 EXIST::FUNCTION:EC,FP_API +EVP_PKEY_get1_EC_KEY 3387 EXIST::FUNCTION:EC +ECPublicKey_set_octet_string 3388 EXIST::FUNCTION:EC +PEM_write_EC_PUBKEY 3389 EXIST:!WIN16:FUNCTION:EC +EC_KEY_print_fp 3390 EXIST::FUNCTION:EC,FP_API +EC_KEY_new 3391 EXIST::FUNCTION:EC +i2d_EC_PUBKEY_bio 3392 EXIST::FUNCTION:BIO,EC +ECDSA_DATA_new 3393 EXIST::FUNCTION:ECDSA +EVP_PKEY_set1_EC_KEY 3394 EXIST::FUNCTION:EC +ECDSA_DATA_free 3395 EXIST::FUNCTION:ECDSA +EC_KEY_print 3396 EXIST::FUNCTION:BIO,EC +PEM_write_bio_EC_PUBKEY 3397 EXIST::FUNCTION:EC +ECParameters_print 3398 EXIST::FUNCTION:BIO,EC +d2i_EC_PUBKEY_fp 3399 EXIST::FUNCTION:EC,FP_API +PEM_write_ECPrivateKey 3400 EXIST:!WIN16:FUNCTION:EC +ecdsa_check 3401 EXIST::FUNCTION:ECDSA +PEM_read_ECPrivateKey 3402 EXIST:!WIN16:FUNCTION:EC +d2i_ECPrivateKey_bio 3403 EXIST::FUNCTION:BIO,EC +ECParameters_print_fp 3404 EXIST::FUNCTION:EC,FP_API +i2d_EC_PUBKEY_fp 3405 EXIST::FUNCTION:EC,FP_API +i2d_ECPrivateKey_fp 3406 EXIST::FUNCTION:EC,FP_API +d2i_EC_PUBKEY 3407 EXIST::FUNCTION:EC +d2i_ECPrivateKey 3408 EXIST::FUNCTION:EC +d2i_EC_PUBKEY_bio 3409 EXIST::FUNCTION:BIO,EC +ECPublicKey_get_octet_string 3410 EXIST::FUNCTION:EC +PEM_read_EC_PUBKEY 3411 EXIST:!WIN16:FUNCTION:EC +PEM_read_bio_EC_PUBKEY 3412 EXIST::FUNCTION:EC +PEM_read_bio_ECPrivateKey 3413 EXIST::FUNCTION:EC +EC_KEY_dup 3414 EXIST::FUNCTION:EC +EC_KEY_check_key 3415 EXIST::FUNCTION:EC +EC_KEY_generate_key 3416 EXIST::FUNCTION:EC +EC_KEY_copy 3417 EXIST::FUNCTION:EC +ECDH_compute_key 3418 EXIST::FUNCTION:ECDH +ENGINE_get_ECDH 3419 EXIST::FUNCTION: +ECDH_get_default_method 3420 EXIST::FUNCTION:ECDH +ECDH_DATA_new 3421 EXIST::FUNCTION:ECDH +ECDH_DATA_free 3422 EXIST::FUNCTION:ECDH +ECDH_get_ex_new_index 3423 EXIST::FUNCTION:ECDH +ERR_load_ECDH_strings 3424 EXIST::FUNCTION:ECDH +ecdh_check 3425 EXIST::FUNCTION:ECDH +ECDH_get_ex_data 3426 EXIST::FUNCTION:ECDH +ECDH_set_default_method 3427 EXIST::FUNCTION:ECDH +EC_KEY_up_ref 3428 EXIST::FUNCTION:EC +ECDH_size 3429 EXIST::FUNCTION:ECDH +ECDH_set_ex_data 3430 EXIST::FUNCTION:ECDH +ENGINE_get_default_ECDH 3431 EXIST::FUNCTION: +ENGINE_unregister_ECDH 3432 EXIST::FUNCTION: +ENGINE_set_ECDH 3433 EXIST::FUNCTION: +ECDH_set_method 3434 EXIST::FUNCTION:ECDH +ECDH_OpenSSL 3435 EXIST::FUNCTION:ECDH +ENGINE_register_all_ECDH 3436 EXIST::FUNCTION: +ECDH_DATA_new_method 3437 EXIST::FUNCTION:ECDH +ENGINE_set_default_ECDH 3438 EXIST::FUNCTION: +ENGINE_register_ECDH 3439 EXIST::FUNCTION: diff --git a/util/mkdef.pl b/util/mkdef.pl index 64d21242e4..3fe6d2853f 100755 --- a/util/mkdef.pl +++ b/util/mkdef.pl @@ -84,7 +84,7 @@ my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" ); my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", "RIPEMD", - "MDC2", "RSA", "DSA", "DH", "EC", "ECDSA", "HMAC", "AES", + "MDC2", "RSA", "DSA", "DH", "EC", "ECDH", "ECDSA", "HMAC", "AES", # Envelope "algorithms" "EVP", "X509", "ASN1_TYPEDEFS", # Helper "algorithms" @@ -107,7 +107,7 @@ my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; my $no_cast; my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; -my $no_ec; my $no_ecdsa; +my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_fp_api; foreach (@ARGV, split(/ /, $options)) @@ -165,6 +165,7 @@ foreach (@ARGV, split(/ /, $options)) elsif (/^no-dh$/) { $no_dh=1; } elsif (/^no-ec$/) { $no_ec=1; } elsif (/^no-ecdsa$/) { $no_ecdsa=1; } + elsif (/^no-ecdh$/) { $no_ecdh=1; } elsif (/^no-hmac$/) { $no_hmac=1; } elsif (/^no-aes$/) { $no_aes=1; } elsif (/^no-evp$/) { $no_evp=1; } @@ -235,6 +236,7 @@ $crypto.=" crypto/dsa/dsa.h" ; # unless $no_dsa; $crypto.=" crypto/dh/dh.h" ; # unless $no_dh; $crypto.=" crypto/ec/ec.h" ; # unless $no_ec; $crypto.=" crypto/ecdsa/ecdsa.h" ; # unless $no_ecdsa; +$crypto.=" crypto/ecdh/ecdh.h" ; # unless $no_ecdh; $crypto.=" crypto/hmac/hmac.h" ; # unless $no_hmac; $crypto.=" crypto/engine/engine.h"; @@ -1044,6 +1046,7 @@ sub is_valid if ($keyword eq "DH" && $no_dh) { return 0; } if ($keyword eq "EC" && $no_ec) { return 0; } if ($keyword eq "ECDSA" && $no_ecdsa) { return 0; } + if ($keyword eq "ECDH" && $no_ecdh) { return 0; } if ($keyword eq "HMAC" && $no_hmac) { return 0; } if ($keyword eq "AES" && $no_aes) { return 0; } if ($keyword eq "EVP" && $no_evp) { return 0; } diff --git a/util/ssleay.num b/util/ssleay.num index fdea47205d..d027a1c45a 100755 --- a/util/ssleay.num +++ b/util/ssleay.num @@ -215,3 +215,5 @@ SSL_CTX_set_generate_session_id 264 EXIST::FUNCTION: SSL_renegotiate_pending 265 EXIST::FUNCTION: SSL_CTX_set_msg_callback 266 EXIST::FUNCTION: SSL_set_msg_callback 267 EXIST::FUNCTION: +SSL_set_tmp_ecdh_callback 268 EXIST::FUNCTION:ECDH +SSL_CTX_set_tmp_ecdh_callback 269 EXIST::FUNCTION:ECDH |