Commit 5488bb61 authored by Bodo Möller's avatar Bodo Möller
Browse files

get rid of EVP_PKEY_ECDSA (now we have EVP_PKEY_EC instead)

Submitted by: Nils Larsch
parent 8e28c671
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
@@ -2293,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) &&
+3 −2
Original line number Diff line number Diff line
@@ -682,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)
@@ -852,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)
+8 −4
Original line number Diff line number Diff line
@@ -1937,7 +1937,7 @@ int MAIN(int argc, char **argv)
				{
				/* Perform ECDSA signature test */
				EC_KEY_generate_key(ecdsa[j]);
				ret = ECDSA_sign(EVP_PKEY_ECDSA, buf, 20, ecdsasig, 
				ret = ECDSA_sign(0, buf, 20, ecdsasig, 
					&ecdsasiglen, ecdsa[j]);
				if (ret == 0) 
					{
@@ -1953,9 +1953,12 @@ int MAIN(int argc, char **argv)
						ECDSA_SECONDS);

					Time_F(START);
					for (count=0,run=1; COND(ecdsa_c[j][0]); count++) 
					for (count=0,run=1; COND(ecdsa_c[j][0]);
						count++) 
						{
						ret=ECDSA_sign(EVP_PKEY_ECDSA, buf, 20, ecdsasig, &ecdsasiglen, ecdsa[j]);
						ret=ECDSA_sign(0, buf, 20, 
							ecdsasig, &ecdsasiglen,
							ecdsa[j]);
						if (ret == 0) 
							{
							BIO_printf(bio_err, "ECDSA sign failure\n");
@@ -1974,7 +1977,8 @@ int MAIN(int argc, char **argv)
					}

				/* Perform ECDSA verification test */
				ret=ECDSA_verify(EVP_PKEY_ECDSA, buf, 20, ecdsasig, ecdsasiglen, ecdsa[j]);
				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");
+3 −3
Original line number Diff line number Diff line
@@ -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

@@ -894,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
				
@@ -929,7 +929,7 @@ bad:
		                        digest=EVP_dss1();
#endif
#ifndef OPENSSL_NO_ECDSA
				if (pk->type == EVP_PKEY_ECDSA)
				if (pk->type == EVP_PKEY_EC)
					digest=EVP_ecdsa();
#endif

+3 −4
Original line number Diff line number Diff line
@@ -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
@@ -169,7 +169,6 @@
#define EVP_PKEY_DSA4	NID_dsaWithSHA1_2
#define EVP_PKEY_DH	NID_dhKeyAgreement
#define EVP_PKEY_EC	NID_X9_62_id_ecPublicKey
#define EVP_PKEY_ECDSA	EVP_PKEY_EC

#ifdef	__cplusplus
extern "C" {
@@ -310,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
Loading