Skip to content

Commit cddb6ca

Browse files
committed
Document RSA signature provider sources
1 parent bbba835 commit cddb6ca

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/verify.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ pub static SUPPORTED_SIG_ALGS: WebPkiSupportedAlgorithms = WebPkiSupportedAlgori
3535
RSA_PSS_SHA512,
3636
RSA_PSS_SHA384,
3737
RSA_PSS_SHA256,
38-
// RFC 4055 requires accepting sha*WithRSAEncryption AlgorithmIdentifiers both with
39-
// explicit NULL parameters and with parameters absent in certificate signatures.
38+
// RFC 4055 section 2.1 requires accepting hash AlgorithmIdentifiers both with
39+
// explicit NULL parameters and with parameters absent; rustls-webpki registers both
40+
// forms for RSA PKCS#1 certificate signatures.
4041
RSA_PKCS1_SHA512,
4142
RSA_PKCS1_SHA512_ABSENT_PARAMS,
4243
RSA_PKCS1_SHA384,
@@ -251,6 +252,7 @@ enum Params {
251252
unsafe impl Send for Params {}
252253
unsafe impl Sync for Params {}
253254

255+
// Match rustls-webpki's RSA verification algorithms, which are defined for 2048-8192-bit keys.
254256
const RSA_MIN_MODULUS_BITS: usize = 2048;
255257
const RSA_MAX_MODULUS_BITS: usize = 8192;
256258

0 commit comments

Comments
 (0)