Have EC_NISTP224_64_GCC_128 treated like any algorithm, and have disabled by
authorDr. Stephen Henson <steve@openssl.org>
Thu, 12 May 2011 13:10:27 +0000 (13:10 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 12 May 2011 13:10:27 +0000 (13:10 +0000)
default. If we don't do it this way, it screws up libeay.num.
(update from HEAD, original from levitte).

Configure
crypto/ec/ec.h
crypto/ec/ecp_nistp224.c
util/libeay.num
util/mkdef.pl

index 9397ca1c4a33dc7d0d1867bbc51ccebd20e1403b..56f8c471c2fd8b9db4cf16a8a84164a0e637bb3a 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -667,6 +667,7 @@ my $perl;
 # All of the following is disabled by default (RC5 was enabled before 0.9.8):
 
 my %disabled = ( # "what"         => "comment" [or special keyword "experimental"]
+                "ec-nistp224-64-gcc-218" => "default",
                 "gmp"            => "default",
                  "jpake"          => "experimental",
                  "md2"            => "default",
@@ -1001,7 +1002,7 @@ foreach (sort (keys %disabled))
        else
                {
                my ($ALGO, $algo);
-               ($ALGO = $algo = $_) =~ tr/[a-z]/[A-Z]/;
+               ($ALGO = $algo = $_) =~ tr/[\-a-z]/[_A-Z]/;
 
                if (/^asm$/ || /^err$/ || /^hw$/ || /^hw-/)
                        {
index 6409eee1b3d215f3ab1c5fa098ab63ebb236b536..c95285e59769ce0cde34d262dc4bb9a7b278fbda 100644 (file)
@@ -151,7 +151,7 @@ const EC_METHOD *EC_GFp_mont_method(void);
  */
 const EC_METHOD *EC_GFp_nist_method(void);
 
-#ifdef EC_NISTP224_64_GCC_128
+#ifndef OPENSSL_NO_EC_NISTP224_64_GCC_128
 /** Returns 64-bit optimized methods for nistp224
  *  \return  EC_METHOD object
  */
index e0ca2dca17118609c43c4e291d955f145c397903..90c3589bdfc4d4d45c0b167d3447627545e26767 100644 (file)
@@ -62,7 +62,8 @@
  * Inspired by Daniel J. Bernstein's public domain nistp224 implementation
  * and Adam Langley's public domain 64-bit C implementation of curve25519
  */
-#ifdef EC_NISTP224_64_GCC_128
+#include <openssl/opensslconf.h>
+#ifndef OPENSSL_NO_EC_NISTP224_64_GCC_128
 #include <stdint.h>
 #include <string.h>
 #include <openssl/err.h>
index 104b187280e93a4a992d12ba78d31383bd2406cc..c675b03308f497f704cee28ebb9e7f48e5b001de 100755 (executable)
@@ -4218,4 +4218,4 @@ EVP_PKEY_meth_copy                      4588      EXIST::FUNCTION:
 ERR_add_error_vdata                     4589   EXIST::FUNCTION:
 EVP_aes_128_ctr                         4590   EXIST::FUNCTION:AES
 EVP_aes_256_ctr                         4591   EXIST::FUNCTION:AES
-EC_GFp_nistp224_method                  4592   EXIST::FUNCTION:EC
+EC_GFp_nistp224_method                  4592   EXIST::FUNCTION:EC,EC_NISTP224_64_GCC_128
index dcd622429f08d18cdfdb160dd9816c9b3da5afe3..6a107c1b3c64c8f4463d2f03ebb3cc6a0bd163b1 100755 (executable)
@@ -86,6 +86,8 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
                         "SHA256", "SHA512", "RIPEMD",
                         "MDC2", "WHIRLPOOL", "RSA", "DSA", "DH", "EC", "ECDH", "ECDSA",
                         "HMAC", "AES", "CAMELLIA", "SEED", "GOST",
+                        # ECP_NISTP224
+                        "EC_NISTP224_64_GCC_128",
                         # Envelope "algorithms"
                         "EVP", "X509", "ASN1_TYPEDEFS",
                         # Helper "algorithms"