File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,8 @@ impl CertificateSigningRequestParams {
105105 let csr = x509_parser:: certification_request:: X509CertificationRequest :: from_der ( csr)
106106 . map_err ( |_| Error :: CouldNotParseCertificationRequest ) ?
107107 . 1 ;
108- csr. verify_signature ( ) . map_err ( |_| Error :: RingUnspecified ) ?;
108+ csr. verify_signature ( )
109+ . map_err ( |_| Error :: InvalidRequestSignature ) ?;
109110 let alg_oid = csr
110111 . signature_algorithm
111112 . algorithm
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ pub enum Error {
1010 CouldNotParseCertificationRequest ,
1111 /// The given key pair couldn't be parsed
1212 CouldNotParseKeyPair ,
13+ /// The CSR signature is invalid
14+ #[ cfg( feature = "x509-parser" ) ]
15+ InvalidRequestSignature ,
1316 #[ cfg( feature = "x509-parser" ) ]
1417 /// Invalid subject alternative name type
1518 InvalidNameType ,
@@ -62,6 +65,8 @@ impl fmt::Display for Error {
6265 ) ?,
6366 CouldNotParseKeyPair => write ! ( f, "Could not parse key pair" ) ?,
6467 #[ cfg( feature = "x509-parser" ) ]
68+ InvalidRequestSignature => write ! ( f, "Invalid CSR signature" ) ?,
69+ #[ cfg( feature = "x509-parser" ) ]
6570 InvalidNameType => write ! ( f, "Invalid subject alternative name type" ) ?,
6671 InvalidAsn1String ( e) => write ! ( f, "{e}" ) ?,
6772 InvalidIpAddressOctetLength ( actual) => {
You can’t perform that action at this time.
0 commit comments