summaryrefslogtreecommitdiff
path: root/src/libstrongswan/asn1
diff options
context:
space:
mode:
authorRené Mayrhofer <rene@mayrhofer.eu.org>2011-03-05 09:29:19 +0100
committerRené Mayrhofer <rene@mayrhofer.eu.org>2011-03-05 09:29:19 +0100
commit365e71f706b40c32173fa06c6feaac48c1527520 (patch)
tree54fa72a914d18c9430eaa54f3de4a2d4419198af /src/libstrongswan/asn1
parent5d7669b7b3563c50b3c86903e0a49373d597b8a0 (diff)
parent568905f488e63e28778f87ac0e38d845f45bae79 (diff)
downloadvyos-strongswan-365e71f706b40c32173fa06c6feaac48c1527520.tar.gz
vyos-strongswan-365e71f706b40c32173fa06c6feaac48c1527520.zip
Fixed merge, don't know why this didn't happen automatically - maybe a leftover from the svn->git conversion
Diffstat (limited to 'src/libstrongswan/asn1')
-rw-r--r--src/libstrongswan/asn1/asn1.c97
-rw-r--r--src/libstrongswan/asn1/asn1.h19
-rw-r--r--src/libstrongswan/asn1/asn1_parser.c49
-rw-r--r--src/libstrongswan/asn1/oid.c362
-rw-r--r--src/libstrongswan/asn1/oid.h101
-rw-r--r--src/libstrongswan/asn1/oid.txt27
6 files changed, 655 insertions, 0 deletions
diff --git a/src/libstrongswan/asn1/asn1.c b/src/libstrongswan/asn1/asn1.c
index 6f549d42d..7f198f9aa 100644
--- a/src/libstrongswan/asn1/asn1.c
+++ b/src/libstrongswan/asn1/asn1.c
@@ -126,6 +126,103 @@ chunk_t asn1_build_known_oid(int n)
/*
* Defined in header.
*/
+<<<<<<< HEAD
+=======
+chunk_t asn1_oid_from_string(char *str)
+{
+ enumerator_t *enumerator;
+ u_char buf[32];
+ char *end;
+ int i = 0, pos = 0;
+ u_int val, first = 0;
+
+ enumerator = enumerator_create_token(str, ".", "");
+ while (enumerator->enumerate(enumerator, &str))
+ {
+ val = strtoul(str, &end, 10);
+ if (end == str || pos > countof(buf))
+ {
+ pos = 0;
+ break;
+ }
+ switch (i++)
+ {
+ case 0:
+ first = val;
+ break;
+ case 1:
+ buf[pos++] = first * 40 + val;
+ break;
+ default:
+ if (val < 128)
+ {
+ buf[pos++] = val;
+ }
+ else
+ {
+ buf[pos++] = 128 | (val >> 7);
+ buf[pos++] = (val % 256) & 0x7F;
+ }
+ break;
+ }
+ }
+ enumerator->destroy(enumerator);
+
+ return chunk_clone(chunk_create(buf, pos));
+}
+
+/*
+ * Defined in header.
+ */
+char *asn1_oid_to_string(chunk_t oid)
+{
+ char buf[64], *pos = buf;
+ int len;
+ u_int val;
+
+ if (!oid.len)
+ {
+ return NULL;
+ }
+ val = oid.ptr[0] / 40;
+ len = snprintf(buf, sizeof(buf), "%d.%d", val, oid.ptr[0] - val * 40);
+ oid = chunk_skip(oid, 1);
+ if (len < 0 || len >= sizeof(buf))
+ {
+ return NULL;
+ }
+ pos += len;
+
+ while (oid.len)
+ {
+ if (oid.ptr[0] < 128)
+ {
+ len = snprintf(pos, sizeof(buf) + buf - pos, ".%d", oid.ptr[0]);
+ oid = chunk_skip(oid, 1);
+ }
+ else
+ {
+ if (oid.len == 1)
+ {
+ return NULL;
+ }
+ val = ((u_int)(oid.ptr[0] & 0x7F) << 7) + oid.ptr[1];
+ len = snprintf(pos, sizeof(buf) + buf - pos, ".%d", val);
+ oid = chunk_skip(oid, 2);
+ }
+ if (len < 0 || len >= sizeof(buf) + buf - pos)
+ {
+ return NULL;
+ }
+ pos += len;
+ }
+ return strdup(buf);
+}
+
+/*
+ * Defined in header.
+ */
+>>>>>>> upstream/4.5.1
size_t asn1_length(chunk_t *blob)
{
u_char n;
diff --git a/src/libstrongswan/asn1/asn1.h b/src/libstrongswan/asn1/asn1.h
index 866c28095..70411c999 100644
--- a/src/libstrongswan/asn1/asn1.h
+++ b/src/libstrongswan/asn1/asn1.h
@@ -115,6 +115,25 @@ int asn1_known_oid(chunk_t object);
chunk_t asn1_build_known_oid(int n);
/**
+<<<<<<< HEAD
+=======
+ * Convert human readable OID to ASN.1 DER encoding, without OID header.
+ *
+ * @param str OID string (e.g. 1.2.345.67.8)
+ * @return allocated ASN.1 encoded OID, chunk_empty on error
+ */
+chunk_t asn1_oid_from_string(char *str);
+
+/**
+ * Convert a DER encoded ASN.1 OID to a human readable string.
+ *
+ * @param oid DER encoded OID, without header
+ * @return human readable OID string, allocated, NULL on error
+ */
+char* asn1_oid_to_string(chunk_t oid);
+
+/**
+>>>>>>> upstream/4.5.1
* Returns the length of an ASN.1 object
* The blob pointer is advanced past the tag length fields
*
diff --git a/src/libstrongswan/asn1/asn1_parser.c b/src/libstrongswan/asn1/asn1_parser.c
index 3e5bbbabd..fe02690d9 100644
--- a/src/libstrongswan/asn1/asn1_parser.c
+++ b/src/libstrongswan/asn1/asn1_parser.c
@@ -78,10 +78,15 @@ struct private_asn1_parser_t {
chunk_t blobs[ASN1_MAX_LEVEL + 2];
};
+<<<<<<< HEAD
/**
* Implementation of asn1_parser_t.iterate
*/
static bool iterate(private_asn1_parser_t *this, int *objectID, chunk_t *object)
+=======
+METHOD(asn1_parser_t, iterate, bool,
+ private_asn1_parser_t *this, int *objectID, chunk_t *object)
+>>>>>>> upstream/4.5.1
{
chunk_t *blob, *blob1;
u_char *start_ptr;
@@ -234,43 +239,68 @@ end:
return this->success;
}
+<<<<<<< HEAD
/**
* Implementation of asn1_parser_t.get_level
*/
static u_int get_level(private_asn1_parser_t *this)
+=======
+METHOD(asn1_parser_t, get_level, u_int,
+private_asn1_parser_t *this)
+>>>>>>> upstream/4.5.1
{
return this->level0 + this->objects[this->line].level;
}
+<<<<<<< HEAD
/**
* Implementation of asn1_parser_t.set_top_level
*/
static void set_top_level(private_asn1_parser_t *this, u_int level0)
+=======
+METHOD(asn1_parser_t, set_top_level, void,
+ private_asn1_parser_t *this, u_int level0)
+>>>>>>> upstream/4.5.1
{
this->level0 = level0;
}
+<<<<<<< HEAD
/**
* Implementation of asn1_parser_t.set_flags
*/
static void set_flags(private_asn1_parser_t *this, bool implicit, bool private)
+=======
+METHOD(asn1_parser_t, set_flags, void,
+ private_asn1_parser_t *this, bool implicit, bool private)
+>>>>>>> upstream/4.5.1
{
this->implicit = implicit;
this->private = private;
}
+<<<<<<< HEAD
/**
* Implementation of asn1_parser_t.success
*/
static bool success(private_asn1_parser_t *this)
+=======
+METHOD(asn1_parser_t, success, bool,
+ private_asn1_parser_t *this)
+>>>>>>> upstream/4.5.1
{
return this->success;
}
+<<<<<<< HEAD
/**
* Implementation of asn1_parser_t.destroy
*/
static void destroy(private_asn1_parser_t *this)
+=======
+METHOD(asn1_parser_t, destroy, void,
+ private_asn1_parser_t *this)
+>>>>>>> upstream/4.5.1
{
free(this);
}
@@ -280,6 +310,7 @@ static void destroy(private_asn1_parser_t *this)
*/
asn1_parser_t* asn1_parser_create(asn1Object_t const *objects, chunk_t blob)
{
+<<<<<<< HEAD
private_asn1_parser_t *this = malloc_thing(private_asn1_parser_t);
memset(this, '\0', sizeof(private_asn1_parser_t));
@@ -294,6 +325,24 @@ asn1_parser_t* asn1_parser_create(asn1Object_t const *objects, chunk_t blob)
this->public.set_flags = (void (*)(asn1_parser_t*, bool, bool))set_flags;
this->public.success = (bool (*)(asn1_parser_t*))success;
this->public.destroy = (void (*)(asn1_parser_t*))destroy;
+=======
+ private_asn1_parser_t *this;
+
+ INIT(this,
+ .public = {
+ .iterate = _iterate,
+ .get_level = _get_level,
+ .set_top_level = _set_top_level,
+ .set_flags = _set_flags,
+ .success = _success,
+ .destroy = _destroy,
+ },
+ .objects = objects,
+ .blobs[0] = blob,
+ .line = -1,
+ .success = TRUE,
+ );
+>>>>>>> upstream/4.5.1
return &this->public;
}
diff --git a/src/libstrongswan/asn1/oid.c b/src/libstrongswan/asn1/oid.c
index 1e5dec8a5..b823d6189 100644
--- a/src/libstrongswan/asn1/oid.c
+++ b/src/libstrongswan/asn1/oid.c
@@ -10,6 +10,7 @@
#include "oid.h"
const oid_t oid_names[] = {
+<<<<<<< HEAD
{0x02, 7, 1, 0, "ITU-T Administration" }, /* 0 */
{ 0x82, 0, 1, 1, "" }, /* 1 */
{ 0x06, 0, 1, 2, "Germany ITU-T member" }, /* 2 */
@@ -366,4 +367,365 @@ const oid_t oid_names[] = {
{ 0x07, 354, 0, 9, "transID" }, /* 353 */
{ 0x08, 355, 0, 9, "extensionReq" }, /* 354 */
{ 0x08, 0, 0, 9, "extensionReq" } /* 355 */
+=======
+ {0x02, 7, 1, 0, "ITU-T Administration" }, /* 0 */
+ { 0x82, 0, 1, 1, "" }, /* 1 */
+ { 0x06, 0, 1, 2, "Germany ITU-T member" }, /* 2 */
+ { 0x01, 0, 1, 3, "Deutsche Telekom AG" }, /* 3 */
+ { 0x0A, 0, 1, 4, "" }, /* 4 */
+ { 0x07, 0, 1, 5, "" }, /* 5 */
+ { 0x14, 0, 0, 6, "ND" }, /* 6 */
+ {0x09, 18, 1, 0, "data" }, /* 7 */
+ { 0x92, 0, 1, 1, "" }, /* 8 */
+ { 0x26, 0, 1, 2, "" }, /* 9 */
+ { 0x89, 0, 1, 3, "" }, /* 10 */
+ { 0x93, 0, 1, 4, "" }, /* 11 */
+ { 0xF2, 0, 1, 5, "" }, /* 12 */
+ { 0x2C, 0, 1, 6, "" }, /* 13 */
+ { 0x64, 0, 1, 7, "pilot" }, /* 14 */
+ { 0x01, 0, 1, 8, "pilotAttributeType" }, /* 15 */
+ { 0x01, 17, 0, 9, "UID" }, /* 16 */
+ { 0x19, 0, 0, 9, "DC" }, /* 17 */
+ {0x55, 64, 1, 0, "X.500" }, /* 18 */
+ { 0x04, 36, 1, 1, "X.509" }, /* 19 */
+ { 0x03, 21, 0, 2, "CN" }, /* 20 */
+ { 0x04, 22, 0, 2, "S" }, /* 21 */
+ { 0x05, 23, 0, 2, "SN" }, /* 22 */
+ { 0x06, 24, 0, 2, "C" }, /* 23 */
+ { 0x07, 25, 0, 2, "L" }, /* 24 */
+ { 0x08, 26, 0, 2, "ST" }, /* 25 */
+ { 0x0A, 27, 0, 2, "O" }, /* 26 */
+ { 0x0B, 28, 0, 2, "OU" }, /* 27 */
+ { 0x0C, 29, 0, 2, "T" }, /* 28 */
+ { 0x0D, 30, 0, 2, "D" }, /* 29 */
+ { 0x24, 31, 0, 2, "userCertificate" }, /* 30 */
+ { 0x29, 32, 0, 2, "N" }, /* 31 */
+ { 0x2A, 33, 0, 2, "G" }, /* 32 */
+ { 0x2B, 34, 0, 2, "I" }, /* 33 */
+ { 0x2D, 35, 0, 2, "ID" }, /* 34 */
+ { 0x48, 0, 0, 2, "role" }, /* 35 */
+ { 0x1D, 0, 1, 1, "id-ce" }, /* 36 */
+ { 0x09, 38, 0, 2, "subjectDirectoryAttrs" }, /* 37 */
+ { 0x0E, 39, 0, 2, "subjectKeyIdentifier" }, /* 38 */
+ { 0x0F, 40, 0, 2, "keyUsage" }, /* 39 */
+ { 0x10, 41, 0, 2, "privateKeyUsagePeriod" }, /* 40 */
+ { 0x11, 42, 0, 2, "subjectAltName" }, /* 41 */
+ { 0x12, 43, 0, 2, "issuerAltName" }, /* 42 */
+ { 0x13, 44, 0, 2, "basicConstraints" }, /* 43 */
+ { 0x14, 45, 0, 2, "crlNumber" }, /* 44 */
+ { 0x15, 46, 0, 2, "reasonCode" }, /* 45 */
+ { 0x17, 47, 0, 2, "holdInstructionCode" }, /* 46 */
+ { 0x18, 48, 0, 2, "invalidityDate" }, /* 47 */
+ { 0x1B, 49, 0, 2, "deltaCrlIndicator" }, /* 48 */
+ { 0x1C, 50, 0, 2, "issuingDistributionPoint" }, /* 49 */
+ { 0x1D, 51, 0, 2, "certificateIssuer" }, /* 50 */
+ { 0x1E, 52, 0, 2, "nameConstraints" }, /* 51 */
+ { 0x1F, 53, 0, 2, "crlDistributionPoints" }, /* 52 */
+ { 0x20, 55, 1, 2, "certificatePolicies" }, /* 53 */
+ { 0x00, 0, 0, 3, "anyPolicy" }, /* 54 */
+ { 0x21, 56, 0, 2, "policyMappings" }, /* 55 */
+ { 0x23, 57, 0, 2, "authorityKeyIdentifier" }, /* 56 */
+ { 0x24, 58, 0, 2, "policyConstraints" }, /* 57 */
+ { 0x25, 60, 1, 2, "extendedKeyUsage" }, /* 58 */
+ { 0x00, 0, 0, 3, "anyExtendedKeyUsage" }, /* 59 */
+ { 0x2E, 61, 0, 2, "freshestCRL" }, /* 60 */
+ { 0x36, 62, 0, 2, "inhibitAnyPolicy" }, /* 61 */
+ { 0x37, 63, 0, 2, "targetInformation" }, /* 62 */
+ { 0x38, 0, 0, 2, "noRevAvail" }, /* 63 */
+ {0x2A, 161, 1, 0, "" }, /* 64 */
+ { 0x83, 77, 1, 1, "" }, /* 65 */
+ { 0x08, 0, 1, 2, "jp" }, /* 66 */
+ { 0x8C, 0, 1, 3, "" }, /* 67 */
+ { 0x9A, 0, 1, 4, "" }, /* 68 */
+ { 0x4B, 0, 1, 5, "" }, /* 69 */
+ { 0x3D, 0, 1, 6, "" }, /* 70 */
+ { 0x01, 0, 1, 7, "security" }, /* 71 */
+ { 0x01, 0, 1, 8, "algorithm" }, /* 72 */
+ { 0x01, 0, 1, 9, "symm-encryption-alg" }, /* 73 */
+ { 0x02, 75, 0, 10, "camellia128-cbc" }, /* 74 */
+ { 0x03, 76, 0, 10, "camellia192-cbc" }, /* 75 */
+ { 0x04, 0, 0, 10, "camellia256-cbc" }, /* 76 */
+ { 0x86, 0, 1, 1, "" }, /* 77 */
+ { 0x48, 0, 1, 2, "us" }, /* 78 */
+ { 0x86, 120, 1, 3, "" }, /* 79 */
+ { 0xF6, 85, 1, 4, "" }, /* 80 */
+ { 0x7D, 0, 1, 5, "NortelNetworks" }, /* 81 */
+ { 0x07, 0, 1, 6, "Entrust" }, /* 82 */
+ { 0x41, 0, 1, 7, "nsn-ce" }, /* 83 */
+ { 0x00, 0, 0, 8, "entrustVersInfo" }, /* 84 */
+ { 0xF7, 0, 1, 4, "" }, /* 85 */
+ { 0x0D, 0, 1, 5, "RSADSI" }, /* 86 */
+ { 0x01, 115, 1, 6, "PKCS" }, /* 87 */
+ { 0x01, 97, 1, 7, "PKCS-1" }, /* 88 */
+ { 0x01, 90, 0, 8, "rsaEncryption" }, /* 89 */
+ { 0x02, 91, 0, 8, "md2WithRSAEncryption" }, /* 90 */
+ { 0x04, 92, 0, 8, "md5WithRSAEncryption" }, /* 91 */
+ { 0x05, 93, 0, 8, "sha-1WithRSAEncryption" }, /* 92 */
+ { 0x0B, 94, 0, 8, "sha256WithRSAEncryption" }, /* 93 */
+ { 0x0C, 95, 0, 8, "sha384WithRSAEncryption" }, /* 94 */
+ { 0x0D, 96, 0, 8, "sha512WithRSAEncryption" }, /* 95 */
+ { 0x0E, 0, 0, 8, "sha224WithRSAEncryption" }, /* 96 */
+ { 0x07, 104, 1, 7, "PKCS-7" }, /* 97 */
+ { 0x01, 99, 0, 8, "data" }, /* 98 */
+ { 0x02, 100, 0, 8, "signedData" }, /* 99 */
+ { 0x03, 101, 0, 8, "envelopedData" }, /* 100 */
+ { 0x04, 102, 0, 8, "signedAndEnvelopedData" }, /* 101 */
+ { 0x05, 103, 0, 8, "digestedData" }, /* 102 */
+ { 0x06, 0, 0, 8, "encryptedData" }, /* 103 */
+ { 0x09, 0, 1, 7, "PKCS-9" }, /* 104 */
+ { 0x01, 106, 0, 8, "E" }, /* 105 */
+ { 0x02, 107, 0, 8, "unstructuredName" }, /* 106 */
+ { 0x03, 108, 0, 8, "contentType" }, /* 107 */
+ { 0x04, 109, 0, 8, "messageDigest" }, /* 108 */
+ { 0x05, 110, 0, 8, "signingTime" }, /* 109 */
+ { 0x06, 111, 0, 8, "counterSignature" }, /* 110 */
+ { 0x07, 112, 0, 8, "challengePassword" }, /* 111 */
+ { 0x08, 113, 0, 8, "unstructuredAddress" }, /* 112 */
+ { 0x0E, 114, 0, 8, "extensionRequest" }, /* 113 */
+ { 0x0F, 0, 0, 8, "S/MIME Capabilities" }, /* 114 */
+ { 0x02, 118, 1, 6, "digestAlgorithm" }, /* 115 */
+ { 0x02, 117, 0, 7, "md2" }, /* 116 */
+ { 0x05, 0, 0, 7, "md5" }, /* 117 */
+ { 0x03, 0, 1, 6, "encryptionAlgorithm" }, /* 118 */
+ { 0x07, 0, 0, 7, "3des-ede-cbc" }, /* 119 */
+ { 0xCE, 0, 1, 3, "" }, /* 120 */
+ { 0x3D, 0, 1, 4, "ansi-X9-62" }, /* 121 */
+ { 0x02, 124, 1, 5, "id-publicKeyType" }, /* 122 */
+ { 0x01, 0, 0, 6, "id-ecPublicKey" }, /* 123 */
+ { 0x03, 154, 1, 5, "ellipticCurve" }, /* 124 */
+ { 0x00, 146, 1, 6, "c-TwoCurve" }, /* 125 */
+ { 0x01, 127, 0, 7, "c2pnb163v1" }, /* 126 */
+ { 0x02, 128, 0, 7, "c2pnb163v2" }, /* 127 */
+ { 0x03, 129, 0, 7, "c2pnb163v3" }, /* 128 */
+ { 0x04, 130, 0, 7, "c2pnb176w1" }, /* 129 */
+ { 0x05, 131, 0, 7, "c2tnb191v1" }, /* 130 */
+ { 0x06, 132, 0, 7, "c2tnb191v2" }, /* 131 */
+ { 0x07, 133, 0, 7, "c2tnb191v3" }, /* 132 */
+ { 0x08, 134, 0, 7, "c2onb191v4" }, /* 133 */
+ { 0x09, 135, 0, 7, "c2onb191v5" }, /* 134 */
+ { 0x0A, 136, 0, 7, "c2pnb208w1" }, /* 135 */
+ { 0x0B, 137, 0, 7, "c2tnb239v1" }, /* 136 */
+ { 0x0C, 138, 0, 7, "c2tnb239v2" }, /* 137 */
+ { 0x0D, 139, 0, 7, "c2tnb239v3" }, /* 138 */
+ { 0x0E, 140, 0, 7, "c2onb239v4" }, /* 139 */
+ { 0x0F, 141, 0, 7, "c2onb239v5" }, /* 140 */
+ { 0x10, 142, 0, 7, "c2pnb272w1" }, /* 141 */
+ { 0x11, 143, 0, 7, "c2pnb304w1" }, /* 142 */
+ { 0x12, 144, 0, 7, "c2tnb359v1" }, /* 143 */
+ { 0x13, 145, 0, 7, "c2pnb368w1" }, /* 144 */
+ { 0x14, 0, 0, 7, "c2tnb431r1" }, /* 145 */
+ { 0x01, 0, 1, 6, "primeCurve" }, /* 146 */
+ { 0x01, 148, 0, 7, "prime192v1" }, /* 147 */
+ { 0x02, 149, 0, 7, "prime192v2" }, /* 148 */
+ { 0x03, 150, 0, 7, "prime192v3" }, /* 149 */
+ { 0x04, 151, 0, 7, "prime239v1" }, /* 150 */
+ { 0x05, 152, 0, 7, "prime239v2" }, /* 151 */
+ { 0x06, 153, 0, 7, "prime239v3" }, /* 152 */
+ { 0x07, 0, 0, 7, "prime256v1" }, /* 153 */
+ { 0x04, 0, 1, 5, "id-ecSigType" }, /* 154 */
+ { 0x01, 156, 0, 6, "ecdsa-with-SHA1" }, /* 155 */
+ { 0x03, 0, 1, 6, "ecdsa-with-Specified" }, /* 156 */
+ { 0x01, 158, 0, 7, "ecdsa-with-SHA224" }, /* 157 */
+ { 0x02, 159, 0, 7, "ecdsa-with-SHA256" }, /* 158 */
+ { 0x03, 160, 0, 7, "ecdsa-with-SHA384" }, /* 159 */
+ { 0x04, 0, 0, 7, "ecdsa-with-SHA512" }, /* 160 */
+ {0x2B, 312, 1, 0, "" }, /* 161 */
+ { 0x06, 226, 1, 1, "dod" }, /* 162 */
+ { 0x01, 0, 1, 2, "internet" }, /* 163 */
+ { 0x04, 186, 1, 3, "private" }, /* 164 */
+ { 0x01, 0, 1, 4, "enterprise" }, /* 165 */
+ { 0x82, 179, 1, 5, "" }, /* 166 */
+ { 0x37, 176, 1, 6, "Microsoft" }, /* 167 */
+ { 0x0A, 172, 1, 7, "" }, /* 168 */
+ { 0x03, 0, 1, 8, "" }, /* 169 */
+ { 0x03, 171, 0, 9, "msSGC" }, /* 170 */
+ { 0x04, 0, 0, 9, "msEncryptingFileSystem" }, /* 171 */
+ { 0x14, 0, 1, 7, "msEnrollmentInfrastructure"}, /* 172 */
+ { 0x02, 0, 1, 8, "msCertificateTypeExtension"}, /* 173 */
+ { 0x02, 175, 0, 9, "msSmartcardLogon" }, /* 174 */
+ { 0x03, 0, 0, 9, "msUPN" }, /* 175 */
+ { 0xA0, 0, 1, 6, "" }, /* 176 */
+ { 0x2A, 0, 1, 7, "ITA" }, /* 177 */
+ { 0x01, 0, 0, 8, "strongSwan" }, /* 178 */
+ { 0x89, 0, 1, 5, "" }, /* 179 */
+ { 0x31, 0, 1, 6, "" }, /* 180 */
+ { 0x01, 0, 1, 7, "" }, /* 181 */
+ { 0x01, 0, 1, 8, "" }, /* 182 */
+ { 0x02, 0, 1, 9, "" }, /* 183 */
+ { 0x02, 0, 1, 10, "" }, /* 184 */
+ { 0x4B, 0, 0, 11, "TCGID" }, /* 185 */
+ { 0x05, 0, 1, 3, "security" }, /* 186 */
+ { 0x05, 0, 1, 4, "mechanisms" }, /* 187 */
+ { 0x07, 0, 1, 5, "id-pkix" }, /* 188 */
+ { 0x01, 193, 1, 6, "id-pe" }, /* 189 */
+ { 0x01, 191, 0, 7, "authorityInfoAccess" }, /* 190 */
+ { 0x03, 192, 0, 7, "qcStatements" }, /* 191 */
+ { 0x07, 0, 0, 7, "ipAddrBlocks" }, /* 192 */
+ { 0x02, 196, 1, 6, "id-qt" }, /* 193 */
+ { 0x01, 195, 0, 7, "cps" }, /* 194 */
+ { 0x02, 0, 0, 7, "unotice" }, /* 195 */
+ { 0x03, 206, 1, 6, "id-kp" }, /* 196 */
+ { 0x01, 198, 0, 7, "serverAuth" }, /* 197 */
+ { 0x02, 199, 0, 7, "clientAuth" }, /* 198 */
+ { 0x03, 200, 0, 7, "codeSigning" }, /* 199 */
+ { 0x04, 201, 0, 7, "emailProtection" }, /* 200 */
+ { 0x05, 202, 0, 7, "ipsecEndSystem" }, /* 201 */
+ { 0x06, 203, 0, 7, "ipsecTunnel" }, /* 202 */
+ { 0x07, 204, 0, 7, "ipsecUser" }, /* 203 */
+ { 0x08, 205, 0, 7, "timeStamping" }, /* 204 */
+ { 0x09, 0, 0, 7, "ocspSigning" }, /* 205 */
+ { 0x08, 208, 1, 6, "id-otherNames" }, /* 206 */
+ { 0x05, 0, 0, 7, "xmppAddr" }, /* 207 */
+ { 0x0A, 213, 1, 6, "id-aca" }, /* 208 */
+ { 0x01, 210, 0, 7, "authenticationInfo" }, /* 209 */
+ { 0x02, 211, 0, 7, "accessIdentity" }, /* 210 */
+ { 0x03, 212, 0, 7, "chargingIdentity" }, /* 211 */
+ { 0x04, 0, 0, 7, "group" }, /* 212 */
+ { 0x0B, 214, 0, 6, "subjectInfoAccess" }, /* 213 */
+ { 0x30, 0, 1, 6, "id-ad" }, /* 214 */
+ { 0x01, 223, 1, 7, "ocsp" }, /* 215 */
+ { 0x01, 217, 0, 8, "basic" }, /* 216 */
+ { 0x02, 218, 0, 8, "nonce" }, /* 217 */
+ { 0x03, 219, 0, 8, "crl" }, /* 218 */
+ { 0x04, 220, 0, 8, "response" }, /* 219 */
+ { 0x05, 221, 0, 8, "noCheck" }, /* 220 */
+ { 0x06, 222, 0, 8, "archiveCutoff" }, /* 221 */
+ { 0x07, 0, 0, 8, "serviceLocator" }, /* 222 */
+ { 0x02, 224, 0, 7, "caIssuers" }, /* 223 */
+ { 0x03, 225, 0, 7, "timeStamping" }, /* 224 */
+ { 0x05, 0, 0, 7, "caRepository" }, /* 225 */
+ { 0x0E, 232, 1, 1, "oiw" }, /* 226 */
+ { 0x03, 0, 1, 2, "secsig" }, /* 227 */
+ { 0x02, 0, 1, 3, "algorithms" }, /* 228 */
+ { 0x07, 230, 0, 4, "des-cbc" }, /* 229 */
+ { 0x1A, 231, 0, 4, "sha-1" }, /* 230 */
+ { 0x1D, 0, 0, 4, "sha-1WithRSASignature" }, /* 231 */
+ { 0x24, 278, 1, 1, "TeleTrusT" }, /* 232 */
+ { 0x03, 0, 1, 2, "algorithm" }, /* 233 */
+ { 0x03, 0, 1, 3, "signatureAlgorithm" }, /* 234 */
+ { 0x01, 239, 1, 4, "rsaSignature" }, /* 235 */
+ { 0x02, 237, 0, 5, "rsaSigWithripemd160" }, /* 236 */
+ { 0x03, 238, 0, 5, "rsaSigWithripemd128" }, /* 237 */
+ { 0x04, 0, 0, 5, "rsaSigWithripemd256" }, /* 238 */
+ { 0x02, 0, 1, 4, "ecSign" }, /* 239 */
+ { 0x01, 241, 0, 5, "ecSignWithsha1" }, /* 240 */
+ { 0x02, 242, 0, 5, "ecSignWithripemd160" }, /* 241 */
+ { 0x03, 243, 0, 5, "ecSignWithmd2" }, /* 242 */
+ { 0x04, 244, 0, 5, "ecSignWithmd5" }, /* 243 */
+ { 0x05, 261, 1, 5, "ttt-ecg" }, /* 244 */
+ { 0x01, 249, 1, 6, "fieldType" }, /* 245 */
+ { 0x01, 0, 1, 7, "characteristictwoField" }, /* 246 */
+ { 0x01, 0, 1, 8, "basisType" }, /* 247 */
+ { 0x01, 0, 0, 9, "ipBasis" }, /* 248 */
+ { 0x02, 251, 1, 6, "keyType" }, /* 249 */
+ { 0x01, 0, 0, 7, "ecgPublicKey" }, /* 250 */
+ { 0x03, 252, 0, 6, "curve" }, /* 251 */
+ { 0x04, 259, 1, 6, "signatures" }, /* 252 */
+ { 0x01, 254, 0, 7, "ecgdsa-with-RIPEMD160" }, /* 253 */
+ { 0x02, 255, 0, 7, "ecgdsa-with-SHA1" }, /* 254 */
+ { 0x03, 256, 0, 7, "ecgdsa-with-SHA224" }, /* 255 */
+ { 0x04, 257, 0, 7, "ecgdsa-with-SHA256" }, /* 256 */
+ { 0x05, 258, 0, 7, "ecgdsa-with-SHA384" }, /* 257 */
+ { 0x06, 0, 0, 7, "ecgdsa-with-SHA512" }, /* 258 */
+ { 0x05, 0, 1, 6, "module" }, /* 259 */
+ { 0x01, 0, 0, 7, "1" }, /* 260 */
+ { 0x08, 0, 1, 5, "ecStdCurvesAndGeneration" }, /* 261 */
+ { 0x01, 0, 1, 6, "ellipticCurve" }, /* 262 */
+ { 0x01, 0, 1, 7, "versionOne" }, /* 263 */
+ { 0x01, 265, 0, 8, "brainpoolP160r1" }, /* 264 */
+ { 0x02, 266, 0, 8, "brainpoolP160t1" }, /* 265 */
+ { 0x03, 267, 0, 8, "brainpoolP192r1" }, /* 266 */
+ { 0x04, 268, 0, 8, "brainpoolP192t1" }, /* 267 */
+ { 0x05, 269, 0, 8, "brainpoolP224r1" }, /* 268 */
+ { 0x06, 270, 0, 8, "brainpoolP224t1" }, /* 269 */
+ { 0x07, 271, 0, 8, "brainpoolP256r1" }, /* 270 */
+ { 0x08, 272, 0, 8, "brainpoolP256t1" }, /* 271 */
+ { 0x09, 273, 0, 8, "brainpoolP320r1" }, /* 272 */
+ { 0x0A, 274, 0, 8, "brainpoolP320t1" }, /* 273 */
+ { 0x0B, 275, 0, 8, "brainpoolP384r1" }, /* 274 */
+ { 0x0C, 276, 0, 8, "brainpoolP384t1" }, /* 275 */
+ { 0x0D, 277, 0, 8, "brainpoolP512r1" }, /* 276 */
+ { 0x0E, 0, 0, 8, "brainpoolP512t1" }, /* 277 */
+ { 0x81, 0, 1, 1, "" }, /* 278 */
+ { 0x04, 0, 1, 2, "Certicom" }, /* 279 */
+ { 0x00, 0, 1, 3, "curve" }, /* 280 */
+ { 0x01, 282, 0, 4, "sect163k1" }, /* 281 */
+ { 0x02, 283, 0, 4, "sect163r1" }, /* 282 */
+ { 0x03, 284, 0, 4, "sect239k1" }, /* 283 */
+ { 0x04, 285, 0, 4, "sect113r1" }, /* 284 */
+ { 0x05, 286, 0, 4, "sect113r2" }, /* 285 */
+ { 0x06, 287, 0, 4, "secp112r1" }, /* 286 */
+ { 0x07, 288, 0, 4, "secp112r2" }, /* 287 */
+ { 0x08, 289, 0, 4, "secp160r1" }, /* 288 */
+ { 0x09, 290, 0, 4, "secp160k1" }, /* 289 */
+ { 0x0A, 291, 0, 4, "secp256k1" }, /* 290 */
+ { 0x0F, 292, 0, 4, "sect163r2" }, /* 291 */
+ { 0x10, 293, 0, 4, "sect283k1" }, /* 292 */
+ { 0x11, 294, 0, 4, "sect283r1" }, /* 293 */
+ { 0x16, 295, 0, 4, "sect131r1" }, /* 294 */
+ { 0x17, 296, 0, 4, "sect131r2" }, /* 295 */
+ { 0x18, 297, 0, 4, "sect193r1" }, /* 296 */
+ { 0x19, 298, 0, 4, "sect193r2" }, /* 297 */
+ { 0x1A, 299, 0, 4, "sect233k1" }, /* 298 */
+ { 0x1B, 300, 0, 4, "sect233r1" }, /* 299 */
+ { 0x1C, 301, 0, 4, "secp128r1" }, /* 300 */
+ { 0x1D, 302, 0, 4, "secp128r2" }, /* 301 */
+ { 0x1E, 303, 0, 4, "secp160r2" }, /* 302 */
+ { 0x1F, 304, 0, 4, "secp192k1" }, /* 303 */
+ { 0x20, 305, 0, 4, "secp224k1" }, /* 304 */
+ { 0x21, 306, 0, 4, "secp224r1" }, /* 305 */
+ { 0x22, 307, 0, 4, "secp384r1" }, /* 306 */
+ { 0x23, 308, 0, 4, "secp521r1" }, /* 307 */
+ { 0x24, 309, 0, 4, "sect409k1" }, /* 308 */
+ { 0x25, 310, 0, 4, "sect409r1" }, /* 309 */
+ { 0x26, 311, 0, 4, "sect571k1" }, /* 310 */
+ { 0x27, 0, 0, 4, "sect571r1" }, /* 311 */
+ {0x60, 0, 1, 0, "" }, /* 312 */
+ { 0x86, 0, 1, 1, "" }, /* 313 */
+ { 0x48, 0, 1, 2, "" }, /* 314 */
+ { 0x01, 0, 1, 3, "organization" }, /* 315 */
+ { 0x65, 334, 1, 4, "gov" }, /* 316 */
+ { 0x03, 0, 1, 5, "csor" }, /* 317 */
+ { 0x04, 0, 1, 6, "nistalgorithm" }, /* 318 */
+ { 0x01, 329, 1, 7, "aes" }, /* 319 */
+ { 0x02, 321, 0, 8, "id-aes128-CBC" }, /* 320 */
+ { 0x06, 322, 0, 8, "id-aes128-GCM" }, /* 321 */
+ { 0x07, 323, 0, 8, "id-aes128-CCM" }, /* 322 */
+ { 0x16, 324, 0, 8, "id-aes192-CBC" }, /* 323 */
+ { 0x1A, 325, 0, 8, "id-aes192-GCM" }, /* 324 */
+ { 0x1B, 326, 0, 8, "id-aes192-CCM" }, /* 325 */
+ { 0x2A, 327, 0, 8, "id-aes256-CBC" }, /* 326 */
+ { 0x2E, 328, 0, 8, "id-aes256-GCM" }, /* 327 */
+ { 0x2F, 0, 0, 8, "id-aes256-CCM" }, /* 328 */
+ { 0x02, 0, 1, 7, "hashalgs" }, /* 329 */
+ { 0x01, 331, 0, 8, "id-SHA-256" }, /* 330 */
+ { 0x02, 332, 0, 8, "id-SHA-384" }, /* 331 */
+ { 0x03, 333, 0, 8, "id-SHA-512" }, /* 332 */
+ { 0x04, 0, 0, 8, "id-SHA-224" }, /* 333 */
+ { 0x86, 0, 1, 4, "" }, /* 334 */
+ { 0xf8, 0, 1, 5, "" }, /* 335 */
+ { 0x42, 348, 1, 6, "netscape" }, /* 336 */
+ { 0x01, 343, 1, 7, "" }, /* 337 */
+ { 0x01, 339, 0, 8, "nsCertType" }, /* 338 */
+ { 0x03, 340, 0, 8, "nsRevocationUrl" }, /* 339 */
+ { 0x04, 341, 0, 8, "nsCaRevocationUrl" }, /* 340 */
+ { 0x08, 342, 0, 8, "nsCaPolicyUrl" }, /* 341 */
+ { 0x0d, 0, 0, 8, "nsComment" }, /* 342 */
+ { 0x03, 346, 1, 7, "directory" }, /* 343 */
+ { 0x01, 0, 1, 8, "" }, /* 344 */
+ { 0x03, 0, 0, 9, "employeeNumber" }, /* 345 */
+ { 0x04, 0, 1, 7, "policy" }, /* 346 */
+ { 0x01, 0, 0, 8, "nsSGC" }, /* 347 */
+ { 0x45, 0, 1, 6, "verisign" }, /* 348 */
+ { 0x01, 0, 1, 7, "pki" }, /* 349 */
+ { 0x09, 0, 1, 8, "attributes" }, /* 350 */
+ { 0x02, 352, 0, 9, "messageType" }, /* 351 */
+ { 0x03, 353, 0, 9, "pkiStatus" }, /* 352 */
+ { 0x04, 354, 0, 9, "failInfo" }, /* 353 */
+ { 0x05, 355, 0, 9, "senderNonce" }, /* 354 */
+ { 0x06, 356, 0, 9, "recipientNonce" }, /* 355 */
+ { 0x07, 357, 0, 9, "transID" }, /* 356 */
+ { 0x08, 358, 0, 9, "extensionReq" }, /* 357 */
+ { 0x08, 0, 0, 9, "extensionReq" } /* 358 */
+>>>>>>> upstream/4.5.1
};
diff --git a/src/libstrongswan/asn1/oid.h b/src/libstrongswan/asn1/oid.h
index 16c9e854b..e9de81ccf 100644
--- a/src/libstrongswan/asn1/oid.h
+++ b/src/libstrongswan/asn1/oid.h
@@ -49,8 +49,16 @@ extern const oid_t oid_names[];
#define OID_DELTA_CRL_INDICATOR 48
#define OID_NAME_CONSTRAINTS 51
#define OID_CRL_DISTRIBUTION_POINTS 52
+<<<<<<< HEAD
#define OID_ANY_POLICY 54
#define OID_AUTHORITY_KEY_ID 56
+=======
+#define OID_CERTIFICATE_POLICIES 53
+#define OID_ANY_POLICY 54
+#define OID_POLICY_MAPPINGS 55
+#define OID_AUTHORITY_KEY_ID 56
+#define OID_POLICY_CONSTRAINTS 57
+>>>>>>> upstream/4.5.1
#define OID_EXTENDED_KEY_USAGE 58
#define OID_FRESHEST_CRL 60
#define OID_INHIBIT_ANY_POLICY 61
@@ -117,6 +125,7 @@ extern const oid_t oid_names[];
#define OID_ECDSA_WITH_SHA384 159
#define OID_ECDSA_WITH_SHA512 160
#define OID_USER_PRINCIPAL_NAME 175
+<<<<<<< HEAD
#define OID_TCGID 182
#define OID_AUTHORITY_INFO_ACCESS 187
#define OID_IP_ADDR_BLOCKS 189
@@ -204,5 +213,97 @@ extern const oid_t oid_names[];
#define OID_PKI_TRANS_ID 353
#define OID_MAX 356
+=======
+#define OID_STRONGSWAN 178
+#define OID_TCGID 185
+#define OID_AUTHORITY_INFO_ACCESS 190
+#define OID_IP_ADDR_BLOCKS 192
+#define OID_POLICY_QUALIFIER_CPS 194
+#define OID_POLICY_QUALIFIER_UNOTICE 195
+#define OID_SERVER_AUTH 197
+#define OID_CLIENT_AUTH 198
+#define OID_OCSP_SIGNING 205
+#define OID_XMPP_ADDR 207
+#define OID_AUTHENTICATION_INFO 209
+#define OID_ACCESS_IDENTITY 210
+#define OID_CHARGING_IDENTITY 211
+#define OID_GROUP 212
+#define OID_OCSP 215
+#define OID_BASIC 216
+#define OID_NONCE 217
+#define OID_CRL 218
+#define OID_RESPONSE 219
+#define OID_NO_CHECK 220
+#define OID_ARCHIVE_CUTOFF 221
+#define OID_SERVICE_LOCATOR 222
+#define OID_CA_ISSUERS 223
+#define OID_DES_CBC 229
+#define OID_SHA1 230
+#define OID_SHA1_WITH_RSA_OIW 231
+#define OID_ECGDSA_PUBKEY 250
+#define OID_ECGDSA_SIG_WITH_RIPEMD160 253
+#define OID_ECGDSA_SIG_WITH_SHA1 254
+#define OID_ECGDSA_SIG_WITH_SHA224 255
+#define OID_ECGDSA_SIG_WITH_SHA256 256
+#define OID_ECGDSA_SIG_WITH_SHA384 257
+#define OID_ECGDSA_SIG_WITH_SHA512 258
+#define OID_SECT163K1 281
+#define OID_SECT163R1 282
+#define OID_SECT239K1 283
+#define OID_SECT113R1 284
+#define OID_SECT113R2 285
+#define OID_SECT112R1 286
+#define OID_SECT112R2 287
+#define OID_SECT160R1 288
+#define OID_SECT160K1 289
+#define OID_SECT256K1 290
+#define OID_SECT163R2 291
+#define OID_SECT283K1 292
+#define OID_SECT283R1 293
+#define OID_SECT131R1 294
+#define OID_SECT131R2 295
+#define OID_SECT193R1 296
+#define OID_SECT193R2 297
+#define OID_SECT233K1 298
+#define OID_SECT233R1 299
+#define OID_SECT128R1 300
+#define OID_SECT128R2 301
+#define OID_SECT160R2 302
+#define OID_SECT192K1 303
+#define OID_SECT224K1 304
+#define OID_SECT224R1 305
+#define OID_SECT384R1 306
+#define OID_SECT521R1 307
+#define OID_SECT409K1 308
+#define OID_SECT409R1 309
+#define OID_SECT571K1 310
+#define OID_SECT571R1 311
+#define OID_AES128_CBC 320
+#define OID_AES128_GCM 321
+#define OID_AES128_CCM 322
+#define OID_AES192_CBC 323
+#define OID_AES192_GCM 324
+#define OID_AES192_CCM 325
+#define OID_AES256_CBC 326
+#define OID_AES256_GCM 327
+#define OID_AES256_CCM 328
+#define OID_SHA256 330
+#define OID_SHA384 331
+#define OID_SHA512 332
+#define OID_SHA224 333
+#define OID_NS_REVOCATION_URL 339
+#define OID_NS_CA_REVOCATION_URL 340
+#define OID_NS_CA_POLICY_URL 341
+#define OID_NS_COMMENT 342
+#define OID_EMPLOYEE_NUMBER 345
+#define OID_PKI_MESSAGE_TYPE 351
+#define OID_PKI_STATUS 352
+#define OID_PKI_FAIL_INFO 353
+#define OID_PKI_SENDER_NONCE 354
+#define OID_PKI_RECIPIENT_NONCE 355
+#define OID_PKI_TRANS_ID 356
+
+#define OID_MAX 359
+>>>>>>> upstream/4.5.1
#endif /* OID_H_ */
diff --git a/src/libstrongswan/asn1/oid.txt b/src/libstrongswan/asn1/oid.txt
index 36db0299c..bf37dd624 100644
--- a/src/libstrongswan/asn1/oid.txt
+++ b/src/libstrongswan/asn1/oid.txt
@@ -51,11 +51,19 @@
0x1D "certificateIssuer"
0x1E "nameConstraints" OID_NAME_CONSTRAINTS
0x1F "crlDistributionPoints" OID_CRL_DISTRIBUTION_POINTS
+<<<<<<< HEAD
0x20 "certificatePolicies"
0x00 "anyPolicy" OID_ANY_POLICY
0x21 "policyMappings"
0x23 "authorityKeyIdentifier" OID_AUTHORITY_KEY_ID
0x24 "policyConstraints"
+=======
+ 0x20 "certificatePolicies" OID_CERTIFICATE_POLICIES
+ 0x00 "anyPolicy" OID_ANY_POLICY
+ 0x21 "policyMappings" OID_POLICY_MAPPINGS
+ 0x23 "authorityKeyIdentifier" OID_AUTHORITY_KEY_ID
+ 0x24 "policyConstraints" OID_POLICY_CONSTRAINTS
+>>>>>>> upstream/4.5.1
0x25 "extendedKeyUsage" OID_EXTENDED_KEY_USAGE
0x00 "anyExtendedKeyUsage"
0x2E "freshestCRL" OID_FRESHEST_CRL
@@ -124,7 +132,11 @@
0x01 "id-ecPublicKey" OID_EC_PUBLICKEY
0x03 "ellipticCurve"
0x00 "c-TwoCurve"
+<<<<<<< HEAD
0x01 "c2pnb163v1" OID_C2PNB163V1
+=======
+ 0x01 "c2pnb163v1" OID_C2PNB163V1
+>>>>>>> upstream/4.5.1
0x02 "c2pnb163v2" OID_C2PNB163V2
0x03 "c2pnb163v3" OID_C2PNB163V3
0x04 "c2pnb176w1" OID_C2PNB176W1
@@ -174,13 +186,23 @@
0x02 "msCertificateTypeExtension"
0x02 "msSmartcardLogon"
0x03 "msUPN" OID_USER_PRINCIPAL_NAME
+<<<<<<< HEAD
+=======
+ 0xA0 ""
+ 0x2A "ITA"
+ 0x01 "strongSwan" OID_STRONGSWAN
+>>>>>>> upstream/4.5.1
0x89 ""
0x31 ""
0x01 ""
0x01 ""
0x02 ""
0x02 ""
+<<<<<<< HEAD
0x4B "TCGID" OID_TCGID
+=======
+ 0x4B "TCGID" OID_TCGID
+>>>>>>> upstream/4.5.1
0x05 "security"
0x05 "mechanisms"
0x07 "id-pkix"
@@ -189,8 +211,13 @@
0x03 "qcStatements"
0x07 "ipAddrBlocks" OID_IP_ADDR_BLOCKS
0x02 "id-qt"
+<<<<<<< HEAD
0x01 "cps"
0x02 "unotice"
+=======
+ 0x01 "cps" OID_POLICY_QUALIFIER_CPS
+ 0x02 "unotice" OID_POLICY_QUALIFIER_UNOTICE
+>>>>>>> upstream/4.5.1
0x03 "id-kp"
0x01 "serverAuth" OID_SERVER_AUTH
0x02 "clientAuth" OID_CLIENT_AUTH