[shibboleth-sp2] 05/100: Bad return check on openssl call

Ferenc Wágner wferi-guest at moszumanska.debian.org
Tue Jan 26 21:29:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

wferi-guest pushed a commit to annotated tag 1.2.1
in repository shibboleth-sp2.

commit adc141dd1ace00a1e9b5623cf0ab1db33bc1f598
Author: Scott Cantor <cantor.2 at osu.edu>
Date:   Sun May 30 21:09:45 2004 +0000

    Bad return check on openssl call
---
 xmlproviders/CredResolvers.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xmlproviders/CredResolvers.cpp b/xmlproviders/CredResolvers.cpp
index 4583c86..39505ae 100644
--- a/xmlproviders/CredResolvers.cpp
+++ b/xmlproviders/CredResolvers.cpp
@@ -311,7 +311,7 @@ void FileResolver::attach(void* ctx) const
     // Attach certs.
     for (vector<X509*>::const_iterator i=m_certs.begin(); i!=m_certs.end(); i++) {
         if (i==m_certs.begin()) {
-            if (SSL_CTX_use_certificate(ssl_ctx, *i)!=1) {
+            if (SSL_CTX_use_certificate(ssl_ctx, *i) != 1) {
                 log_openssl();
                 throw CredentialException("FileResolver::attach() unable to set EE certificate in context");
             }
@@ -319,7 +319,7 @@ void FileResolver::attach(void* ctx) const
         else {
             // When we add certs, they don't get ref counted, so we need to duplicate them.
             X509* dup = X509_dup(*i);
-            if (SSL_CTX_add_extra_chain_cert(ssl_ctx, dup) != 0) {
+            if (SSL_CTX_add_extra_chain_cert(ssl_ctx, dup) != 1) {
                 X509_free(dup);
                 log_openssl();
                 throw CredentialException("FileResolver::attach() unable to add CA certificate to context");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git



More information about the Pkg-shibboleth-devel mailing list