fixed compile warnings when using -Wall
further CHILD_SA rekeying work done: creation of a new CHILD_SA on a expire from a kernel works delete of old CHILD_SA still missing some issues when both initiate rekeing
This commit is contained in:
@@ -218,7 +218,7 @@ static status_t add_connection(private_local_connection_store_t *this, connectio
|
||||
void log_connections(private_local_connection_store_t *this, logger_t *logger, char *name)
|
||||
{
|
||||
iterator_t *iterator;
|
||||
connection_t *current, *found = NULL;
|
||||
connection_t *current;
|
||||
|
||||
if (logger == NULL)
|
||||
{
|
||||
|
||||
@@ -185,20 +185,19 @@ static void add_certificate(private_local_credential_store_t *this, x509_t *cert
|
||||
static void log_certificates(private_local_credential_store_t *this, logger_t *logger, bool utc)
|
||||
{
|
||||
iterator_t *iterator = this->certs->create_iterator(this->certs, TRUE);
|
||||
|
||||
|
||||
if (iterator->get_count(iterator))
|
||||
{
|
||||
logger->log(logger, CONTROL, "");
|
||||
logger->log(logger, CONTROL, "List of X.509 End Entity Certificates:");
|
||||
logger->log(logger, CONTROL, "");
|
||||
}
|
||||
|
||||
|
||||
while (iterator->has_next(iterator))
|
||||
{
|
||||
x509_t *cert;
|
||||
rsa_private_key_t *key;
|
||||
bool has_key;
|
||||
|
||||
|
||||
iterator->current(iterator, (void**)&cert);
|
||||
has_key = has_rsa_private_key(this, cert->get_public_key(cert));
|
||||
cert->log_certificate(cert, logger, utc, has_key);
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "local_policy_store.h"
|
||||
|
||||
#include <utils/linked_list.h>
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "policy.h"
|
||||
|
||||
#include <utils/linked_list.h>
|
||||
@@ -293,7 +296,8 @@ static void add_proposal(private_policy_t *this, proposal_t *proposal)
|
||||
*/
|
||||
static u_int32_t get_soft_lifetime(policy_t *this)
|
||||
{
|
||||
return 0; /*5 + random() % 5; */
|
||||
srandom(time(NULL));
|
||||
return 0; //5 + random() % 3;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -301,7 +305,7 @@ static u_int32_t get_soft_lifetime(policy_t *this)
|
||||
*/
|
||||
static u_int32_t get_hard_lifetime(policy_t *this)
|
||||
{
|
||||
return 0; /*20; */
|
||||
return 0; //9;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -258,7 +258,6 @@ static proposal_t *select_proposal(private_proposal_t *this, private_proposal_t
|
||||
u_int16_t algo;
|
||||
size_t key_size;
|
||||
bool add;
|
||||
u_int64_t spi;
|
||||
|
||||
/* check protocol */
|
||||
if (this->protocol != other->protocol)
|
||||
|
||||
Reference in New Issue
Block a user