From 0928d8513ccf6c259767c77f8fcd696d0a161280 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 30 Nov 2002 13:48:11 +0000 Subject: [PATCH] Debug printing change. --- apps/silcd/serverconfig.c | 4 ++-- doc/example_silcd.conf.in | 4 ++-- lib/silccrypt/silcpkcs.c | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/silcd/serverconfig.c b/apps/silcd/serverconfig.c index a49a0844..05a08dcb 100644 --- a/apps/silcd/serverconfig.c +++ b/apps/silcd/serverconfig.c @@ -153,8 +153,8 @@ static bool my_parse_authdata(SilcAuthMethod auth_meth, const char *p, NULL, silc_hash_public_key, NULL, silc_hash_public_key_compare, NULL)) { silc_pkcs_public_key_free(public_key); - SILC_SERVER_LOG_WARNING(("Warning: file \"%s\" contains a double " - "public key (key discarded)", p)); + SILC_SERVER_LOG_WARNING(("Warning: public key file \"%s\" already " + "configured, ignoring this key", p)); return TRUE; /* non fatal error */ } diff --git a/doc/example_silcd.conf.in b/doc/example_silcd.conf.in index 25d05a3a..c098013d 100644 --- a/doc/example_silcd.conf.in +++ b/doc/example_silcd.conf.in @@ -407,7 +407,7 @@ ConnectionParams { # If both are provided then both password and public key based authentication # is allowed. The "PublicKey" includes the single key contained in the # specified file, while "PublicKeyDir" includes all files in the specified -# directory, which must all be valid public keys, non recursively. +# directory, which must all be valid public keys. # # Next example connection will match to all incoming client connections, # and no authentication is required. @@ -418,7 +418,7 @@ Client { #PublicKey = "/path/to/the/user_my.key"; #PublicKey = "/path/to/the/user_221.key"; #PublicKey = "/path/to/the/user_313.key"; - #PublicKeyDir = "/path/to/keys/dir"; + #PublicKeyDir = "/path/to/keys/dir/"; Params = "normal"; }; diff --git a/lib/silccrypt/silcpkcs.c b/lib/silccrypt/silcpkcs.c index afceeacb..1038d621 100644 --- a/lib/silccrypt/silcpkcs.c +++ b/lib/silccrypt/silcpkcs.c @@ -1356,6 +1356,10 @@ bool silc_pkcs_load_public_key(const char *filename, SilcPublicKey *public_key, unsigned char *cp, *old, *data, byte; SilcUInt32 i, data_len, len; + SILC_LOG_DEBUG(("Loading public key `%s' with %s encoding", filename, + encoding == SILC_PKCS_FILE_PEM ? "Base64" : + encoding == SILC_PKCS_FILE_BIN ? "Binary" : "Unkonwn")); + old = data = silc_file_readfile(filename, &data_len); if (!data) return FALSE; -- 2.43.0