summaryrefslogtreecommitdiff
path: root/sys/net/pfkeyv2_convert.c
diff options
context:
space:
mode:
authorPeter Hessler <phessler@cvs.openbsd.org>2020-11-05 19:28:29 +0000
committerPeter Hessler <phessler@cvs.openbsd.org>2020-11-05 19:28:29 +0000
commitea4968d4c89d18f758256afafecdced32d7f8136 (patch)
tree3e47eef745dc6be56589437aa3bb0c32432bc007 /sys/net/pfkeyv2_convert.c
parent54d3cff2c8d623786765dca136180c1f6ee1cf9f (diff)
Enable support for ASN1_DN ipsec identifiers.
Tested with multiple Window 10 Pro (ver 2004) clients, and OpenBSD+iked as the server. OK tobhe@ sthen@ kn@
Diffstat (limited to 'sys/net/pfkeyv2_convert.c')
-rw-r--r--sys/net/pfkeyv2_convert.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net/pfkeyv2_convert.c b/sys/net/pfkeyv2_convert.c
index 1d3487b2eb5..1d79e925c6c 100644
--- a/sys/net/pfkeyv2_convert.c
+++ b/sys/net/pfkeyv2_convert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkeyv2_convert.c,v 1.68 2020/07/18 15:10:03 kn Exp $ */
+/* $OpenBSD: pfkeyv2_convert.c,v 1.69 2020/11/05 19:28:28 phessler Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@keromytis.org)
*
@@ -721,6 +721,9 @@ import_identity(struct ipsec_id **id, struct sadb_ident *sadb_ident,
case SADB_IDENTTYPE_USERFQDN:
(*id)->type = IPSP_IDENTITY_USERFQDN;
break;
+ case SADB_IDENTTYPE_ASN1_DN:
+ (*id)->type = IPSP_IDENTITY_ASN1_DN;
+ break;
default:
free(*id, M_CREDENTIALS, *id_sz);
*id = NULL;
@@ -769,6 +772,9 @@ export_identity(void **p, struct ipsec_id *id)
case IPSP_IDENTITY_USERFQDN:
sadb_ident->sadb_ident_type = SADB_IDENTTYPE_USERFQDN;
break;
+ case IPSP_IDENTITY_ASN1_DN:
+ sadb_ident->sadb_ident_type = SADB_IDENTTYPE_ASN1_DN;
+ break;
}
*p += sizeof(struct sadb_ident);
bcopy(id + 1, *p, id->len);