This means userfqdn: is a valid prefix for regular expressions.
case ID_FQDN:
ck_assert(!id_equals(a, "moon.strongswan.org"));
break;
- case ID_USER_FQDN:
+ case ID_RFC822_ADDR:
ck_assert(!id_equals(a, "moon@strongswan.org"));
break;
case ID_IPV6_ADDR:
case ID_FQDN:
ck_assert(id_matches(a, "moon.strongswan.org", ID_MATCH_NONE));
break;
- case ID_USER_FQDN:
+ case ID_RFC822_ADDR:
ck_assert(id_matches(a, "moon@strongswan.org", ID_MATCH_NONE));
break;
case ID_IPV6_ADDR:
case ID_FQDN:
ck_assert(id_matches_rev(a, "moon.strongswan.org", ID_MATCH_NONE));
break;
- case ID_USER_FQDN:
+ case ID_RFC822_ADDR:
ck_assert(id_matches_rev(a, "moon@strongswan.org", ID_MATCH_NONE));
break;
case ID_IPV6_ADDR:
{ "ipv6range:", ID_IPV6_ADDR_RANGE, FALSE},
{ "rfc822:", ID_RFC822_ADDR, TRUE},
{ "email:", ID_RFC822_ADDR, TRUE},
- { "userfqdn:", ID_USER_FQDN, FALSE},
+ { "userfqdn:", ID_RFC822_ADDR, TRUE},
{ "fqdn:", ID_FQDN, TRUE},
{ "dns:", ID_FQDN, TRUE},
{ "asn1dn:", ID_DER_ASN1_DN, TRUE},
}
else if (*string == '@')
{
- this = identification_create(ID_USER_FQDN);
+ this = identification_create(ID_RFC822_ADDR);
this->encoded = chunk_clone(chunk_from_str(string + 1));
return &this->public;
}
* trusted/configured values, never untrusted values received over the network.
*
* A regular expression must be prefixed by an identity type (supported are
- * rfc822:, email:, fqdn:, dns:, and asn1dn:), and it must start with a caret
- * ('^') and end with a dollar sign ('$') to indicate an anchored pattern.
- * If the regular expression is invalid, the function returns NULL.
+ * rfc822:, email:, userfqdn:, fqdn:, dns:, and asn1dn:), and it must start
+ * with a caret ('^') and end with a dollar sign ('$') to indicate an anchored
+ * pattern. If the regular expression is invalid, the function returns NULL.
*
* The regular expression is always matched against the string representation
* of other identities and matching is performed case-insensitive.
Extended POSIX regular expressions are also supported for remote identity
matching. They must start with an explicit type prefix, followed by a caret
character ('^'), and end with a dollar sign ('$') to indicate an anchored
- pattern. Supported types are _rfc822_, _email_, _fqdn_, _dns_, and _asn1dn_.
+ pattern. Make sure to escape backslash characters when configuring
+ identities in double quotes. Supported types are _rfc822_, _email_,
+ _userfqdn_, _fqdn_, _dns_, and _asn1dn_.
While regular expressions are always matched against the string
representation of other identities, the type must match as well. The
- matching is performed case insensitive. Make sure to escape backslash
- characters when configuring identities in double quotes. Examples:
+ matching is performed case insensitive. Examples:
_email:^(moon|sun)@strongswan\.org$_, _fqdn:^vpn[0-9]+\.strongswan\.org$_,
_"asn1dn:^.*CN=.+\\.strongswan\\.org$"_.