@@ -22,7 +22,7 @@ pub enum Error {
2222 KeyGenerationUnavailable ,
2323 #[ cfg( feature = "x509-parser" ) ]
2424 /// Unsupported extension requested in CSR
25- UnsupportedExtension ,
25+ UnsupportedExtensionInCsr ,
2626 /// The requested signature algorithm is not supported
2727 UnsupportedSignatureAlgorithm ,
2828 /// Unspecified `ring` error
@@ -48,6 +48,9 @@ pub enum Error {
4848 /// X509 parsing error
4949 #[ cfg( feature = "x509-parser" ) ]
5050 X509 ( String ) ,
51+ /// Invalid signature when decoding a CSR
52+ #[ cfg( feature = "x509-parser" ) ]
53+ InvalidSignatureInCsr ,
5154}
5255
5356impl fmt:: Display for Error {
@@ -78,7 +81,7 @@ impl fmt::Display for Error {
7881 is not supported"
7982 ) ?,
8083 #[ cfg( feature = "x509-parser" ) ]
81- UnsupportedExtension => write ! ( f, "Unsupported extension requested in CSR" ) ?,
84+ UnsupportedExtensionInCsr => write ! ( f, "Unsupported extension requested in CSR" ) ?,
8285 RingUnspecified => write ! ( f, "Unspecified ring error" ) ?,
8386 RingKeyRejected ( e) => write ! ( f, "Key rejected by ring: {e}" ) ?,
8487
@@ -96,6 +99,8 @@ impl fmt::Display for Error {
9699 MissingSerialNumber => write ! ( f, "A serial number must be specified" ) ?,
97100 #[ cfg( feature = "x509-parser" ) ]
98101 X509 ( e) => write ! ( f, "X.509 parsing error: {e}" ) ?,
102+ #[ cfg( feature = "x509-parser" ) ]
103+ InvalidSignatureInCsr => write ! ( f, "Signature of CSR does not verify" ) ?,
99104 } ;
100105 Ok ( ( ) )
101106 }
0 commit comments