summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2018-01-21 12:19:12 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2018-01-23 20:36:48 +0100
commite44832a9dc45c89d272d0ef8c41df0babfc1f5ee (patch)
tree3e658860d31ed47156cc03f6762cd7881c57e554
parentd6e26764281f8dff58eb11514e561232e7ac3373 (diff)
downloadgnutls-e44832a9dc45c89d272d0ef8c41df0babfc1f5ee.tar.gz
pubkey: use the strict DER decoder for SubjectPublicKeyInfo
Although there is no explicit RFC mentioning the SubjectPublicKeyInfo encoding, this structure is a subset of the X.509 certificate's structure and as such it is expected to be in DER form. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-rw-r--r--lib/pubkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pubkey.c b/lib/pubkey.c
index 99a60a2adf..7d6adc31d5 100644
--- a/lib/pubkey.c
+++ b/lib/pubkey.c
@@ -1013,7 +1013,7 @@ gnutls_pubkey_import(gnutls_pubkey_t key,
goto cleanup;
}
- result = asn1_der_decoding(&spk, _data.data, _data.size, NULL);
+ result = _asn1_strict_der_decode(&spk, _data.data, _data.size, NULL);
if (result != ASN1_SUCCESS) {
gnutls_assert();
result = _gnutls_asn2err(result);