diff options
author | Bodo Möller <bodo@openssl.org> | 2002-02-20 13:08:17 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-02-20 13:08:17 +0000 |
commit | 3613e6fc57d59d05a1b9e992879845000783bb36 (patch) | |
tree | 3cda403daa9a94afb65cdc486a4c83eb79d93746 /crypto/ecdsa/ecs_asn1.c | |
parent | f8e21776f9351d78f836d217dda0649fdabe39f7 (diff) |
simplifications
Submitted by: Nils Larsch
Diffstat (limited to 'crypto/ecdsa/ecs_asn1.c')
-rw-r--r-- | crypto/ecdsa/ecs_asn1.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/crypto/ecdsa/ecs_asn1.c b/crypto/ecdsa/ecs_asn1.c index 542a987bc2..886cd01db2 100644 --- a/crypto/ecdsa/ecs_asn1.c +++ b/crypto/ecdsa/ecs_asn1.c @@ -61,29 +61,10 @@ static point_conversion_form_t POINT_CONVERSION_FORM = POINT_CONVERSION_COMPRESSED; -/* Override the default new methods */ -static int sig_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it) -{ - if(operation == ASN1_OP_NEW_PRE) { - ECDSA_SIG *sig; - sig = OPENSSL_malloc(sizeof(ECDSA_SIG)); - if (sig == NULL) - { - ECDSAerr(ECDSA_F_SIG_CB, ERR_R_MALLOC_FAILURE); - return 0; - } - sig->r = NULL; - sig->s = NULL; - *pval = (ASN1_VALUE *)sig; - return 2; - } - return 1; -} - -ASN1_SEQUENCE_cb(ECDSA_SIG, sig_cb) = { +ASN1_SEQUENCE(ECDSA_SIG) = { ASN1_SIMPLE(ECDSA_SIG, r, CBIGNUM), ASN1_SIMPLE(ECDSA_SIG, s, CBIGNUM) -} ASN1_SEQUENCE_END_cb(ECDSA_SIG, ECDSA_SIG) +} ASN1_SEQUENCE_END(ECDSA_SIG) IMPLEMENT_ASN1_FUNCTIONS_const(ECDSA_SIG) @@ -439,9 +420,7 @@ ECDSA *ECDSA_x9_62parameters2ecdsa(const X9_62_EC_PARAMETERS *params, EC if ((point = EC_POINT_new(ret->group)) == NULL) goto err; } else OPENSSL_ECDSA_ABORT(ECDSA_R_WRONG_FIELD_IDENTIFIER) - /* FIXME!!! It seems like the comparison of data with 0 isn't the - intended thing. */ - if (params->curve->seed != NULL && params->curve->seed->data != 0) + if (params->curve->seed != NULL) { if (ret->seed != NULL) OPENSSL_free(ret->seed); |