From 85fa66e05a9f67ca8888b8853a5590156a673163 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Thu, 30 Dec 2010 17:13:20 -0500 Subject: [PATCH] switch from "email" to "e-mail" --- Changelog | 3 ++- Crypt/Monkeysphere/MSVA.pm | 6 +++--- tests/basic | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Changelog b/Changelog index 2c9dc9b..ef7c793 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,7 @@ msva-perl (0.9~pre) upstream; - * Add "email" context (checks for 's' capability) (closes MS #2688) + * Add "e-mail" context (checks for signing capability instead of + authentication) (closes MS #2688) * Add "openpgp4fpr" pkc type for providing OpenPGP v4 fingerprint * Add --version option to msva-query-agent diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm index e377808..ed72f4d 100755 --- a/Crypt/Monkeysphere/MSVA.pm +++ b/Crypt/Monkeysphere/MSVA.pm @@ -650,7 +650,7 @@ }; # check context string - if ($data->{context} =~ /^(https|ssh|smtp|ike|postgresql|imaps|imap|submission|email)$/) { + if ($data->{context} =~ /^(https|ssh|smtp|ike|postgresql|imaps|imap|submission|e-mail)$/) { $data->{context} = $1; } else { msvalog('error', "invalid context: %s\n", $data->{context}); @@ -676,7 +676,7 @@ } my $prefix = $data->{context}.'://'; - if ($data->{context} eq 'email' || + if ($data->{context} eq 'e-mail' || (defined $data->{peer}->{type} && $data->{peer}->{type} eq 'client' && # ike and smtp clients are effectively other servers, so we'll @@ -782,7 +782,7 @@ if ($primarymatch) { my $iscapable = 0; msvalog('verbose', "key 0x%s matches...\n",$subkey->hex_id); - if ($data->{context} eq 'email') { + if ($data->{context} eq 'e-mail') { if ($subkey->usage_flags =~ /s/) { $iscapable = 1; msvalog('verbose', "...and is signing-capable...\n"); diff --git a/tests/basic b/tests/basic index 371f208..5cc2723 100755 --- a/tests/basic +++ b/tests/basic @@ -113,8 +113,8 @@ runtests() { # X should now validate as X "${srcdir}"/test-msva msva-perl "${srcdir}"/test-msva msva-query-agent https x.example.net "${ctype}" < "${WORKDIR}/pkc/x.${ctype}" "${srcdir}"/test-msva msva-perl "${srcdir}"/test-msva msva-query-agent https 'a ' "${ctype}" client < "${WORKDIR}/pkc/a.${ctype}" - # also test "email" context - "${srcdir}"/test-msva msva-perl "${srcdir}"/test-msva msva-query-agent email 'a ' "${ctype}" < "${WORKDIR}/pkc/a.${ctype}" + # also test "e-mail" context + "${srcdir}"/test-msva msva-perl "${srcdir}"/test-msva msva-query-agent e-mail 'a ' "${ctype}" < "${WORKDIR}/pkc/a.${ctype}" # but X should not validate as Y or Z: for name in x y z; do -- 2.26.2