fixed libtools portability bug, fixed arc4random() portability,

fixed htobe32 and be32toh portability, fixed error handling in main(),
fixed invalid type parameter for randomart image in pcppubkey_printshortinfo(),
fixed configure search for libsodium.
This commit is contained in:
TLINDEN
2013-10-29 22:14:34 +01:00
parent f029d9fec4
commit 08ce1c1b8e
20 changed files with 1354 additions and 675 deletions

View File

@@ -235,7 +235,7 @@ void pcppubkey_printshortinfo(pcp_pubkey_t *key) {
int i;
printf(" Key-ID: 0x%s\n", key->id);
printf(" Owner: %s\n", key->owner);
char *r = pcpkey_get_art(key);
char *r = pcppubkey_get_art(key);
printf(" Random Art ID: ");
for (i=0; i<strlen(r); ++i) {
if(r[i] == '\n') {

View File

@@ -9,7 +9,7 @@ void usage() {
}
void version() {
fprintf(stderr, "pcp version %d.%d.%d\n",
fprintf(stderr, "pcp version %d.%d.%d, use --help to learn how to use.\n",
PCP_VERSION_MAJOR, PCP_VERSION_MINOR, PCP_VERSION_PATCH);
exit(0);
}
@@ -168,6 +168,11 @@ int main (int argc, char **argv) {
argv += optind;
if(mode == 0) {
version();
return 1;
}
if(usevault == 1) {
pcp_inithashes();
vault = pcpvault_init(vaultfile);
@@ -327,7 +332,7 @@ int main (int argc, char **argv) {
default:
// mode params mixed
fatal("Sorry, invalid combinatin of commandline parameters!\n");
fatal("Sorry, invalid combination of commandline parameters!\n");
break;
}
}

View File

@@ -1,7 +1,9 @@
#ifndef _HAVE_PCP_H
#define _HAVE_PCP_H
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#include <unistd.h>
#include <stdio.h>

View File

@@ -1,7 +1,9 @@
#ifndef _HAVE_PCP_Z85
#define _HAVE_PCP_Z85
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#include <unistd.h>
#include <stdio.h>