summaryrefslogtreecommitdiff
path: root/appl/lib/spki/verifier.b
diff options
context:
space:
mode:
Diffstat (limited to 'appl/lib/spki/verifier.b')
-rw-r--r--appl/lib/spki/verifier.b16
1 files changed, 14 insertions, 2 deletions
diff --git a/appl/lib/spki/verifier.b b/appl/lib/spki/verifier.b
index d712fd2a..ffcdfcad 100644
--- a/appl/lib/spki/verifier.b
+++ b/appl/lib/spki/verifier.b
@@ -50,16 +50,27 @@ putkey(keys: list of ref Key, k: ref Key): list of ref Key
return k :: keys;
}
-keybyhash(h: ref Hash, keys: list of ref Key): ref Key
+keybyhash(hl: list of ref Hash, keys: list of ref Key): ref Key
{
for(kl := keys; kl != nil; kl = tl kl){
k := hd kl;
- if(k.hash != nil && h.eq(k.hash))
+ if(k.hash != nil && anyhashmatch(hl, k.hash))
return k;
}
return nil;
}
+anyhashmatch(hl1, hl2: list of ref Hash): int
+{
+ for(; hl1 != nil; hl1 = tl hl1){
+ h1 := hd hl1;
+ for(; hl2 != nil; hl2 = tl hl2)
+ if(h1.eq(hd hl2))
+ return 1;
+ }
+ return 0;
+}
+
verify(seq: list of ref Seqel): (ref Speaksfor, list of ref Seqel, string)
{
stack: list of ref Seqel;
@@ -184,5 +195,6 @@ verify(seq: list of ref Seqel): (ref Speaksfor, list of ref Seqel, string)
checkcert(c: ref Cert): string
{
+ # TO DO?
return nil;
}