diff options
author | Martin Willi <martin@strongswan.org> | 2006-09-21 09:17:13 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-09-21 09:17:13 +0000 |
commit | 2fcc4168f82eb77ef7b9b95066b0295062693ebe (patch) | |
tree | 8fb5110ffba7dac5565e5c2248be82c249adb91b | |
parent | 73760ca5ff8736ab1096f5aad7b7e0037c26297d (diff) | |
download | strongswan-4.0.4.tar.bz2 strongswan-4.0.4.tar.xz |
fixed some compiler warnings4.0.4
-rwxr-xr-x | src/libstrongswan/asn1/pem.c | 2 | ||||
-rwxr-xr-x | src/libstrongswan/crypto/crl.c | 16 | ||||
-rw-r--r-- | src/libstrongswan/utils/identification.c | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/libstrongswan/asn1/pem.c b/src/libstrongswan/asn1/pem.c index 6de340aaf..60e555e93 100755 --- a/src/libstrongswan/asn1/pem.c +++ b/src/libstrongswan/asn1/pem.c @@ -165,7 +165,7 @@ err_t pem_to_bin(chunk_t *blob, chunk_t *passphrase, bool *pgp) } state_t; encryption_algorithm_t alg = ENCR_UNDEFINED; - size_t key_size; + size_t key_size = 0; bool encrypted = FALSE; diff --git a/src/libstrongswan/crypto/crl.c b/src/libstrongswan/crypto/crl.c index 513dfc885..95b6b5b6e 100755 --- a/src/libstrongswan/crypto/crl.c +++ b/src/libstrongswan/crypto/crl.c @@ -220,7 +220,7 @@ bool parse_x509crl(chunk_t blob, u_int level0, private_crl_t *crl) bool critical; chunk_t extnID; chunk_t userCertificate; - revokedCert_t *revokedCert; + revokedCert_t *revokedCert = NULL; chunk_t object; u_int level; int objectID = 0; @@ -264,11 +264,11 @@ bool parse_x509crl(chunk_t blob, u_int level0, private_crl_t *crl) userCertificate = object; break; case CRL_OBJ_REVOCATION_DATE: - revokedCert = malloc_thing(revokedCert_t); - revokedCert->userCertificate = userCertificate; - revokedCert->revocationDate = parse_time(object, level); - revokedCert->revocationReason = REASON_UNSPECIFIED; - crl->revokedCertificates->insert_last(crl->revokedCertificates, (void *)revokedCert); + revokedCert = malloc_thing(revokedCert_t); + revokedCert->userCertificate = userCertificate; + revokedCert->revocationDate = parse_time(object, level); + revokedCert->revocationReason = REASON_UNSPECIFIED; + crl->revokedCertificates->insert_last(crl->revokedCertificates, (void *)revokedCert); break; case CRL_OBJ_CRL_ENTRY_EXTN_ID: case CRL_OBJ_EXTN_ID: @@ -284,9 +284,9 @@ bool parse_x509crl(chunk_t blob, u_int level0, private_crl_t *crl) { int extn_oid = known_oid(extnID); - if (extn_oid == OID_CRL_REASON_CODE) + if (revokedCert && extn_oid == OID_CRL_REASON_CODE) { - revokedCert->revocationReason = parse_crl_reasonCode(object); + revokedCert->revocationReason = parse_crl_reasonCode(object); } else if (extn_oid == OID_AUTHORITY_KEY_ID) { diff --git a/src/libstrongswan/utils/identification.c b/src/libstrongswan/utils/identification.c index f80e21c63..e193a3e59 100644 --- a/src/libstrongswan/utils/identification.c +++ b/src/libstrongswan/utils/identification.c @@ -547,7 +547,7 @@ static status_t atodn(char *src, chunk_t *dn) int rdn_count = 0; int dn_len = 0; int whitespace = 0; - int i; + int i = 0; asn1_t rdn_type; state_t state = SEARCH_OID; status_t status = SUCCESS; |