u_char *pos;
iterator_t *iterator = list->create_iterator(list, TRUE);
ietfAttr_t *attr;
- bool first = TRUE;
/* precalculate the total size of all values */
while (iterator->iterate(iterator, (void **)&attr))
#include <asn1/asn1.h>
#include <asn1/ttodata.h>
#include <crypto/ac.h>
+#include <crypto/ietf_attr_list.h>
#include <utils/optionsfrom.h>
#include "build.h"
}
else
{
- DBG1(" file '%s' does not exist yet - serial number set to 01",
- OPENAC_SERIAL);
+ DBG1(" file '%s' does not exist yet - serial number set to 01", OPENAC_SERIAL);
}
/**
* and incrementing it by one
* and representing it as a two's complement octet string
*/
+ printf("last_serial: '%#B'\n", &last_serial);
mpz_init(number);
chunk_to_mpz(last_serial, number);
mpz_add_ui(number, number, 0x01);
serial = mpz_to_chunk(number);
+ printf("serial: '%#B'\n", &serial);
mpz_clear(number);
return serial;
*/
static void write_serial(chunk_t serial)
{
- char buf[BUF_LEN];
-
FILE *fd = fopen(OPENAC_SERIAL, "w");
if (fd)
/* load the signer's RSA private key */
if (keyfile != NULL)
{
- err_t ugh = NULL;
-
signerkey = rsa_private_key_create_from_file(keyfile, &passphrase);
if (signerkey == NULL)