.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.48) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "X509_VERIFY_PARAM_SET_HOSTFLAGS 3ssl" .TH X509_VERIFY_PARAM_SET_HOSTFLAGS 3ssl 2026-10-23 4.1.0 OpenSSL .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME X509_VERIFY_PARAM_set_hostflags, X509_VERIFY_PARAM_get_hostflags \- X509 hostname verification flags .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& #include \& \& void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, \& unsigned int flags); \& unsigned int X509_VERIFY_PARAM_get_hostflags(const X509_VERIFY_PARAM *param); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Host flags control how hostname matching is performed during certificate verification: which wildcard forms are permitted in the certificate\*(Aqs subject alternative name (SAN) entries, and whether the certificate\*(Aqs subject distinguished name is consulted in addition to the SAN. .PP \&\fBX509_VERIFY_PARAM_set_hostflags()\fR sets the host flags on \fIparam\fR to \&\fIflags\fR, for use during subsequent calls to \fBX509_verify_cert\fR\|(3). .PP \&\fBX509_VERIFY_PARAM_get_hostflags()\fR returns any host flags previously set via a call to \fBX509_VERIFY_PARAM_set_hostflags()\fR. .PP The \fIflags\fR default to 0. They may be set to a bitwise OR of the following: .IP \fBX509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT\fR 4 .IX Item "X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT" .PD 0 .IP \fBX509_CHECK_FLAG_NEVER_CHECK_SUBJECT\fR 4 .IX Item "X509_CHECK_FLAG_NEVER_CHECK_SUBJECT" .IP \fBX509_CHECK_FLAG_NO_WILDCARDS\fR 4 .IX Item "X509_CHECK_FLAG_NO_WILDCARDS" .IP \fBX509_CHECK_FLAG_NO_PARTIAL_WILDCARDS\fR 4 .IX Item "X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS" .IP \fBX509_CHECK_FLAG_MULTI_LABEL_WILDCARDS\fR 4 .IX Item "X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS" .IP \fBX509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS\fR 4 .IX Item "X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS" .PD .PP By default the subject distinguished name is not consulted; matching is performed only against the subject alternative name extension. .PP The \fBX509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT\fR flag causes the function to also match against the subject DN (the \fBcommonName\fR attribute for DNS names, the \fBemailAddress\fR attribute for email addresses), whether or not the certificate contains a subject alternative name of the corresponding type. During certificate chain verification this flag additionally causes DNS name constraints to be applied to the subject \fBcommonName\fR of the leaf certificate, since the \fBcommonName\fR may then be used as a DNS identity; see \fBNAME_CONSTRAINTS_check\fR\|(3). .PP The \fBX509_CHECK_FLAG_NEVER_CHECK_SUBJECT\fR flag suppresses matching against the subject DN. As that is already the default, this flag has an effect only in combination with \fBX509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT\fR, over which it takes precedence. .PP If set, \fBX509_CHECK_FLAG_NO_WILDCARDS\fR disables wildcard expansion. .PP If set, \fBX509_CHECK_FLAG_NO_PARTIAL_WILDCARDS\fR suppresses support for "*" as wildcard pattern in labels that have a prefix or suffix, such as: "www*" or "*www". .PP If set, \fBX509_CHECK_FLAG_MULTI_LABEL_WILDCARDS\fR allows a "*" that constitutes the complete label of a DNS name (e.g. "*.example.com") to match more than one label in the configured reference identifier. .PP If set, \fBX509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS\fR restricts reference identifiers which start with ".", that would otherwise match any sub\-domain in the peer certificate, to only match direct child sub\-domains. Thus, for instance, with this flag set a reference identifier of ".example.com" would match a peer certificate with a DNS name of "www.example.com", but would not match a peer certificate with a DNS name of "www.sub.example.com". .SH "RETURN VALUES" .IX Header "RETURN VALUES" \&\fBX509_VERIFY_PARAM_get_hostflags()\fR returns the flag values. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBX509_verify_cert\fR\|(3), \&\fBSSL_get_verify_result\fR\|(3), \&\fBX509_VERIFY_PARAM_set1_host\fR\|(3), \&\fBX509_VERIFY_PARAM_add1_host\fR\|(3), \&\fBX509_VERIFY_PARAM_set1_email\fR\|(3), \&\fBX509_VERIFY_PARAM_set1_ip\fR\|(3) .SH HISTORY .IX Header "HISTORY" \&\fBX509_VERIFY_PARAM_set_hostflags()\fR was added in OpenSSL 1.0.2. .PP \&\fBX509_VERIFY_PARAM_get_hostflags()\fR was added in OpenSSL 1.1.0i. .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2026 The OpenSSL Project Authors. All Rights Reserved. .PP Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at .