X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Frsa.c;h=1b5ce5638a61941ff8925ddec96a0a33b76280fc;hb=70a1a5594af5d4e6a364186b42ba4e34c676009b;hp=efd63d53bb1d02d72b2fb0e71f9f92b229ef9ce0;hpb=6dfdb323612184529b4b83c1be914dda8262de47;p=tinc diff --git a/src/openssl/rsa.c b/src/openssl/rsa.c index efd63d53..1b5ce563 100644 --- a/src/openssl/rsa.c +++ b/src/openssl/rsa.c @@ -1,6 +1,6 @@ /* rsa.c -- RSA key handling - Copyright (C) 2007 Guus Sliepen + Copyright (C) 2007-2012 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -54,7 +54,7 @@ bool rsa_read_pem_public_key(rsa_t *rsa, FILE *fp) { if(*rsa) return true; - + *rsa = PEM_read_RSA_PUBKEY(fp, rsa, NULL, NULL); if(*rsa) @@ -69,7 +69,7 @@ bool rsa_read_pem_private_key(rsa_t *rsa, FILE *fp) { if(*rsa) return true; - + logger(DEBUG_ALWAYS, LOG_ERR, "Unable to read RSA private key: %s", ERR_error_string(ERR_get_error(), NULL)); return false; } @@ -83,7 +83,7 @@ bool rsa_public_encrypt(rsa_t *rsa, void *in, size_t len, void *out) { return true; logger(DEBUG_ALWAYS, LOG_ERR, "Unable to perform RSA encryption: %s", ERR_error_string(ERR_get_error(), NULL)); - return false; + return false; } bool rsa_private_decrypt(rsa_t *rsa, void *in, size_t len, void *out) { @@ -91,7 +91,7 @@ bool rsa_private_decrypt(rsa_t *rsa, void *in, size_t len, void *out) { return true; logger(DEBUG_ALWAYS, LOG_ERR, "Unable to perform RSA decryption: %s", ERR_error_string(ERR_get_error(), NULL)); - return false; + return false; } bool rsa_active(rsa_t *rsa) {