@@ -125,6 +125,25 @@ impl<'a> EndEntityCert<'a> {
125
125
)
126
126
}
127
127
128
+ /// Backward-SemVer-compatible wrapper around `verify_is_valid_tls_client_cert_ext`.
129
+ ///
130
+ /// Errors that aren't representable as an `Error` are mapped to `Error::UnknownIssuer`.
131
+ pub fn verify_is_valid_tls_client_cert (
132
+ & self ,
133
+ supported_sig_algs : & [ & SignatureAlgorithm ] ,
134
+ trust_anchors : & TlsClientTrustAnchors ,
135
+ intermediate_certs : & [ & [ u8 ] ] ,
136
+ time : Time ,
137
+ ) -> Result < ( ) , Error > {
138
+ self . verify_is_valid_tls_client_cert_ext (
139
+ supported_sig_algs,
140
+ trust_anchors,
141
+ intermediate_certs,
142
+ time,
143
+ )
144
+ . map_err ( ErrorExt :: into_error_lossy)
145
+ }
146
+
128
147
/// Verifies that the end-entity certificate is valid for use by a TLS
129
148
/// client.
130
149
///
@@ -145,7 +164,7 @@ impl<'a> EndEntityCert<'a> {
145
164
& TlsClientTrustAnchors ( trust_anchors) : & TlsClientTrustAnchors ,
146
165
intermediate_certs : & [ & [ u8 ] ] ,
147
166
time : Time ,
148
- ) -> Result < ( ) , Error > {
167
+ ) -> Result < ( ) , ErrorExt > {
149
168
verify_cert:: build_chain (
150
169
verify_cert:: EKU_CLIENT_AUTH ,
151
170
supported_sig_algs,
@@ -154,7 +173,6 @@ impl<'a> EndEntityCert<'a> {
154
173
& self . inner ,
155
174
time,
156
175
)
157
- . map_err ( ErrorExt :: into_error_lossy)
158
176
}
159
177
160
178
/// Verifies that the certificate is valid for the given DNS host name.
0 commit comments