summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2011-09-11 20:00:29 +0200
committerChristian Beier <dontmind@freeshell.org>2011-09-11 20:00:29 +0200
commit431518add49d3542c61a47f2b919acfac214753d (patch)
treed28fbf19cf8bd6b238fa99f78e6418b509ecdc18
parent507c3c7361481bccfdb33f4d347b79c10ff34344 (diff)
downloadlibvncserver-431518add49d3542c61a47f2b919acfac214753d.zip
libvncserver-431518add49d3542c61a47f2b919acfac214753d.tar.gz
Fix libvncserver GnuTLS init.
gnutls_certificate_set_x509_trust_file() returns the number of processed certs and _not_ GNUTLS_E_SUCCESS (0) on success!
-rw-r--r--libvncserver/rfbssl_gnutls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libvncserver/rfbssl_gnutls.c b/libvncserver/rfbssl_gnutls.c
index 0689c01..cf60cdc 100644
--- a/libvncserver/rfbssl_gnutls.c
+++ b/libvncserver/rfbssl_gnutls.c
@@ -95,7 +95,7 @@ struct rfbssl_ctx *rfbssl_init_global(char *key, char *cert)
/* */
} else if (!GNUTLS_E_SUCCESS == (ret = gnutls_certificate_allocate_credentials(&ctx->x509_cred))) {
/* */
- } else if (!GNUTLS_E_SUCCESS == (ret = gnutls_certificate_set_x509_trust_file(ctx->x509_cred, cert, GNUTLS_X509_FMT_PEM))) {
+ } else if ((ret = gnutls_certificate_set_x509_trust_file(ctx->x509_cred, cert, GNUTLS_X509_FMT_PEM)) < 0) {
/* */
} else if (!GNUTLS_E_SUCCESS == (ret = gnutls_certificate_set_x509_key_file(ctx->x509_cred, cert, key, GNUTLS_X509_FMT_PEM))) {
/* */
OpenPOWER on IntegriCloud