aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-11-20 16:45:46 +0100
committerHans Nilsson <[email protected]>2017-11-20 16:56:39 +0100
commit27d73755ff62a828be8a14597a20e7762049c727 (patch)
tree55cbf0bd7a89fa8932d3de98e35714ee20c65170 /lib
parentbb1b3046fb606cdecc6ba275d96bee89f0502355 (diff)
downloadotp-27d73755ff62a828be8a14597a20e7762049c727.tar.gz
otp-27d73755ff62a828be8a14597a20e7762049c727.tar.bz2
otp-27d73755ff62a828be8a14597a20e7762049c727.zip
crypto: Printout polishing
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto/c_src/otp_test_engine.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/crypto/c_src/otp_test_engine.c b/lib/crypto/c_src/otp_test_engine.c
index a66bee2ddf..5c6122c06a 100644
--- a/lib/crypto/c_src/otp_test_engine.c
+++ b/lib/crypto/c_src/otp_test_engine.c
@@ -218,9 +218,9 @@ EVP_PKEY* test_key_load(ENGINE *er, const char *id, UI_METHOD *ui_method, void *
fclose(f);
if (!pkey) {
- fprintf(stderr, "%s:%d Key read from file failed. ", __FILE__,__LINE__);
+ fprintf(stderr, "%s:%d Key read from file %s failed.\r\n", __FILE__,__LINE__,id);
if (callback_data)
- fprintf(stderr, "Pwd = \"%s\". ", (char *)callback_data);
+ fprintf(stderr, "Pwd = \"%s\".\r\n", (char *)callback_data);
fprintf(stderr, "Contents of file \"%s\":\r\n",id);
f = fopen(id, "r");
{ /* Print the contents of the key file */
@@ -228,12 +228,14 @@ EVP_PKEY* test_key_load(ENGINE *er, const char *id, UI_METHOD *ui_method, void *
while (!feof(f)) {
switch (c=fgetc(f)) {
case '\n':
- case '\r': putc('\r',stdout); putc('\n',stdout); break;
- default: putc(c, stdout);
+ case '\r': putc('\r',stderr); putc('\n',stderr); break;
+ default: putc(c, stderr);
}
}
}
+ fprintf(stderr, "File contents printed.\r\n");
fclose(f);
+ return NULL;
}
return pkey;