added all required includes
This commit is contained in:
@@ -354,7 +354,6 @@ chunk_t ietfAttr_list_encode(linked_list_t *list)
|
|||||||
u_char *pos;
|
u_char *pos;
|
||||||
iterator_t *iterator = list->create_iterator(list, TRUE);
|
iterator_t *iterator = list->create_iterator(list, TRUE);
|
||||||
ietfAttr_t *attr;
|
ietfAttr_t *attr;
|
||||||
bool first = TRUE;
|
|
||||||
|
|
||||||
/* precalculate the total size of all values */
|
/* precalculate the total size of all values */
|
||||||
while (iterator->iterate(iterator, (void **)&attr))
|
while (iterator->iterate(iterator, (void **)&attr))
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <library.h>
|
#include <library.h>
|
||||||
|
#include <utils/lexparser.h>
|
||||||
|
|
||||||
#include "optionsfrom.h"
|
#include "optionsfrom.h"
|
||||||
|
|
||||||
|
|||||||
+4
-6
@@ -29,6 +29,7 @@
|
|||||||
#include <asn1/asn1.h>
|
#include <asn1/asn1.h>
|
||||||
#include <asn1/ttodata.h>
|
#include <asn1/ttodata.h>
|
||||||
#include <crypto/ac.h>
|
#include <crypto/ac.h>
|
||||||
|
#include <crypto/ietf_attr_list.h>
|
||||||
#include <utils/optionsfrom.h>
|
#include <utils/optionsfrom.h>
|
||||||
|
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
@@ -128,8 +129,7 @@ static chunk_t read_serial(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBG1(" file '%s' does not exist yet - serial number set to 01",
|
DBG1(" file '%s' does not exist yet - serial number set to 01", OPENAC_SERIAL);
|
||||||
OPENAC_SERIAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -137,10 +137,12 @@ static chunk_t read_serial(void)
|
|||||||
* and incrementing it by one
|
* and incrementing it by one
|
||||||
* and representing it as a two's complement octet string
|
* and representing it as a two's complement octet string
|
||||||
*/
|
*/
|
||||||
|
printf("last_serial: '%#B'\n", &last_serial);
|
||||||
mpz_init(number);
|
mpz_init(number);
|
||||||
chunk_to_mpz(last_serial, number);
|
chunk_to_mpz(last_serial, number);
|
||||||
mpz_add_ui(number, number, 0x01);
|
mpz_add_ui(number, number, 0x01);
|
||||||
serial = mpz_to_chunk(number);
|
serial = mpz_to_chunk(number);
|
||||||
|
printf("serial: '%#B'\n", &serial);
|
||||||
mpz_clear(number);
|
mpz_clear(number);
|
||||||
|
|
||||||
return serial;
|
return serial;
|
||||||
@@ -151,8 +153,6 @@ static chunk_t read_serial(void)
|
|||||||
*/
|
*/
|
||||||
static void write_serial(chunk_t serial)
|
static void write_serial(chunk_t serial)
|
||||||
{
|
{
|
||||||
char buf[BUF_LEN];
|
|
||||||
|
|
||||||
FILE *fd = fopen(OPENAC_SERIAL, "w");
|
FILE *fd = fopen(OPENAC_SERIAL, "w");
|
||||||
|
|
||||||
if (fd)
|
if (fd)
|
||||||
@@ -384,8 +384,6 @@ int main(int argc, char **argv)
|
|||||||
/* load the signer's RSA private key */
|
/* load the signer's RSA private key */
|
||||||
if (keyfile != NULL)
|
if (keyfile != NULL)
|
||||||
{
|
{
|
||||||
err_t ugh = NULL;
|
|
||||||
|
|
||||||
signerkey = rsa_private_key_create_from_file(keyfile, &passphrase);
|
signerkey = rsa_private_key_create_from_file(keyfile, &passphrase);
|
||||||
|
|
||||||
if (signerkey == NULL)
|
if (signerkey == NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user