- fixed bugs

This commit is contained in:
Jan Hutter
2005-12-01 19:53:48 +00:00
parent 257fa50386
commit 1b3f92d28d
12 changed files with 356 additions and 137 deletions
+18
View File
@@ -29,6 +29,22 @@
#include <utils/allocator.h>
/**
* String mappings for id_type_t.
*/
mapping_t id_type_m[] = {
{ID_IPV4_ADDR, "ID_IPV4_ADDR"},
{ID_FQDN, "ID_FQDN"},
{ID_RFC822_ADDR, "ID_RFC822_ADDR"},
{ID_IPV6_ADDR, "ID_IPV6_ADDR"},
{ID_DER_ASN1_DN, "ID_DER_ASN1_DN"},
{ID_DER_ASN1_GN, "ID_DER_ASN1_GN"},
{ID_KEY_ID, "ID_KEY_ID"},
{MAPPING_END, NULL}
};
typedef struct private_identification_t private_identification_t;
/**
@@ -136,6 +152,7 @@ static private_identification_t *identification_create()
identification_t *identification_create_from_string(id_type_t type, char *string)
{
private_identification_t *this = identification_create();
this->type = type;
switch (type)
{
case ID_IPV4_ADDR:
@@ -175,6 +192,7 @@ identification_t *identification_create_from_string(id_type_t type, char *string
identification_t *identification_create_from_encoding(id_type_t type, chunk_t encoded)
{
private_identification_t *this = identification_create();
this->type = type;
switch (type)
{
case ID_IPV4_ADDR:
+53 -1
View File
@@ -27,7 +27,59 @@
#include "types.h"
#include <encoding/payloads/id_payload.h>
typedef enum id_type_t id_type_t;
/**
* ID Types of a ID payload.
*
* @ingroup payloads
*/
enum id_type_t {
/**
* ID data is a single four (4) octet IPv4 address.
*/
ID_IPV4_ADDR = 1,
/**
* ID data is a fully-qualified domain name string.
* An example of a ID_FQDN is, "example.com".
* The string MUST not contain any terminators (e.g., NULL, CR, etc.).
*/
ID_FQDN = 2,
/**
* ID data is a fully-qualified RFC822 email address string, An example of
* a ID_RFC822_ADDR is, "[email protected]". The string MUST
* not contain any terminators.
*/
ID_RFC822_ADDR = 3,
/**
* ID data is a single sixteen (16) octet IPv6 address.
*/
ID_IPV6_ADDR = 5,
/**
* ID data is the binary DER encoding of an ASN.1 X.500 Distinguished Name
* [X.501].
*/
ID_DER_ASN1_DN = 9,
/**
* ID data is the binary DER encoding of an ASN.1 X.500 GeneralName
* [X.509].
*/
ID_DER_ASN1_GN = 10,
/**
* ID data is an opaque octet stream which may be used to pass vendor-
* specific information necessary to do certain proprietary
* types of identification.
*/
ID_KEY_ID = 11
};
extern mapping_t id_type_m[];
typedef struct identification_t identification_t;
-1
View File
@@ -150,7 +150,6 @@ static logger_t *create_logger(private_logger_manager_t *this, logger_context_t
case MESSAGE:
case WORKER:
logger_level |= ALL;
break;
case PARSER:
case GENERATOR:
case THREAD_POOL: