From 8ee4845b65189096ae38144a349479f47a81a4ed Mon Sep 17 00:00:00 2001 From: Bodo Möller Date: Mon, 28 Oct 2002 14:13:38 +0000 Subject: 'broken' PKCS #8 format does not apply to ECDSA Submitted by: Nils Larsch --- crypto/ecdsa/ecdsatest.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'crypto/ecdsa') diff --git a/crypto/ecdsa/ecdsatest.c b/crypto/ecdsa/ecdsatest.c index 8b8c64ebc7..cda82570b9 100644 --- a/crypto/ecdsa/ecdsatest.c +++ b/crypto/ecdsa/ecdsatest.c @@ -472,54 +472,9 @@ int main(void) 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_EC_KEY(ret_pkey); - if (ecdsa_cmp(ecdsa, ret_ecdsa)) - { - BIO_printf(bio_err, "TEST FAILED \n"); - goto err; - } - else BIO_printf(bio_err, "TEST OK \n"); - EVP_PKEY_free(ret_pkey); - ret_pkey = NULL; - 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_EC_KEY(ret_pkey); - if (ecdsa_cmp(ecdsa, ret_ecdsa)) - { - BIO_printf(bio_err, "TEST FAILED \n"); - goto err; - } - else BIO_printf(bio_err, "TEST OK \n"); - EVP_PKEY_free(ret_pkey); - ret_pkey = NULL; - 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_EC_KEY(ret_pkey); - if (ecdsa_cmp(ecdsa, ret_ecdsa)) - { - BIO_printf(bio_err, "TEST FAILED \n"); - goto err; - } - else BIO_printf(bio_err, "TEST OK \n"); - EVP_PKEY_free(ret_pkey); - ret_pkey = NULL; - EC_KEY_free(ret_ecdsa); - ret_ecdsa = NULL; EVP_PKEY_free(pkey); pkey = NULL; ecdsa = NULL; - PKCS8_PRIV_KEY_INFO_free(pkcs8); pkcs8 = NULL; /* sign and verify tests */ -- cgit v1.2.3