fixed pbp import

This commit is contained in:
TLINDEN
2014-01-28 20:05:46 +01:00
parent 3f1bfef581
commit 68d8f640e6
4 changed files with 9 additions and 10 deletions

View File

@@ -69,7 +69,6 @@ typedef unsigned int qbyte; // Quad byte = 32 bits
// crypto file format stuff
// enabled via config.h (configure --enable-cbc)
#ifndef PCP_CBC
#error cbc not enabled
#define PCP_ASYM_CIPHER 5
#define PCP_SYM_CIPHER 23
#define PCP_BLOCK_SIZE 32 * 1024

12
libtool
View File

@@ -2,7 +2,7 @@
# libtool - Provide generalized library-building support services.
# Generated automatically by config.status (pcp) 0.2.0
# Libtool was configured on host r4:
# Libtool was configured on host io:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -66,13 +66,13 @@ PATH_SEPARATOR=":"
# The host system.
host_alias=
host=amd64-unknown-freebsd9.1
host_os=freebsd9.1
host=amd64-unknown-freebsd9.0
host_os=freebsd9.0
# The build system.
build_alias=
build=amd64-unknown-freebsd9.1
build_os=freebsd9.1
build=amd64-unknown-freebsd9.0
build_os=freebsd9.0
# A sed program that does not truncate output.
SED="/usr/bin/sed"
@@ -164,7 +164,7 @@ lock_old_archive_extraction=no
LTCC="gcc"
# LTCC compiler flags.
LTCFLAGS="-g -O2 -I/usr/local/include"
LTCFLAGS="-I/usr/local/include -I/usr/local/include"
# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'"

View File

@@ -401,14 +401,14 @@ int pcp_importpublic (vault_t *vault, FILE *in, int pbpcompat) {
goto errimp1;
}
char *parts = strtok (tmp, "|");
char *parts = strtok (tmp, "<>");
int pnum = 0;
while (parts != NULL) {
if(pnum == 0)
memcpy(pub->owner, parts, strlen(parts));
else if (pnum == 1)
memcpy(pub->mail, parts, strlen(parts));
parts = strtok(NULL, "|");
parts = strtok(NULL, "<>");
pnum++;
}
free(parts);

View File

@@ -253,7 +253,7 @@ void pcppubkey_print(pcp_pubkey_t *key, FILE* out, int pbpcompat) {
v->tm_year+1900-1, v->tm_mon+1, v->tm_mday,
v->tm_hour, v->tm_min, v->tm_sec);
sprintf(name, "%s|%s", key->owner, key->mail);
sprintf(name, "%s<%s>", key->owner, key->mail);
memcpy(&raw[pos], dates, 64);
pos += 64;