Debian Codegraph @

upstream/debian-unstable/man3/X509_STORE_CTX_get_error.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "X509_STORE_CTX_GET_ERROR 3SSL"
58 .TH X509_STORE_CTX_GET_ERROR 3SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 X509_STORE_CTX_get_error, X509_STORE_CTX_set_error,
65 X509_STORE_CTX_get_error_depth, X509_STORE_CTX_set_error_depth,
66 X509_STORE_CTX_get_current_cert, X509_STORE_CTX_set_current_cert,
67 X509_STORE_CTX_get0_cert, X509_STORE_CTX_get1_chain,
68 X509_verify_cert_error_string \- get or set certificate verification status
69 information
70 .SH SYNOPSIS
71 .IX Header "SYNOPSIS"
72 .Vb 1
73 \& #include <openssl/x509.h>
74 \&
75 \& int X509_STORE_CTX_get_error(const X509_STORE_CTX *ctx);
76 \& void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
77 \& int X509_STORE_CTX_get_error_depth(const X509_STORE_CTX *ctx);
78 \& void X509_STORE_CTX_set_error_depth(X509_STORE_CTX *ctx, int depth);
79 \& X509 *X509_STORE_CTX_get_current_cert(const X509_STORE_CTX *ctx);
80 \& void X509_STORE_CTX_set_current_cert(X509_STORE_CTX *ctx, X509 *x);
81 \& X509 *X509_STORE_CTX_get0_cert(const X509_STORE_CTX *ctx);
82 \&
83 \& STACK_OF(X509) *X509_STORE_CTX_get1_chain(const X509_STORE_CTX *ctx);
84 \&
85 \& const char *X509_verify_cert_error_string(long n);
86 .Ve
87 .SH DESCRIPTION
88 .IX Header "DESCRIPTION"
89 These functions are typically called after certificate or chain verification
90 using \fBX509_verify_cert\fR\|(3) or \fBX509_STORE_CTX_verify\fR\|(3) has indicated
91 an error or in a verification callback to determine the nature of an error.
92 .PP
93 \&\fBX509_STORE_CTX_get_error()\fR returns the error code of \fIctx\fR. \fIctx\fR \fBMUST NOT\fR be NULL.
94 See the "ERROR CODES" section for a full description of all error codes.
95 It may return a code != X509_V_OK even if \fBX509_verify_cert()\fR did not indicate
96 an error, likely because a verification callback function has waived the error.
97 .PP
98 \&\fBX509_STORE_CTX_set_error()\fR sets the error code of \fIctx\fR to \fIs\fR. For example
99 it might be used in a verification callback to set an error based on additional
100 checks. \fIctx\fR \fBMUST NOT\fR be NULL.
101 .PP
102 \&\fBX509_STORE_CTX_get_error_depth()\fR returns the \fIdepth\fR of the error. This is a
103 nonnegative integer representing where in the certificate chain the error
104 occurred. If it is zero it occurred in the end entity certificate, one if
105 it is the certificate which signed the end entity certificate and so on.
106 \&\fIctx\fR \fBMUST NOT\fR be NULL.
107 .PP
108 \&\fBX509_STORE_CTX_set_error_depth()\fR sets the error \fIdepth\fR.
109 This can be used in combination with \fBX509_STORE_CTX_set_error()\fR to set the
110 depth at which an error condition was detected.
111 .PP
112 \&\fBX509_STORE_CTX_get_current_cert()\fR returns the current certificate in
113 \&\fIctx\fR. If an error occurred, the current certificate will be the one
114 that is most closely related to the error, or possibly NULL if no such
115 certificate is relevant.
116 .PP
117 \&\fBX509_STORE_CTX_set_current_cert()\fR sets the certificate \fIx\fR in \fIctx\fR which
118 caused the error.
119 This value is not intended to remain valid for very long, and remains owned by
120 the caller.
121 It may be examined by a verification callback invoked to handle each error
122 encountered during chain verification and is no longer required after such a
123 callback.
124 If a callback wishes the save the certificate for use after it returns, it
125 needs to increment its reference count via \fBX509_up_ref\fR\|(3).
126 Once such a \fIsaved\fR certificate is no longer needed it can be freed with
127 \&\fBX509_free\fR\|(3).
128 .PP
129 \&\fBX509_STORE_CTX_get0_cert()\fR retrieves an internal pointer to the
130 certificate being verified by the \fIctx\fR. It may be NULL if a raw public
131 key is being verified.
132 .PP
133 \&\fBX509_STORE_CTX_get1_chain()\fR returns a complete validate chain if a previous
134 verification is successful. Otherwise the returned chain may be incomplete or
135 invalid. The returned chain persists after the \fIctx\fR structure is freed.
136 When it is no longer needed it should be free up using:
137 .PP
138 .Vb 1
139 \& OSSL_STACK_OF_X509_free(chain);
140 .Ve
141 .PP
142 \&\fBX509_verify_cert_error_string()\fR returns a human readable error string for
143 verification error \fIn\fR.
144 .SH "RETURN VALUES"
145 .IX Header "RETURN VALUES"
146 \&\fBX509_STORE_CTX_get_error()\fR returns \fBX509_V_OK\fR or an error code.
147 .PP
148 \&\fBX509_STORE_CTX_get_error_depth()\fR returns a nonnegative error depth.
149 .PP
150 \&\fBX509_STORE_CTX_get_current_cert()\fR returns the certificate which caused the
151 error or NULL if no certificate is relevant to the error.
152 .PP
153 \&\fBX509_verify_cert_error_string()\fR returns a human readable error string for
154 verification error \fIn\fR.
155 .SH "ERROR CODES"
156 .IX Header "ERROR CODES"
157 A list of error codes and messages is shown below. Some of the
158 error codes are defined but currently never returned: these are described as
159 "unused".
160 .IP "\fBX509_V_OK: ok\fR" 4
161 .IX Item "X509_V_OK: ok"
162 The operation was successful.
163 .IP "\fBX509_V_ERR_UNSPECIFIED: unspecified certificate verification error\fR" 4
164 .IX Item "X509_V_ERR_UNSPECIFIED: unspecified certificate verification error"
165 Unspecified error; should not happen.
166 .IP "\fBX509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: unable to get issuer certificate\fR" 4
167 .IX Item "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: unable to get issuer certificate"
168 The issuer certificate of a locally looked up certificate could not be found.
169 This normally means the list of trusted certificates is not complete.
170 To allow any certificate (not only a self-signed one) in the trust store
171 to terminate the chain the \fBX509_V_FLAG_PARTIAL_CHAIN\fR flag may be set.
172 .IP "\fBX509_V_ERR_UNABLE_TO_GET_CRL: unable to get certificate CRL\fR" 4
173 .IX Item "X509_V_ERR_UNABLE_TO_GET_CRL: unable to get certificate CRL"
174 The CRL of a certificate could not be found.
175 .IP "\fBX509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: unable to decrypt certificate's signature\fR" 4
176 .IX Item "X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: unable to decrypt certificate's signature"
177 The certificate signature could not be decrypted. This means that the actual
178 signature value could not be determined rather than it not matching the
179 expected value, this is only meaningful for RSA keys.
180 .IP "\fBX509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: unable to decrypt CRL's signature\fR" 4
181 .IX Item "X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: unable to decrypt CRL's signature"
182 The CRL signature could not be decrypted: this means that the actual signature
183 value could not be determined rather than it not matching the expected value.
184 Unused.
185 .IP "\fBX509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: unable to decode issuer public key\fR" 4
186 .IX Item "X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: unable to decode issuer public key"
187 The public key in the certificate \f(CW\*(C`SubjectPublicKeyInfo\*(C'\fR field could
188 not be read.
189 .IP "\fBX509_V_ERR_CERT_SIGNATURE_FAILURE: certificate signature failure\fR" 4
190 .IX Item "X509_V_ERR_CERT_SIGNATURE_FAILURE: certificate signature failure"
191 The signature of the certificate is invalid.
192 .IP "\fBX509_V_ERR_CRL_SIGNATURE_FAILURE: CRL signature failure\fR" 4
193 .IX Item "X509_V_ERR_CRL_SIGNATURE_FAILURE: CRL signature failure"
194 The signature of the CRL is invalid.
195 .IP "\fBX509_V_ERR_CERT_NOT_YET_VALID: certificate is not yet valid\fR" 4
196 .IX Item "X509_V_ERR_CERT_NOT_YET_VALID: certificate is not yet valid"
197 The certificate is not yet valid: the \f(CW\*(C`notBefore\*(C'\fR date is after the
198 current time.
199 .IP "\fBX509_V_ERR_CERT_HAS_EXPIRED: certificate has expired\fR" 4
200 .IX Item "X509_V_ERR_CERT_HAS_EXPIRED: certificate has expired"
201 The certificate has expired: that is the \f(CW\*(C`notAfter\*(C'\fR date is before the
202 current time.
203 .IP "\fBX509_V_ERR_CRL_NOT_YET_VALID: CRL is not yet valid\fR" 4
204 .IX Item "X509_V_ERR_CRL_NOT_YET_VALID: CRL is not yet valid"
205 The CRL is not yet valid.
206 .IP "\fBX509_V_ERR_CRL_HAS_EXPIRED: CRL has expired\fR" 4
207 .IX Item "X509_V_ERR_CRL_HAS_EXPIRED: CRL has expired"
208 The CRL has expired.
209 .IP "\fBX509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: format error in certificate's notBefore field\fR" 4
210 .IX Item "X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: format error in certificate's notBefore field"
211 The certificate \f(CW\*(C`notBefore\*(C'\fR field contains an invalid time.
212 .IP "\fBX509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: format error in certificate's notAfter field\fR" 4
213 .IX Item "X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: format error in certificate's notAfter field"
214 The certificate \f(CW\*(C`notAfter\*(C'\fR field contains an invalid time.
215 .IP "\fBX509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: format error in CRL's lastUpdate field\fR" 4
216 .IX Item "X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: format error in CRL's lastUpdate field"
217 The CRL \fBlastUpdate\fR field contains an invalid time.
218 .IP "\fBX509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: format error in CRL's nextUpdate field\fR" 4
219 .IX Item "X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: format error in CRL's nextUpdate field"
220 The CRL \f(CW\*(C`nextUpdate\*(C'\fR field contains an invalid time.
221 .IP "\fBX509_V_ERR_OUT_OF_MEM: out of memory\fR" 4
222 .IX Item "X509_V_ERR_OUT_OF_MEM: out of memory"
223 An error occurred trying to allocate memory.
224 .IP "\fBX509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: self-signed certificate\fR" 4
225 .IX Item "X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: self-signed certificate"
226 The passed certificate is self-signed and the same certificate cannot be found
227 in the list of trusted certificates.
228 .IP "\fBX509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: self-signed certificate in certificate chain\fR" 4
229 .IX Item "X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: self-signed certificate in certificate chain"
230 The certificate chain could be built up using the untrusted certificates
231 but no suitable trust anchor (which typically is a self-signed root certificate)
232 could be found in the trust store.
233 .IP "\fBX509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: unable to get local issuer certificate\fR" 4
234 .IX Item "X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: unable to get local issuer certificate"
235 The issuer certificate could not be found: this occurs if the issuer certificate
236 of an untrusted certificate cannot be found.
237 .IP "\fBX509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: unable to verify the first certificate\fR" 4
238 .IX Item "X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: unable to verify the first certificate"
239 No signatures could be verified because the chain contains only one certificate
240 and it is not self-signed and the \fBX509_V_FLAG_PARTIAL_CHAIN\fR flag is not set.
241 .IP "\fBX509_V_ERR_CERT_CHAIN_TOO_LONG: certificate chain too long\fR" 4
242 .IX Item "X509_V_ERR_CERT_CHAIN_TOO_LONG: certificate chain too long"
243 The certificate chain length is greater than the supplied maximum depth.
244 .IP "\fBX509_V_ERR_CERT_REVOKED: certificate revoked\fR" 4
245 .IX Item "X509_V_ERR_CERT_REVOKED: certificate revoked"
246 The certificate has been revoked.
247 .IP "\fBX509_V_ERR_NO_ISSUER_PUBLIC_KEY: issuer certificate doesn't have a public key\fR" 4
248 .IX Item "X509_V_ERR_NO_ISSUER_PUBLIC_KEY: issuer certificate doesn't have a public key"
249 The issuer certificate does not have a public key.
250 .IP "\fBX509_V_ERR_PATH_LENGTH_EXCEEDED: path length constraint exceeded\fR" 4
251 .IX Item "X509_V_ERR_PATH_LENGTH_EXCEEDED: path length constraint exceeded"
252 The basicConstraints path-length parameter has been exceeded.
253 .IP "\fBX509_V_ERR_INVALID_PURPOSE: unsuitable certificate purpose\fR" 4
254 .IX Item "X509_V_ERR_INVALID_PURPOSE: unsuitable certificate purpose"
255 The target certificate cannot be used for the specified purpose.
256 .IP "\fBX509_V_ERR_CERT_UNTRUSTED: certificate not trusted\fR" 4
257 .IX Item "X509_V_ERR_CERT_UNTRUSTED: certificate not trusted"
258 The root CA is not marked as trusted for the specified purpose.
259 .IP "\fBX509_V_ERR_CERT_REJECTED: certificate rejected\fR" 4
260 .IX Item "X509_V_ERR_CERT_REJECTED: certificate rejected"
261 The root CA is marked to reject the specified purpose.
262 .IP "\fBX509_V_ERR_SUBJECT_ISSUER_MISMATCH: subject issuer mismatch\fR" 4
263 .IX Item "X509_V_ERR_SUBJECT_ISSUER_MISMATCH: subject issuer mismatch"
264 The current candidate issuer certificate was rejected because its subject name
265 did not match the issuer name of the current certificate.
266 .IP "\fBX509_V_ERR_AKID_SKID_MISMATCH: authority and subject key identifier mismatch\fR" 4
267 .IX Item "X509_V_ERR_AKID_SKID_MISMATCH: authority and subject key identifier mismatch"
268 The current candidate issuer certificate was rejected because its subject key
269 identifier was present and did not match the authority key identifier current
270 certificate.
271 .IP "\fBX509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: authority and issuer serial number mismatch\fR" 4
272 .IX Item "X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: authority and issuer serial number mismatch"
273 The current candidate issuer certificate was rejected because its issuer name
274 and serial number was present and did not match the authority key identifier of
275 the current certificate.
276 .IP "\fBX509_V_ERR_KEYUSAGE_NO_CERTSIGN: key usage does not include certificate signing\fR" 4
277 .IX Item "X509_V_ERR_KEYUSAGE_NO_CERTSIGN: key usage does not include certificate signing"
278 The current candidate issuer certificate was rejected because its \f(CW\*(C`keyUsage\*(C'\fR
279 extension does not permit certificate signing.
280 .IP "\fBX509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: unable to get CRL issuer certificate\fR" 4
281 .IX Item "X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: unable to get CRL issuer certificate"
282 Unable to get CRL issuer certificate.
283 .IP "\fBX509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: unhandled critical extension\fR" 4
284 .IX Item "X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: unhandled critical extension"
285 Unhandled critical extension.
286 .IP "\fBX509_V_ERR_KEYUSAGE_NO_CRL_SIGN: key usage does not include CRL signing\fR" 4
287 .IX Item "X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: key usage does not include CRL signing"
288 Key usage does not include CRL signing.
289 .IP "\fBX509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: unhandled critical CRL extension\fR" 4
290 .IX Item "X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: unhandled critical CRL extension"
291 Unhandled critical CRL extension.
292 .IP "\fBX509_V_ERR_INVALID_NON_CA: invalid non-CA certificate (has CA markings)\fR" 4
293 .IX Item "X509_V_ERR_INVALID_NON_CA: invalid non-CA certificate (has CA markings)"
294 Invalid non-CA certificate has CA markings.
295 .IP "\fBX509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: proxy path length constraint exceeded\fR" 4
296 .IX Item "X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: proxy path length constraint exceeded"
297 Proxy path length constraint exceeded.
298 .IP "\fBX509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: key usage does not include digital signature\fR" 4
299 .IX Item "X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: key usage does not include digital signature"
300 Key usage does not include digital signature, and therefore cannot sign
301 certificates.
302 .IP "\fBX509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: proxy certificates not allowed, please set the appropriate flag\fR" 4
303 .IX Item "X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: proxy certificates not allowed, please set the appropriate flag"
304 Proxy certificates not allowed unless the \fBX509_V_FLAG_ALLOW_PROXY_CERTS\fR flag
305 is set.
306 .IP "\fBX509_V_ERR_INVALID_EXTENSION: invalid or inconsistent certificate extension\fR" 4
307 .IX Item "X509_V_ERR_INVALID_EXTENSION: invalid or inconsistent certificate extension"
308 A certificate extension had an invalid value (for example an incorrect
309 encoding) or some value inconsistent with other extensions.
310 .IP "\fBX509_V_ERR_INVALID_POLICY_EXTENSION: invalid or inconsistent certificate policy extension\fR" 4
311 .IX Item "X509_V_ERR_INVALID_POLICY_EXTENSION: invalid or inconsistent certificate policy extension"
312 A certificate policies extension had an invalid value (for example an incorrect
313 encoding) or some value inconsistent with other extensions. This error only
314 occurs if policy processing is enabled.
315 .IP "\fBX509_V_ERR_NO_EXPLICIT_POLICY: no explicit policy\fR" 4
316 .IX Item "X509_V_ERR_NO_EXPLICIT_POLICY: no explicit policy"
317 The verification flags were set to require and explicit policy but none was
318 present.
319 .IP "\fBX509_V_ERR_DIFFERENT_CRL_SCOPE: different CRL scope\fR" 4
320 .IX Item "X509_V_ERR_DIFFERENT_CRL_SCOPE: different CRL scope"
321 The only CRLs that could be found did not match the scope of the certificate.
322 .IP "\fBX509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: unsupported extension feature\fR" 4
323 .IX Item "X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: unsupported extension feature"
324 Some feature of a certificate extension is not supported. Unused.
325 .IP "\fBX509_V_ERR_UNNESTED_RESOURCE: RFC 3779 resource not subset of parent's resources\fR" 4
326 .IX Item "X509_V_ERR_UNNESTED_RESOURCE: RFC 3779 resource not subset of parent's resources"
327 See RFC 3779 for details.
328 .IP "\fBX509_V_ERR_PERMITTED_VIOLATION: permitted subtree violation\fR" 4
329 .IX Item "X509_V_ERR_PERMITTED_VIOLATION: permitted subtree violation"
330 A name constraint violation occurred in the permitted subtrees.
331 .IP "\fBX509_V_ERR_EXCLUDED_VIOLATION: excluded subtree violation\fR" 4
332 .IX Item "X509_V_ERR_EXCLUDED_VIOLATION: excluded subtree violation"
333 A name constraint violation occurred in the excluded subtrees.
334 .IP "\fBX509_V_ERR_SUBTREE_MINMAX: name constraints minimum and maximum not supported\fR" 4
335 .IX Item "X509_V_ERR_SUBTREE_MINMAX: name constraints minimum and maximum not supported"
336 A certificate name constraints extension included a minimum or maximum field:
337 this is not supported.
338 .IP "\fBX509_V_ERR_APPLICATION_VERIFICATION: application verification failure\fR" 4
339 .IX Item "X509_V_ERR_APPLICATION_VERIFICATION: application verification failure"
340 An application specific error. This will never be returned unless explicitly
341 set by an application callback.
342 .IP "\fBX509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: unsupported name constraint type\fR" 4
343 .IX Item "X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: unsupported name constraint type"
344 An unsupported name constraint type was encountered. OpenSSL currently only
345 supports directory name, DNS name, email and URI types.
346 .IP "\fBX509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: unsupported or invalid name constraint syntax\fR" 4
347 .IX Item "X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: unsupported or invalid name constraint syntax"
348 The format of the name constraint is not recognised: for example an email
349 address format of a form not mentioned in RFC3280. This could be caused by
350 a garbage extension or some new feature not currently supported.
351 .IP "\fBX509_V_ERR_UNSUPPORTED_NAME_SYNTAX: unsupported or invalid name syntax\fR" 4
352 .IX Item "X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: unsupported or invalid name syntax"
353 Unsupported or invalid name syntax.
354 .IP "\fBX509_V_ERR_CRL_PATH_VALIDATION_ERROR: CRL path validation error\fR" 4
355 .IX Item "X509_V_ERR_CRL_PATH_VALIDATION_ERROR: CRL path validation error"
356 An error occurred when attempting to verify the CRL path. This error can only
357 happen if extended CRL checking is enabled.
358 .IP "\fBX509_V_ERR_PATH_LOOP: path loop\fR" 4
359 .IX Item "X509_V_ERR_PATH_LOOP: path loop"
360 Path loop.
361 .IP "\fBX509_V_ERR_HOSTNAME_MISMATCH: hostname mismatch\fR" 4
362 .IX Item "X509_V_ERR_HOSTNAME_MISMATCH: hostname mismatch"
363 Hostname mismatch.
364 .IP "\fBX509_V_ERR_EMAIL_MISMATCH: email address mismatch\fR" 4
365 .IX Item "X509_V_ERR_EMAIL_MISMATCH: email address mismatch"
366 Email address mismatch.
367 .IP "\fBX509_V_ERR_IP_ADDRESS_MISMATCH: IP address mismatch\fR" 4
368 .IX Item "X509_V_ERR_IP_ADDRESS_MISMATCH: IP address mismatch"
369 IP address mismatch.
370 .IP "\fBX509_V_ERR_DANE_NO_MATCH: no matching DANE TLSA records\fR" 4
371 .IX Item "X509_V_ERR_DANE_NO_MATCH: no matching DANE TLSA records"
372 DANE TLSA authentication is enabled, but no TLSA records matched the
373 certificate chain.
374 This error is only possible in \fBopenssl\-s_client\fR\|(1).
375 .IP "\fBX509_V_ERR_EE_KEY_TOO_SMALL: EE certificate key too weak\fR" 4
376 .IX Item "X509_V_ERR_EE_KEY_TOO_SMALL: EE certificate key too weak"
377 EE certificate key too weak.
378 .IP "\fBX509_V_ERR_CA_KEY_TOO_SMALL: CA certificate key too weak\fR" 4
379 .IX Item "X509_V_ERR_CA_KEY_TOO_SMALL: CA certificate key too weak"
380 CA certificate key too weak.
381 .IP "\fBX509_V_ERR_CA_MD_TOO_WEAK: CA signature digest algorithm too weak\fR" 4
382 .IX Item "X509_V_ERR_CA_MD_TOO_WEAK: CA signature digest algorithm too weak"
383 CA signature digest algorithm too weak.
384 .IP "\fBX509_V_ERR_INVALID_CALL: invalid certificate verification context\fR" 4
385 .IX Item "X509_V_ERR_INVALID_CALL: invalid certificate verification context"
386 Invalid certificate verification context.
387 .IP "\fBX509_V_ERR_STORE_LOOKUP: issuer certificate lookup error\fR" 4
388 .IX Item "X509_V_ERR_STORE_LOOKUP: issuer certificate lookup error"
389 Issuer certificate lookup error.
390 .IP "\fBX509_V_ERR_NO_VALID_SCTS: certificate transparency required, but no valid SCTs found\fR" 4
391 .IX Item "X509_V_ERR_NO_VALID_SCTS: certificate transparency required, but no valid SCTs found"
392 Certificate Transparency required, but no valid SCTs found.
393 .IP "\fBX509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION: proxy subject name violation\fR" 4
394 .IX Item "X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION: proxy subject name violation"
395 Proxy subject name violation.
396 .IP "\fBX509_V_ERR_OCSP_VERIFY_NEEDED: OCSP verification needed\fR" 4
397 .IX Item "X509_V_ERR_OCSP_VERIFY_NEEDED: OCSP verification needed"
398 Returned by the verify callback to indicate an OCSP verification is needed.
399 .IP "\fBX509_V_ERR_OCSP_VERIFY_FAILED: OCSP verification failed\fR" 4
400 .IX Item "X509_V_ERR_OCSP_VERIFY_FAILED: OCSP verification failed"
401 Returned by the verify callback to indicate OCSP verification failed.
402 .IP "\fBX509_V_ERR_OCSP_CERT_UNKNOWN: OCSP unknown cert\fR" 4
403 .IX Item "X509_V_ERR_OCSP_CERT_UNKNOWN: OCSP unknown cert"
404 Returned by the verify callback to indicate that the certificate is not
405 recognized by the OCSP responder.
406 .IP "\fBX509_V_ERR_OCSP_RESP_INVALID: OCSP response(s) invalid\fR" 4
407 .IX Item "X509_V_ERR_OCSP_RESP_INVALID: OCSP response(s) invalid"
408 Returned by the verify callback to indicate that one or more OCSP
409 responses are invalid.
410 .IP "\fBX509_V_ERR_OCSP_SIGNATURE_FAILURE: OCSP response signature failure\fR" 4
411 .IX Item "X509_V_ERR_OCSP_SIGNATURE_FAILURE: OCSP response signature failure"
412 Returned by the verify callback to indicate OCSP response signature
413 verification failed.
414 .IP "\fBX509_V_ERR_OCSP_NOT_YET_VALID: OCSP response not yet valid\fR OCSP response not yet valid (contains a date in the future)>" 4
415 .IX Item "X509_V_ERR_OCSP_NOT_YET_VALID: OCSP response not yet valid OCSP response not yet valid (contains a date in the future)>"
416 Returned by the verify callback to indicate that OCSP response has a
417 \&\fIthisUpdate\fR date in the future.
418 .IP "\fBX509_V_ERR_OCSP_HAS_EXPIRED: OCSP response has expired\fR" 4
419 .IX Item "X509_V_ERR_OCSP_HAS_EXPIRED: OCSP response has expired"
420 Returned by the verify callback to indicate that the OCSP response has expired.
421 .IP "\fBX509_V_ERR_OCSP_NO_RESPONSE: no OCSP response available for certificate\fR" 4
422 .IX Item "X509_V_ERR_OCSP_NO_RESPONSE: no OCSP response available for certificate"
423 Returned by the verify callback to indicate that no OCSP response is available
424 for the certificate.
425 .IP "\fBX509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM: unsupported signature algorithm\fR" 4
426 .IX Item "X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM: unsupported signature algorithm"
427 Cannot find certificate signature algorithm.
428 .IP "\fBX509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH: subject signature algorithm and issuer public key algorithm mismatch\fR" 4
429 .IX Item "X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH: subject signature algorithm and issuer public key algorithm mismatch"
430 The issuer's public key is not of the type required by the signature in
431 the subject's certificate.
432 .IP "\fBX509_V_ERR_SIGNATURE_ALGORITHM_INCONSISTENCY: cert info signature and signature algorithm mismatch\fR" 4
433 .IX Item "X509_V_ERR_SIGNATURE_ALGORITHM_INCONSISTENCY: cert info signature and signature algorithm mismatch"
434 The algorithm given in the certificate info is inconsistent
435 with the one used for the certificate signature.
436 .IP "\fBX509_V_ERR_INVALID_CA: invalid CA certificate\fR" 4
437 .IX Item "X509_V_ERR_INVALID_CA: invalid CA certificate"
438 A CA certificate is invalid. Either it is not a CA or its extensions are not
439 consistent with the supplied purpose.
440 .IP "\fBX509_V_ERR_RPK_UNTRUSTED: raw public key untrusted, no trusted keys configured\fR" 4
441 .IX Item "X509_V_ERR_RPK_UNTRUSTED: raw public key untrusted, no trusted keys configured"
442 No TLS records were configured to validate the raw public key, or DANE was not
443 enabled on the connection.
444 .SH NOTES
445 .IX Header "NOTES"
446 The above functions should be used instead of directly referencing the fields
447 in the \fBX509_VERIFY_CTX\fR structure.
448 .PP
449 In versions of OpenSSL before 1.0 the current certificate returned by
450 \&\fBX509_STORE_CTX_get_current_cert()\fR was never NULL. Applications should
451 check the return value before printing out any debugging information relating
452 to the current certificate.
453 .PP
454 If an unrecognised error code is passed to \fBX509_verify_cert_error_string()\fR the
455 numerical value of the unknown code is returned in a static buffer. This is not
456 thread safe but will never happen unless an invalid code is passed.
457 .SH BUGS
458 .IX Header "BUGS"
459 Previous versions of this documentation swapped the meaning of the
460 \&\fBX509_V_ERR_UNABLE_TO_GET_ISSUER_CERT\fR and
461 \&\fBX509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY\fR error codes.
462 .SH "SEE ALSO"
463 .IX Header "SEE ALSO"
464 \&\fBX509_verify_cert\fR\|(3), \fBX509_STORE_CTX_verify\fR\|(3),
465 \&\fBX509_up_ref\fR\|(3),
466 \&\fBX509_free\fR\|(3).
467 .SH COPYRIGHT
468 .IX Header "COPYRIGHT"
469 Copyright 2009\-2025 The OpenSSL Project Authors. All Rights Reserved.
470 .PP
471 Licensed under the Apache License 2.0 (the "License"). You may not use
472 this file except in compliance with the License. You can obtain a copy
473 in the file LICENSE in the source distribution or at
474 <https://www.openssl.org/source/license.html>.