From 654d1bcf6818fabc4c06705a26d96b6aa0b8da9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 28 Mar 2006 13:12:09 +0000 Subject: [PATCH] (_hx509_pbe_decrypt): try all passwords, not just the first one. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16852 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/crypto.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/hx509/crypto.c b/lib/hx509/crypto.c index dace4bfa7..60bffac8a 100644 --- a/lib/hx509/crypto.c +++ b/lib/hx509/crypto.c @@ -1473,9 +1473,8 @@ _hx509_pbe_decrypt(hx509_context context, ret = (*s2k)(context, password, ai->parameters, &crypto, &key, &iv, enc_oid, md); - if (ret) { + if (ret) goto out; - } ret = hx509_crypto_decrypt(crypto, econtent->data, @@ -1483,7 +1482,7 @@ _hx509_pbe_decrypt(hx509_context context, &iv, content); hx509_crypto_destroy(crypto); - if (ret) + if (ret == 0) goto out; }