From 15d03936608ac69394502066c4eaaf9a298d21fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 26 Nov 2006 16:56:54 +0000 Subject: [PATCH] Add some more comments about how this works. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19126 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/crypto.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/hx509/crypto.c b/lib/hx509/crypto.c index 9eb2226b8..134ca240e 100644 --- a/lib/hx509/crypto.c +++ b/lib/hx509/crypto.c @@ -2082,7 +2082,7 @@ hx509_select(const hx509_context context, def = hx509_signature_sha1(); } else if (type == HX509_SELECT_PUBLIC_SIG) { bits = SIG_PUBLIC_SIG; - def = hx509_signature_rsa_with_sha1(); /* XXX depend on `sourceŽ */ + def = hx509_signature_rsa_with_sha1(); /* XXX depend on `sourceŽ and `peerŽ */ } else { hx509_set_error_string(context, 0, EINVAL, "unknown type %d of selection", type); return EINVAL; @@ -2095,6 +2095,10 @@ hx509_select(const hx509_context context, continue; if (der_heim_oid_cmp((*sig_algs[j]->sig_oid)(), &peer->val[i].algorithm) != 0) continue; + /* if (!source.supports(sig_algs[j])) + continue; */ + + /* found one, use that */ ret = copy_AlgorithmIdentifier(&peer->val[i], selected); if (ret) hx509_clear_error_string(context); @@ -2103,6 +2107,7 @@ hx509_select(const hx509_context context, } } + /* use default */ ret = copy_AlgorithmIdentifier(def, selected); if (ret) hx509_clear_error_string(context);