[Spice-devel] [PATCH 2/2] server: more logging about certificates used

Uri Lublin uril at redhat.com
Fri Mar 2 12:01:16 PST 2012


On 03/02/2012 05:52 PM, Christophe Fergeau wrote:
> This commit adds some log messages indicating which certificates
> could be loaded (or not).
>
> Fixes rhbz#787678
> ---
>  server/reds.c |   14 ++++++++++----
>  1 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/server/reds.c b/server/reds.c
> index 3a98456..f93ae6b 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3086,7 +3086,9 @@ static void reds_init_ssl(void)
>  
>      /* Load our keys and certificates*/
>      return_code = SSL_CTX_use_certificate_chain_file(reds->ctx, ssl_parameters.certs_file);
> -    if (return_code != 1) {
> +    if (return_code == 1) {
> +        red_printf("Loaded certificates from %s", ssl_parameters.certs_file);
> +    } else {
>          red_error("Could not load certificates from %s", ssl_parameters.certs_file);
>      }
>  
> @@ -3094,14 +3096,18 @@ static void reds_init_ssl(void)
>  
>      return_code = SSL_CTX_use_PrivateKey_file(reds->ctx, ssl_parameters.private_key_file,
>                                                SSL_FILETYPE_PEM);
> -    if (return_code != 1) {
> +    if (return_code == 1) {
> +        red_printf("Using private key from %s", ssl_parameters.certs_file);

Expected --  ssl_parameters.private_key_file



More information about the Spice-devel mailing list