diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-11-24 13:31:02 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-11-24 19:35:33 +0100 |
commit | 6be35136333b5d6289f23209cf896e741462909a (patch) | |
tree | 40373bf5671720c424589d3df69611faae21a2c0 /tests/crq_apis.c | |
parent | bc9bea2b3d5c19c209415000863afc1b7434343b (diff) | |
download | gnutls-6be35136333b5d6289f23209cf896e741462909a.tar.gz |
rewritten ASN.1 handling string subsystems to use the new libtasn1 APIs.
Diffstat (limited to 'tests/crq_apis.c')
-rw-r--r-- | tests/crq_apis.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/crq_apis.c b/tests/crq_apis.c index c34babf0a1..83ed6d962b 100644 --- a/tests/crq_apis.c +++ b/tests/crq_apis.c @@ -118,7 +118,7 @@ doit (void) ret = gnutls_x509_crq_get_challenge_password (crq, NULL, &s); if (ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) - fail ("gnutls_x509_crq_get_challenge_password %d\n", ret); + fail ("%d: gnutls_x509_crq_get_challenge_password %d: %s\n", __LINE__, ret, gnutls_strerror(ret)); ret = gnutls_x509_crq_set_challenge_password (crq, "foo"); if (ret != 0) @@ -126,14 +126,14 @@ doit (void) s = 0; ret = gnutls_x509_crq_get_challenge_password (crq, NULL, &s); - if (ret != 0 || s != 3) - fail ("gnutls_x509_crq_get_challenge_password2 %d/%d\n", ret, (int) s); + if (ret != GNUTLS_E_SHORT_MEMORY_BUFFER || s != 4) + fail ("%d: gnutls_x509_crq_get_challenge_password %d: %s (passlen: %d)\n", __LINE__, ret, gnutls_strerror(ret), (int)s); s = 10; ret = gnutls_x509_crq_get_challenge_password (crq, smallbuf, &s); if (ret != 0 || s != 3 || strcmp (smallbuf, "foo") != 0) - fail ("gnutls_x509_crq_get_challenge_password3 %d/%d/%s\n", - ret, (int) s, smallbuf); + fail ("%d: gnutls_x509_crq_get_challenge_password3 %d/%d/%s\n", + __LINE__, ret, (int) s, smallbuf); s = 0; ret = gnutls_x509_crq_get_extension_info (crq, 0, NULL, &s, NULL); |