Imported OpenSSL 1.1.1b
This commit is contained in:
@@ -34,7 +34,7 @@ static int rsa_param_encode(const EVP_PKEY *pkey,
|
||||
|
||||
*pstr = NULL;
|
||||
/* If RSA it's just NULL type */
|
||||
if (pkey->ameth->pkey_id == EVP_PKEY_RSA) {
|
||||
if (pkey->ameth->pkey_id != EVP_PKEY_RSA_PSS) {
|
||||
*pstrtype = V_ASN1_NULL;
|
||||
return 1;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ static int rsa_param_decode(RSA *rsa, const X509_ALGOR *alg)
|
||||
int algptype;
|
||||
|
||||
X509_ALGOR_get0(&algoid, &algptype, &algp, alg);
|
||||
if (OBJ_obj2nid(algoid) == EVP_PKEY_RSA)
|
||||
if (OBJ_obj2nid(algoid) != EVP_PKEY_RSA_PSS)
|
||||
return 1;
|
||||
if (algptype == V_ASN1_UNDEF)
|
||||
return 1;
|
||||
@@ -109,7 +109,10 @@ static int rsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey)
|
||||
RSA_free(rsa);
|
||||
return 0;
|
||||
}
|
||||
EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, rsa);
|
||||
if (!EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, rsa)) {
|
||||
RSA_free(rsa);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user