[xmlsec] fix pkcs12 file loading (from Andre de Souza Pinto)
- From: Aleksey Sanin <aleksey src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [xmlsec] fix pkcs12 file loading (from Andre de Souza Pinto)
- Date: Sun, 6 Feb 2011 05:08:24 +0000 (UTC)
commit 97ef42da64d3296f85b201d8698872ae5eae7345
Author: Aleksey Sanin <aleksey aleksey com>
Date: Sat Feb 5 21:05:46 2011 -0800
fix pkcs12 file loading (from Andre de Souza Pinto)
src/openssl/app.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/openssl/app.c b/src/openssl/app.c
index d172dcf..4f8f79e 100644
--- a/src/openssl/app.c
+++ b/src/openssl/app.c
@@ -771,13 +771,13 @@ 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;
}
}
- if(has_cert != 0) {
+ if(has_cert == 0) {
tmpcert = X509_dup(cert);
if(tmpcert == NULL) {
xmlSecError(XMLSEC_ERRORS_HERE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]