X-Git-Url: http://git.silcnet.org/gitweb/?p=crypto.git;a=blobdiff_plain;f=lib%2Fsilcapputil%2Fsilcapputil.c;h=157cce57b3ed3261c0b795bdf850a3f987f2fa43;hp=abd82dc30d86c03295ac5778e77cec773d40a24b;hb=1d8251c3f2f362ef94939992519f376b0640b1bc;hpb=d2d17c1903928b8cf1ad5a7d5be2b83946a68a42 diff --git a/lib/silcapputil/silcapputil.c b/lib/silcapputil/silcapputil.c index abd82dc3..157cce57 100644 --- a/lib/silcapputil/silcapputil.c +++ b/lib/silcapputil/silcapputil.c @@ -31,13 +31,17 @@ static char *silc_create_pk_identifier(void) /* Get hostname */ hostname = silc_net_localhost(); - if (!hostname) + if (!hostname) { + fprintf(stderr, "Could not resolve local hostname/IP address"); return NULL; + } /* Get username (mandatory) */ username = silc_get_username(); - if (!username) + if (!username) { + fprintf(stderr, "Could not determine username"); return NULL; + } /* Create default email address, whether it is right or not */ silc_snprintf(email, sizeof(email), "%s@%s", username, hostname); @@ -136,8 +140,7 @@ New pair of keys will be created. Please, answer to following questions.\n\ } } else { if (!def) { - fprintf(stderr, "Could not create public key identifier: %s\n", - strerror(errno)); + fprintf(stderr, "Could not create public key identifier\n"); return FALSE; } identifier = strdup(def);