support for hash and URL encoded certificate payloads in charon

This commit is contained in:
Tobias Brunner
2008-04-18 11:24:45 +00:00
parent eed87e1d76
commit 6439267a8c
23 changed files with 760 additions and 160 deletions
+1 -1
View File
@@ -1,5 +1,4 @@
/* automatic handling of confread struct arguments
* Copyright (C) 2007 Tobias Brunner
* Copyright (C) 2006 Andreas Steffen
* Hochschule fuer Technik Rapperswil, Switzerland
*
@@ -233,6 +232,7 @@ static const token_info_t token_info[] =
{ ARG_STR, offsetof(starter_ca_t, crluri2), NULL },
{ ARG_STR, offsetof(starter_ca_t, ocspuri), NULL },
{ ARG_STR, offsetof(starter_ca_t, ocspuri2), NULL },
{ ARG_STR, offsetof(starter_ca_t, certuribase), NULL },
/* end keywords */
{ ARG_MISC, 0, NULL /* KW_HOST */ },
+1 -2
View File
@@ -1,6 +1,4 @@
/* strongSwan IPsec config file parser
* Copyright (C) 2007 Tobias Brunner
* Hochschule fuer Technik Rapperswil
* Copyright (C) 2001-2002 Mathieu Lafon
* Arkoon Network Security
*
@@ -154,6 +152,7 @@ struct starter_ca {
char *crluri2;
char *ocspuri;
char *ocspuri2;
char *certuribase;
bool strict;
+5
View File
@@ -858,6 +858,11 @@ synonym for
.TP
.B ocspuri2
defines an alternative OCSP URI. Currently used by IKEv2 only.
.B certuribase
defines the base URI for the Hash and URL feature supported by IKEv2.
Instead of exchanging complete certificates, IKEv2 allows to send an URI
that resolves to the DER encoded certificate. The certificate URIs are built
by appending the SHA1 hash of the DER encoded certificates to this base URI.
.SH "CONFIG SECTIONS"
At present, the only
.B config
+2 -2
View File
@@ -1,5 +1,4 @@
/* strongSwan keywords
* Copyright (C) 2007 Tobias Brunner
* Copyright (C) 2005 Andreas Steffen
* Hochschule fuer Technik Rapperswil, Switzerland
*
@@ -105,9 +104,10 @@ typedef enum {
KW_CRLURI2,
KW_OCSPURI,
KW_OCSPURI2,
KW_CERTURIBASE,
#define KW_CA_FIRST KW_CA_SETUP
#define KW_CA_LAST KW_OCSPURI2
#define KW_CA_LAST KW_CERTURIBASE
/* end keywords */
KW_HOST,
+1 -1
View File
@@ -1,6 +1,5 @@
%{
/* strongSwan keywords
* Copyright (C) 2007 Tobias Brunner
* Copyright (C) 2005 Andreas Steffen
* Hochschule fuer Technik Rapperswil, Switzerland
*
@@ -89,6 +88,7 @@ crluri2, KW_CRLURI2
ocspuri, KW_OCSPURI
ocspuri1, KW_OCSPURI
ocspuri2, KW_OCSPURI2
certuribase, KW_CERTURIBASE
left, KW_LEFT
leftnexthop, KW_LEFTNEXTHOP
leftsubnet, KW_LEFTSUBNET
+7 -7
View File
@@ -1,5 +1,4 @@
/* Stroke for charon is the counterpart to whack from pluto
* Copyright (C) 2007 Tobias Brunner
* Copyright (C) 2006 Martin Willi
* Hochschule fuer Technik Rapperswil
*
@@ -308,12 +307,13 @@ int starter_stroke_add_ca(starter_ca_t *ca)
msg.type = STR_ADD_CA;
msg.length = offsetof(stroke_msg_t, buffer);
msg.add_ca.name = push_string(&msg, ca->name);
msg.add_ca.cacert = push_string(&msg, ca->cacert);
msg.add_ca.crluri = push_string(&msg, ca->crluri);
msg.add_ca.crluri2 = push_string(&msg, ca->crluri2);
msg.add_ca.ocspuri = push_string(&msg, ca->ocspuri);
msg.add_ca.ocspuri2 = push_string(&msg, ca->ocspuri2);
msg.add_ca.name = push_string(&msg, ca->name);
msg.add_ca.cacert = push_string(&msg, ca->cacert);
msg.add_ca.crluri = push_string(&msg, ca->crluri);
msg.add_ca.crluri2 = push_string(&msg, ca->crluri2);
msg.add_ca.ocspuri = push_string(&msg, ca->ocspuri);
msg.add_ca.ocspuri2 = push_string(&msg, ca->ocspuri2);
msg.add_ca.certuribase = push_string(&msg, ca->certuribase);
return send_stroke_msg(&msg);
}