diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-07-27 16:53:57 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-08-03 11:57:52 +0200 |
commit | 4256ef71a7842830f7a27061c31c36554a6b97cc (patch) | |
tree | 0ed46372269b378c67093afe6eaa8fbb046f02f4 /lib/x509/crq.c | |
parent | 86da29a32b34bd2f84f914f5749c260d9ff11add (diff) | |
download | gnutls-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.c | 3 |
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; |