summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2020-05-24 18:48:24 +0000
committerDmitry Baryshkov <dbaryshkov@gmail.com>2020-05-24 18:48:24 +0000
commite6ba23adfbb10d38aa406fc075ef118e832f790a (patch)
tree0fa61dafae4842dcc5e96fcbcf7408a1ba103c32 /lib
parenta9f907be146be0df2cc756c19543ec1d10ccdef9 (diff)
parent603fb91743ba66b46333d614d2d56d403d6c5a3d (diff)
downloadgnutls-e6ba23adfbb10d38aa406fc075ef118e832f790a.tar.gz
Merge branch 'fix-aki' into 'master'
x509: aki: always print authorityCert info Closes #991 See merge request gnutls/gnutls!1249
Diffstat (limited to 'lib')
-rw-r--r--lib/x509/output.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/x509/output.c b/lib/x509/output.c
index c8b0c66ddb..a41e4963df 100644
--- a/lib/x509/output.c
+++ b/lib/x509/output.c
@@ -448,7 +448,9 @@ print_aki_gn_serial(gnutls_buffer_st * str, gnutls_x509_aki_t aki)
err =
gnutls_x509_aki_get_cert_issuer(aki,
0, &alt_type, &san, &other_oid, &serial);
- if (err < 0) {
+ if (err == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
+ return;
+ } else if (err < 0) {
addf(str, "error: gnutls_x509_aki_get_cert_issuer: %s\n",
gnutls_strerror(err));
return;
@@ -481,10 +483,11 @@ static void print_aki(gnutls_buffer_st * str, gnutls_datum_t *der)
goto cleanup;
}
+ /* Check if an alternative name is there */
+ print_aki_gn_serial(str, aki);
+
err = gnutls_x509_aki_get_id(aki, &id);
if (err == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
- /* Check if an alternative name is there */
- print_aki_gn_serial(str, aki);
goto cleanup;
} else if (err < 0) {
addf(str, "error: gnutls_x509_aki_get_id: %s\n",