aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-27 12:02:53 +0000
committerlloyd <[email protected]>2012-05-27 12:02:53 +0000
commit4738d02a99eb371b5a22fd5547a4b63dfa77fb95 (patch)
treeb18df32bed391b0a74147ace3a162d4c3f5c6cc5 /src
parentb4bdefd0ebcf57d686a383d7460f0ade9fb9883b (diff)
Remove the PRIVATE ASN.1 tag. Not being used outside of the pretty
printer example, and really is just CONSTRUCTED | CONTEXT_SPECIFIC. Extend the ASN.1 printer to recurse into OCTET STRINGS that contain DER, and to print enumeration values. BOTAN_DLL export some OID operators (+, !=, <) Add an OID entry for 1.3.6.1.5.5.7.48.1.1 OCSP basic response. Correct the Certificate_Policies code, it was dumping policy OIDs into the extended key usage!
Diffstat (limited to 'src')
-rw-r--r--src/asn1/asn1_int.h1
-rw-r--r--src/asn1/asn1_oid.h6
-rw-r--r--src/cert/x509/x509_ext.cpp2
-rw-r--r--src/libstate/policy.cpp2
4 files changed, 6 insertions, 5 deletions
diff --git a/src/asn1/asn1_int.h b/src/asn1/asn1_int.h
index 37edc4e3c..6d254e4db 100644
--- a/src/asn1/asn1_int.h
+++ b/src/asn1/asn1_int.h
@@ -20,7 +20,6 @@ enum ASN1_Tag {
UNIVERSAL = 0x00,
APPLICATION = 0x40,
CONTEXT_SPECIFIC = 0x80,
- PRIVATE = 0xC0,
CONSTRUCTED = 0x20,
diff --git a/src/asn1/asn1_oid.h b/src/asn1/asn1_oid.h
index b3db97744..85e863907 100644
--- a/src/asn1/asn1_oid.h
+++ b/src/asn1/asn1_oid.h
@@ -73,7 +73,7 @@ class BOTAN_DLL OID : public ASN1_Object
* @param oid the OID to add the new component to
* @param new_comp the new component to add
*/
-OID operator+(const OID& oid, u32bit new_comp);
+OID BOTAN_DLL operator+(const OID& oid, u32bit new_comp);
/**
* Compare two OIDs.
@@ -81,7 +81,7 @@ OID operator+(const OID& oid, u32bit new_comp);
* @param b the second OID
* @return true if a is not equal to b
*/
-bool operator!=(const OID& a, const OID& b);
+bool BOTAN_DLL operator!=(const OID& a, const OID& b);
/**
* Compare two OIDs.
@@ -89,7 +89,7 @@ bool operator!=(const OID& a, const OID& b);
* @param b the second OID
* @return true if a is lexicographically smaller than b
*/
-bool operator<(const OID& a, const OID& b);
+bool BOTAN_DLL operator<(const OID& a, const OID& b);
}
diff --git a/src/cert/x509/x509_ext.cpp b/src/cert/x509/x509_ext.cpp
index 919fb790a..751d20266 100644
--- a/src/cert/x509/x509_ext.cpp
+++ b/src/cert/x509/x509_ext.cpp
@@ -504,7 +504,7 @@ void Certificate_Policies::decode_inner(const std::vector<byte>& in)
void Certificate_Policies::contents_to(Data_Store& info, Data_Store&) const
{
for(size_t i = 0; i != oids.size(); ++i)
- info.add("X509v3.ExtendedKeyUsage", oids[i].as_string());
+ info.add("X509v3.CertificatePolicies", oids[i].as_string());
}
/*
diff --git a/src/libstate/policy.cpp b/src/libstate/policy.cpp
index b1da22ce8..4c6e0b2a5 100644
--- a/src/libstate/policy.cpp
+++ b/src/libstate/policy.cpp
@@ -208,6 +208,8 @@ void set_default_oids(Library_State& config)
add_oid(config, "1.3.6.1.5.5.7.8.5", "PKIX.XMPPAddr");
+ add_oid(config, "1.3.6.1.5.5.7.48.1.1", "PKIX.OCSP.BasicResponse");
+
/* ECC domain parameters */
add_oid(config, "1.3.132.0.6", "secp112r1");