diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-03-06 12:08:01 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-03-06 12:08:01 +0000 |
commit | cf51d26b7dbc98b78a91f12646aab4e7fb7948a9 (patch) | |
tree | 505f27cfb8295de8cf104b64a0f244c560e8b4e6 /lib/gnutls_pk.c | |
parent | a09ae0e65ae833da562716ee01f5c22c92c79806 (diff) | |
download | gnutls-cf51d26b7dbc98b78a91f12646aab4e7fb7948a9.tar.gz |
Combined error codes of gnutls and ASN.1 parser. Also several cleanups in the
X.509 code.
Diffstat (limited to 'lib/gnutls_pk.c')
-rw-r--r-- | lib/gnutls_pk.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/gnutls_pk.c b/lib/gnutls_pk.c index 6aa4b50085..3045754edc 100644 --- a/lib/gnutls_pk.c +++ b/lib/gnutls_pk.c @@ -293,10 +293,10 @@ opaque str[MAX_PARAMETER_SIZE]; int len = sizeof(str); int tot_len = 0; - if (asn1_create_structure( _gnutls_get_gnutls_asn(), "GNUTLS.DSASignatureValue", - &sig, "sig")!=ASN_OK) { + if ((result=asn1_create_structure( _gnutls_get_gnutls_asn(), "GNUTLS.DSASignatureValue", + &sig, "sig"))!=ASN_OK) { gnutls_assert(); - return GNUTLS_E_ASN1_ERROR; + return result; } if ( _gnutls_mpi_print_lz( str, &len, r) < 0) { @@ -311,7 +311,7 @@ int tot_len = 0; if (result != ASN_OK) { gnutls_assert(); asn1_delete_structure(sig); - return GNUTLS_E_ASN1_PARSING_ERROR; + return result; } len = sizeof(str) - 1; @@ -327,7 +327,7 @@ int tot_len = 0; if (result != ASN_OK) { gnutls_assert(); asn1_delete_structure(sig); - return GNUTLS_E_ASN1_PARSING_ERROR; + return result; } sig_value->size = tot_len + 100; @@ -341,7 +341,7 @@ int tot_len = 0; if (result != ASN_OK) { gnutls_assert(); asn1_delete_structure(sig); - return GNUTLS_E_ASN1_PARSING_ERROR; + return result; } asn1_delete_structure(sig); @@ -400,16 +400,16 @@ int result; opaque str[MAX_PARAMETER_SIZE]; - if (asn1_create_structure( _gnutls_get_gnutls_asn(), "GNUTLS.DSASignatureValue", &sig, "sig")!=ASN_OK) { + if ((result=asn1_create_structure( _gnutls_get_gnutls_asn(), "GNUTLS.DSASignatureValue", &sig, "sig"))!=ASN_OK) { gnutls_assert(); - return GNUTLS_E_ASN1_ERROR; + return result; } result = asn1_get_der( sig, sig_value->data, sig_value->size); if (result != ASN_OK) { gnutls_assert(); asn1_delete_structure(sig); - return GNUTLS_E_ASN1_PARSING_ERROR; + return result; } result = |