summaryrefslogtreecommitdiff
path: root/lib/x509/crq.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-07-27 16:53:57 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-03 11:57:52 +0200
commit4256ef71a7842830f7a27061c31c36554a6b97cc (patch)
tree0ed46372269b378c67093afe6eaa8fbb046f02f4 /lib/x509/crq.c
parent86da29a32b34bd2f84f914f5749c260d9ff11add (diff)
downloadgnutls-4256ef71a7842830f7a27061c31c36554a6b97cc.tar.gz
Added convention for missing SubjectPublicKeyInfo params field
That is, when that field is missing, the spki_st structure field pk will be set to GNUTLS_PK_UNKNOWN. In that case other fields are undefined. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/x509/crq.c')
-rw-r--r--lib/x509/crq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/x509/crq.c b/lib/x509/crq.c
index f3b50923b5..6088ef9ac6 100644
--- a/lib/x509/crq.c
+++ b/lib/x509/crq.c
@@ -1332,6 +1332,9 @@ gnutls_x509_crq_get_spki(gnutls_x509_crq_t crq,
return result;
}
+ if (params.pk == GNUTLS_PK_UNKNOWN)
+ return gnutls_assert_val(GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE);
+
spki->rsa_pss_dig = params.rsa_pss_dig;
spki->salt_size = params.salt_size;