]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
_decode_pkcs8_rsa_pss_key: ensure we set the PSS PK identifier
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 25 Jul 2017 12:14:49 +0000 (14:14 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 3 Aug 2017 09:57:52 +0000 (11:57 +0200)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
lib/x509/privkey_pkcs8.c

index 43c1ebe4e2a56b5b048accb66f2db4adc9d80db6..7042cca9972c99d08fe0389f419f4b74b5f7851c 100644 (file)
@@ -979,6 +979,7 @@ _decode_pkcs8_rsa_pss_key(ASN1_TYPE pkcs8_asn, gnutls_x509_privkey_t pkey)
                goto error;
        }
 
+       pkey->params.algo = GNUTLS_PK_RSA_PSS;
        memcpy(&pkey->params.spki, &params, sizeof(gnutls_x509_spki_st));
 
        ret = 0;
@@ -1193,7 +1194,6 @@ decode_private_key_info(const gnutls_datum_t * der,
                result = _gnutls_asn2err(result);
                goto error;
        }
-
        /* we only support RSA and DSA private keys.
         */