From 68d8f640e6f88c20ec729f778bed2b5250422a0e Mon Sep 17 00:00:00 2001 From: TLINDEN Date: Tue, 28 Jan 2014 20:05:46 +0100 Subject: [PATCH] fixed pbp import --- include/pcp/defines.h | 1 - libtool | 12 ++++++------ src/keymgmt.c | 4 ++-- src/keyprint.c | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/pcp/defines.h b/include/pcp/defines.h index 954c8a9..ff298bf 100644 --- a/include/pcp/defines.h +++ b/include/pcp/defines.h @@ -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 diff --git a/libtool b/libtool index 08021ec..9002541 100755 --- a/libtool +++ b/libtool @@ -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'" diff --git a/src/keymgmt.c b/src/keymgmt.c index 0db6edd..90ee1a6 100644 --- a/src/keymgmt.c +++ b/src/keymgmt.c @@ -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); diff --git a/src/keyprint.c b/src/keyprint.c index 62e5d45..a8c3c7d 100644 --- a/src/keyprint.c +++ b/src/keyprint.c @@ -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;