aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2009-08-31 23:21:50 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2009-08-31 23:21:50 +0200
commitf561d6f2e9ef3ab488a038592e033139641c96fe (patch)
tree5f01ae2ae172beb449dadf6396ef48912054f1af /src
parentdc4aadc3f27b2164098ce71dc909ddfebfe1d38a (diff)
downloadstrongswan-f561d6f2e9ef3ab488a038592e033139641c96fe.tar.bz2
strongswan-f561d6f2e9ef3ab488a038592e033139641c96fe.tar.xz
changed prefix of crl_reason_t values from CRL_ to CRL_REASON_
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/credentials/certificates/crl.c2
-rw-r--r--src/libstrongswan/credentials/certificates/crl.h16
-rw-r--r--src/libstrongswan/plugins/x509/x509_crl.c2
-rw-r--r--src/libstrongswan/plugins/x509/x509_ocsp_response.c2
-rw-r--r--src/pluto/crl.c8
-rw-r--r--src/pluto/ocsp.c24
-rw-r--r--src/pluto/x509.c2
7 files changed, 28 insertions, 28 deletions
diff --git a/src/libstrongswan/credentials/certificates/crl.c b/src/libstrongswan/credentials/certificates/crl.c
index 0d6654075..085ad16cc 100644
--- a/src/libstrongswan/credentials/certificates/crl.c
+++ b/src/libstrongswan/credentials/certificates/crl.c
@@ -16,7 +16,7 @@
#include "crl.h"
-ENUM(crl_reason_names, CRL_UNSPECIFIED, CRL_REMOVE_FROM_CRL,
+ENUM(crl_reason_names, CRL_REASON_UNSPECIFIED, CRL_REASON_REMOVE_FROM_CRL,
"unspecified",
"key compromise",
"ca compromise",
diff --git a/src/libstrongswan/credentials/certificates/crl.h b/src/libstrongswan/credentials/certificates/crl.h
index 44390c524..3d4796174 100644
--- a/src/libstrongswan/credentials/certificates/crl.h
+++ b/src/libstrongswan/credentials/certificates/crl.h
@@ -32,14 +32,14 @@ typedef enum crl_reason_t crl_reason_t;
* RFC 2459 CRL reason codes
*/
enum crl_reason_t {
- CRL_UNSPECIFIED = 0,
- CRL_KEY_COMPROMISE = 1,
- CRL_CA_COMPROMISE = 2,
- CRL_AFFILIATION_CHANGED = 3,
- CRL_SUPERSEDED = 4,
- CRL_CESSATION_OF_OPERATON = 5,
- CRL_CERTIFICATE_HOLD = 6,
- CRL_REMOVE_FROM_CRL = 8,
+ CRL_REASON_UNSPECIFIED = 0,
+ CRL_REASON_KEY_COMPROMISE = 1,
+ CRL_REASON_CA_COMPROMISE = 2,
+ CRL_REASON_AFFILIATION_CHANGED = 3,
+ CRL_REASON_SUPERSEDED = 4,
+ CRL_REASON_CESSATION_OF_OPERATON = 5,
+ CRL_REASON_CERTIFICATE_HOLD = 6,
+ CRL_REASON_REMOVE_FROM_CRL = 8,
};
/**
diff --git a/src/libstrongswan/plugins/x509/x509_crl.c b/src/libstrongswan/plugins/x509/x509_crl.c
index e3d054c1c..8df0e2f75 100644
--- a/src/libstrongswan/plugins/x509/x509_crl.c
+++ b/src/libstrongswan/plugins/x509/x509_crl.c
@@ -238,7 +238,7 @@ static bool parse(private_x509_crl_t *this)
revoked = malloc_thing(revoked_t);
revoked->serial = userCertificate;
revoked->date = asn1_parse_time(object, level);
- revoked->reason = CRL_UNSPECIFIED;
+ revoked->reason = CRL_REASON_UNSPECIFIED;
this->revoked->insert_last(this->revoked, (void *)revoked);
break;
case CRL_OBJ_CRL_ENTRY_EXTN_ID:
diff --git a/src/libstrongswan/plugins/x509/x509_ocsp_response.c b/src/libstrongswan/plugins/x509/x509_ocsp_response.c
index caaae6aa4..1472d3d7f 100644
--- a/src/libstrongswan/plugins/x509/x509_ocsp_response.c
+++ b/src/libstrongswan/plugins/x509/x509_ocsp_response.c
@@ -320,7 +320,7 @@ static bool parse_singleResponse(private_x509_ocsp_response_t *this,
response->serialNumber = chunk_empty;
response->status = VALIDATION_FAILED;
response->revocationTime = 0;
- response->revocationReason = CRL_UNSPECIFIED;
+ response->revocationReason = CRL_REASON_UNSPECIFIED;
response->thisUpdate = UNDEFINED_TIME;
/* if nextUpdate is missing, we give it a short lifetime */
response->nextUpdate = this->producedAt + OCSP_DEFAULT_LIFETIME;
diff --git a/src/pluto/crl.c b/src/pluto/crl.c
index 01c469626..132caa5e3 100644
--- a/src/pluto/crl.c
+++ b/src/pluto/crl.c
@@ -374,7 +374,7 @@ void load_crls(void)
*/
static crl_reason_t parse_crl_reasonCode(chunk_t object)
{
- crl_reason_t reason = CRL_UNSPECIFIED;
+ crl_reason_t reason = CRL_REASON_UNSPECIFIED;
if (*object.ptr == ASN1_ENUMERATED
&& asn1_length(&object) == 1)
@@ -448,7 +448,7 @@ bool parse_x509crl(chunk_t blob, u_int level0, x509crl_t *crl)
revokedCert_t *revokedCert = malloc_thing(revokedCert_t);
revokedCert->userCertificate = userCertificate;
revokedCert->revocationDate = asn1_parse_time(object, level);
- revokedCert->revocationReason = CRL_UNSPECIFIED;
+ revokedCert->revocationReason = CRL_REASON_UNSPECIFIED;
revokedCert->next = crl->revokedCertificates;
crl->revokedCertificates = revokedCert;
}
@@ -519,7 +519,7 @@ check_revocation(const x509crl_t *crl, chunk_t serial
revokedCert_t *revokedCert = crl->revokedCertificates;
*revocationDate = UNDEFINED_TIME;
- *revocationReason = CRL_UNSPECIFIED;
+ *revocationReason = CRL_REASON_UNSPECIFIED;
DBG(DBG_CONTROL,
DBG_dump_chunk("serial number:", serial)
@@ -594,7 +594,7 @@ verify_by_crl(const x509cert_t *cert, time_t *until, time_t *revocationDate
generalName_t *crluri = (ca == NULL)? NULL : ca->crluri;
*revocationDate = UNDEFINED_TIME;
- *revocationReason = CRL_UNSPECIFIED;
+ *revocationReason = CRL_REASON_UNSPECIFIED;
lock_crl_list("verify_by_crl");
crl = get_x509crl(cert->issuer, cert->authKeySerialNumber, cert->authKeyID);
diff --git a/src/pluto/ocsp.c b/src/pluto/ocsp.c
index 70621f843..cdbdd32c1 100644
--- a/src/pluto/ocsp.c
+++ b/src/pluto/ocsp.c
@@ -105,16 +105,16 @@ struct single_response {
};
const single_response_t empty_single_response = {
- NULL , /* *next */
- OID_UNKNOWN , /* hash_algorithm */
- { NULL, 0 } , /* issuer_name_hash */
- { NULL, 0 } , /* issuer_key_hash */
- { NULL, 0 } , /* serial_number */
- CERT_UNDEFINED , /* status */
- UNDEFINED_TIME , /* revocationTime */
- CRL_UNSPECIFIED , /* revocationReason */
- UNDEFINED_TIME , /* this_update */
- UNDEFINED_TIME /* next_update */
+ NULL , /* *next */
+ OID_UNKNOWN , /* hash_algorithm */
+ { NULL, 0 } , /* issuer_name_hash */
+ { NULL, 0 } , /* issuer_key_hash */
+ { NULL, 0 } , /* serial_number */
+ CERT_UNDEFINED , /* status */
+ UNDEFINED_TIME , /* revocationTime */
+ CRL_REASON_UNSPECIFIED, /* revocationReason */
+ UNDEFINED_TIME , /* this_update */
+ UNDEFINED_TIME /* next_update */
};
@@ -425,7 +425,7 @@ cert_status_t verify_by_ocsp(const x509cert_t *cert, time_t *until,
time_t nextUpdate = 0;
*revocationDate = UNDEFINED_TIME;
- *revocationReason = CRL_UNSPECIFIED;
+ *revocationReason = CRL_REASON_UNSPECIFIED;
/* is an ocsp location defined? */
if (!build_ocsp_location(cert, &location))
@@ -1292,7 +1292,7 @@ static bool parse_ocsp_single_response(chunk_t blob, int level0,
break;
case SINGLE_RESPONSE_CERT_STATUS_CRL_REASON:
sres->revocationReason = (object.len == 1)
- ? *object.ptr : CRL_UNSPECIFIED;
+ ? *object.ptr : CRL_REASON_UNSPECIFIED;
break;
case SINGLE_RESPONSE_CERT_STATUS_UNKNOWN:
sres->status = CERT_UNKNOWN;
diff --git a/src/pluto/x509.c b/src/pluto/x509.c
index 9d3bf89b0..827c2c95c 100644
--- a/src/pluto/x509.c
+++ b/src/pluto/x509.c
@@ -1986,7 +1986,7 @@ bool verify_x509cert(const x509cert_t *cert, bool strict, time_t *until)
{
time_t nextUpdate = *until;
time_t revocationDate = UNDEFINED_TIME;
- crl_reason_t revocationReason = CRL_UNSPECIFIED;
+ crl_reason_t revocationReason = CRL_REASON_UNSPECIFIED;
/* first check certificate revocation using ocsp */
cert_status_t status = verify_by_ocsp(cert, &nextUpdate