Fixes #13969 - properly handle the mandatory RSA-PSS key parameters - improve parameter checking when setting the parameters - compute the algorithm id at the time it is requested so it reflects the actual parameters set - when generating keys do not override previously set parameters with defaults - tests added to the test_req recipe that should cover the PSS signature handling Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13988)
31 lines
1.3 KiB
C
31 lines
1.3 KiB
C
/*
|
|
* Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
|
|
*
|
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
* this file except in compliance with the License. You can obtain a copy
|
|
* in the file LICENSE in the source distribution or at
|
|
* https://www.openssl.org/source/license.html
|
|
*/
|
|
|
|
#include "crypto/rsa.h"
|
|
#include "internal/der.h"
|
|
|
|
/* Well known OIDs precompiled */
|
|
{-
|
|
$OUT = oids_to_c::process_leaves('providers/common/der/NIST.asn1',
|
|
'providers/common/der/RSA.asn1',
|
|
{ dir => $config{sourcedir},
|
|
filter => \&oids_to_c::filter_to_H });
|
|
-}
|
|
|
|
/* PSS parameters */
|
|
int ossl_DER_w_RSASSA_PSS_params(WPACKET *pkt, int tag,
|
|
const RSA_PSS_PARAMS_30 *pss);
|
|
/* Subject Public Key Info */
|
|
int ossl_DER_w_algorithmIdentifier_RSA(WPACKET *pkt, int tag, RSA *rsa);
|
|
int ossl_DER_w_algorithmIdentifier_RSA_PSS(WPACKET *pkt, int tag,
|
|
int rsa_type,
|
|
const RSA_PSS_PARAMS_30 *pss);
|
|
/* Signature */
|
|
int ossl_DER_w_algorithmIdentifier_MDWithRSAEncryption(WPACKET *pkt, int tag,
|
|
int mdnid);
|