- starter work on asn1 with der de/encoder

- RSA private and public key can load read key from ASN1 DER
- some other fixes here and there
This commit is contained in:
Martin Willi
2006-03-24 15:37:49 +00:00
parent dec598220b
commit 9c781c152a
35 changed files with 1858 additions and 249 deletions
+1 -1
View File
@@ -388,7 +388,7 @@ authenticator_t *authenticator_create(protected_ike_sa_t *ike_sa)
/* private data */
this->ike_sa = ike_sa;
this->prf = this->ike_sa->get_prf(this->ike_sa);
this->logger = this->ike_sa->get_logger(this->ike_sa);
this->logger = charon->logger_manager->get_logger(charon->logger_manager, IKE_SA);
return &(this->public);
}
-9
View File
@@ -411,14 +411,6 @@ static void set_new_state (private_ike_sa_t *this, state_t *state)
this->current_state = state;
}
/**
* Implementation of protected_ike_sa_t.get_logger.
*/
static logger_t *get_logger (private_ike_sa_t *this)
{
return this->logger;
}
/**
* Implementation of protected_ike_sa_t.get_connection.
*/
@@ -1050,7 +1042,6 @@ ike_sa_t * ike_sa_create(ike_sa_id_t *ike_sa_id)
this->protected.get_prf_auth_i = (prf_t *(*) (protected_ike_sa_t *)) get_prf_auth_i;
this->protected.get_prf_auth_r = (prf_t *(*) (protected_ike_sa_t *)) get_prf_auth_r;
this->protected.add_child_sa = (void (*) (protected_ike_sa_t*,child_sa_t*)) add_child_sa;
this->protected.get_logger = (logger_t *(*) (protected_ike_sa_t *)) get_logger;
this->protected.set_connection = (void (*) (protected_ike_sa_t *,connection_t *)) set_connection;
this->protected.get_connection = (connection_t *(*) (protected_ike_sa_t *)) get_connection;
this->protected.set_policy = (void (*) (protected_ike_sa_t *,policy_t *)) set_policy;
-10
View File
@@ -170,16 +170,6 @@ struct protected_ike_sa_t {
*/
void (*build_message) (protected_ike_sa_t *this, exchange_type_t type, bool request, message_t **message);
/**
* @brief Get the internal stored logger_t object for given ike_sa_t object.
*
* @warning Returned logger_t object is original one and managed by this object.
*
* @param this calling object
* @return pointer to the internal stored logger_t object
*/
logger_t *(*get_logger) (protected_ike_sa_t *this);
/**
* @brief Get the internal stored connection_t object.
*
+1 -1
View File
@@ -660,7 +660,7 @@ ike_auth_requested_t *ike_auth_requested_create(protected_ike_sa_t *ike_sa,chunk
this->received_nonce = received_nonce;
this->sent_nonce = sent_nonce;
this->ike_sa_init_reply_data = ike_sa_init_reply_data;
this->logger = this->ike_sa->get_logger(this->ike_sa);
this->logger = charon->logger_manager->get_logger(charon->logger_manager, IKE_SA);
this->my_ts = NULL;
this->other_ts = NULL;
this->proposal = NULL;
+2 -1
View File
@@ -22,6 +22,7 @@
#include "ike_sa_established.h"
#include <daemon.h>
#include <utils/allocator.h>
#include <encoding/payloads/delete_payload.h>
@@ -233,7 +234,7 @@ ike_sa_established_t *ike_sa_established_create(protected_ike_sa_t *ike_sa)
/* private data */
this->ike_sa = ike_sa;
this->logger = ike_sa->get_logger(ike_sa);
this->logger = charon->logger_manager->get_logger(charon->logger_manager, IKE_SA);
return &(this->public);
}
@@ -748,7 +748,7 @@ ike_sa_init_requested_t *ike_sa_init_requested_create(protected_ike_sa_t *ike_sa
/* private data */
this->ike_sa = ike_sa;
this->received_nonce = CHUNK_INITIALIZER;
this->logger = this->ike_sa->get_logger(this->ike_sa);
this->logger = charon->logger_manager->get_logger(charon->logger_manager, IKE_SA);
this->diffie_hellman = diffie_hellman;
this->proposal = NULL;
this->sent_nonce = sent_nonce;
@@ -696,7 +696,7 @@ ike_sa_init_responded_t *ike_sa_init_responded_create(protected_ike_sa_t *ike_sa
this->my_ts = NULL;
this->other_ts = NULL;
this->child_sa = NULL;
this->logger = this->ike_sa->get_logger(this->ike_sa);
this->logger = charon->logger_manager->get_logger(charon->logger_manager, IKE_SA);
return &(this->public);
}
+1 -1
View File
@@ -342,7 +342,7 @@ initiator_init_t *initiator_init_create(protected_ike_sa_t *ike_sa)
/* private data */
this->ike_sa = ike_sa;
this->logger = this->ike_sa->get_logger(this->ike_sa);
this->logger = charon->logger_manager->get_logger(charon->logger_manager, IKE_SA);
this->sent_nonce = CHUNK_INITIALIZER;
this->diffie_hellman = NULL;
+1 -1
View File
@@ -553,7 +553,7 @@ responder_init_t *responder_init_create(protected_ike_sa_t *ike_sa)
/* private data */
this->ike_sa = ike_sa;
this->logger = this->ike_sa->get_logger(this->ike_sa);
this->logger = charon->logger_manager->get_logger(charon->logger_manager, IKE_SA);
this->sent_nonce = CHUNK_INITIALIZER;
this->received_nonce = CHUNK_INITIALIZER;
this->dh_group_number = MODP_UNDEFINED;