fixed compiler warnings

This commit is contained in:
Martin Willi
2008-03-26 09:29:30 +00:00
parent 26930a8c3e
commit a852928a6f
3 changed files with 15 additions and 10 deletions
+10 -6
View File
@@ -25,6 +25,7 @@
#include <debug.h> #include <debug.h>
#include <asn1/oid.h> #include <asn1/oid.h>
#include <asn1/asn1.h> #include <asn1/asn1.h>
#include <asn1/pem.h>
#include <utils/identification.h> #include <utils/identification.h>
#include <utils/linked_list.h> #include <utils/linked_list.h>
#include <credentials/certificates/x509.h> #include <credentials/certificates/x509.h>
@@ -280,12 +281,10 @@ static const asn1Object_t acObjects[] =
#define AC_OBJ_ROOF 55 #define AC_OBJ_ROOF 55
/** /**
* Parses an X.509 attribute certificate * declaration of function implemented in x509_cert.c
*/ */
static bool parse(private_x509_ac_t *this) extern void x509_parse_generalNames(chunk_t blob, int level0, bool implicit,
{ linked_list_t *list);
return FALSE;
}
/** /**
* parses a directoryName * parses a directoryName
*/ */
@@ -484,7 +483,7 @@ static bool parse_certificate(private_x509_ac_t *this)
} }
break; break;
case AC_OBJ_ALGORITHM: case AC_OBJ_ALGORITHM:
this->algorithm != parse_algorithmIdentifier(object, level, NULL); this->algorithm = parse_algorithmIdentifier(object, level, NULL);
break; break;
case AC_OBJ_SIGNATURE: case AC_OBJ_SIGNATURE:
this->signature = object; this->signature = object;
@@ -911,6 +910,7 @@ static private_x509_ac_t *create_empty(void)
this->public.interface.certificate.issued_by = (bool (*)(certificate_t *this, certificate_t *issuer,bool))issued_by; this->public.interface.certificate.issued_by = (bool (*)(certificate_t *this, certificate_t *issuer,bool))issued_by;
this->public.interface.certificate.get_public_key = (public_key_t* (*)(certificate_t *this))get_public_key; this->public.interface.certificate.get_public_key = (public_key_t* (*)(certificate_t *this))get_public_key;
this->public.interface.certificate.get_validity = (bool(*)(certificate_t*, time_t *when, time_t *, time_t*))get_validity; this->public.interface.certificate.get_validity = (bool(*)(certificate_t*, time_t *when, time_t *, time_t*))get_validity;
this->public.interface.certificate.is_newer = (bool (*)(certificate_t*,certificate_t*))is_newer;
this->public.interface.certificate.get_encoding = (chunk_t(*)(certificate_t*))get_encoding; this->public.interface.certificate.get_encoding = (chunk_t(*)(certificate_t*))get_encoding;
this->public.interface.certificate.equals = (bool(*)(certificate_t*, certificate_t *other))equals; this->public.interface.certificate.equals = (bool(*)(certificate_t*, certificate_t *other))equals;
this->public.interface.certificate.get_ref = (certificate_t* (*)(certificate_t *this))get_ref; this->public.interface.certificate.get_ref = (certificate_t* (*)(certificate_t *this))get_ref;
@@ -1004,6 +1004,10 @@ static private_x509_ac_t* build(private_builder_t *this)
destroy(ac); destroy(ac);
return NULL; return NULL;
} }
else
{
return NULL;
}
} }
/** /**
+4 -4
View File
@@ -498,7 +498,7 @@ static identification_t *parse_generalName(chunk_t blob, int level0)
/** /**
* extracts one or several GNs and puts them into a chained list * extracts one or several GNs and puts them into a chained list
*/ */
void parse_generalNames(chunk_t blob, int level0, bool implicit, linked_list_t *list) void x509_parse_generalNames(chunk_t blob, int level0, bool implicit, linked_list_t *list)
{ {
asn1_ctx_t ctx; asn1_ctx_t ctx;
chunk_t object; chunk_t object;
@@ -581,7 +581,7 @@ identification_t* x509_parse_authorityKeyIdentifier(chunk_t blob, int level0,
} }
case AUTH_KEY_ID_CERT_ISSUER: case AUTH_KEY_ID_CERT_ISSUER:
{ {
/* TODO: parse_generalNames(object, level+1, TRUE); */ /* TODO: x509_parse_generalNames(object, level+1, TRUE); */
break; break;
} }
case AUTH_KEY_ID_CERT_SERIAL: case AUTH_KEY_ID_CERT_SERIAL:
@@ -708,7 +708,7 @@ static void parse_crlDistributionPoints(chunk_t blob, int level0,
} }
if (objectID == CRL_DIST_POINTS_FULLNAME) if (objectID == CRL_DIST_POINTS_FULLNAME)
{ /* append extracted generalNames to existing chained list */ { /* append extracted generalNames to existing chained list */
parse_generalNames(object, level+1, TRUE, list); x509_parse_generalNames(object, level+1, TRUE, list);
while (list->remove_last(list, (void**)&id) == SUCCESS) while (list->remove_last(list, (void**)&id) == SUCCESS)
{ {
@@ -817,7 +817,7 @@ static bool parse_certificate(private_x509_cert_t *this)
this->subjectKeyID = parse_keyIdentifier(object, level, FALSE); this->subjectKeyID = parse_keyIdentifier(object, level, FALSE);
break; break;
case OID_SUBJECT_ALT_NAME: case OID_SUBJECT_ALT_NAME:
parse_generalNames(object, level, FALSE, this->subjectAltNames); x509_parse_generalNames(object, level, FALSE, this->subjectAltNames);
break; break;
case OID_BASIC_CONSTRAINTS: case OID_BASIC_CONSTRAINTS:
if (parse_basicConstraints(object, level)) if (parse_basicConstraints(object, level))
@@ -23,6 +23,7 @@ typedef struct revoked_t revoked_t;
#include <debug.h> #include <debug.h>
#include <library.h> #include <library.h>
#include <asn1/asn1.h> #include <asn1/asn1.h>
#include <asn1/pem.h>
#include <credentials/certificates/x509.h> #include <credentials/certificates/x509.h>
#include <utils/linked_list.h> #include <utils/linked_list.h>