[xmlsec] ensure we have only one copy of key's cert after reading pkcs12 from openssl



commit e195578525d794cf74762a3ea8d3d6b4cae9daa3
Author: Aleksey Sanin <aleksey aleksey com>
Date:   Thu Mar 18 20:43:03 2010 -0700

    ensure we have only one copy of key's cert after reading pkcs12 from openssl

 src/openssl/app.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/openssl/app.c b/src/openssl/app.c
index 67a2f48..64f8342 100644
--- a/src/openssl/app.c
+++ b/src/openssl/app.c
@@ -749,7 +749,7 @@ xmlSecOpenSSLAppPkcs12LoadBIO(BIO* bio, const char *pwd,
     for(i = 0; i < sk_X509_num(chain); ++i) {
 		xmlSecAssert2(sk_X509_value(chain, i), NULL);
 
-		if(X509_cmp(sk_X509_value(chain, i), cert) == 0) {
+		if(X509_cmp(sk_X509_value(chain, i), cert) != 0) {
 			has_cert = 1;
 			break;
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]