Treat RSASSA-PSS keys like rsaEncryption RSA keys
In theory we should treat any parameters and the identifier itself as restriction to only use the key to create signatures accordingly (e.g. only use RSA with PSS padding or even use specific hash algorithms). But that's currently tricky as we'd have to store and pass this information along with our private keys (i.e. use PKCS#8 to store them and change the builder calls to pass along the identifier and parameters). That would require quite some work.
This commit is contained in:
@@ -1090,6 +1090,10 @@ static bool parse_certificate(private_openssl_x509_t *this)
|
||||
}
|
||||
switch (openssl_asn1_known_oid(oid))
|
||||
{
|
||||
case OID_RSASSA_PSS:
|
||||
/* TODO: we should treat such keys special and use the params as
|
||||
* restrictions regarding the use of this key (or rather the
|
||||
* associated private key) */
|
||||
case OID_RSA_ENCRYPTION:
|
||||
this->pubkey = lib->creds->create(lib->creds,
|
||||
CRED_PUBLIC_KEY, KEY_RSA, BUILD_BLOB_ASN1_DER,
|
||||
|
||||
Reference in New Issue
Block a user