Skip to content

Commit 9873989

Browse files
highlunderclaude
andcommitted
validate: rewrite the summary key in plain language; fix the SKIP label
The end-of-run legend was written as internal dev shorthand (cryptic A/B categories, "Weierstrass bignum math works", "RFC 9090 OID fallback", a draft-19-vs-20 paragraph shown even on draft-20 runs) that an outside reader cannot follow. Replace it with a plain-language key explaining PASS / XFAIL / SKIP / FAIL, and gate the draft-19 "withcert" note to --version 01 where it actually applies. Also fix the SKIP summary label: it read "(no reference data)", which is wrong when the reference data IS present but the tool does not yet support the algorithm (e.g. signature verification for brainpool/RSA/SM2/Ed448). It now reads "(not run, see key)" and the key states both causes. Text only; counts unchanged (PASS 125, XFAIL 68, SKIP 8, FAIL 0). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9d785c2 commit 9873989

1 file changed

Lines changed: 23 additions & 11 deletions

File tree

c509_demo_impl/validate_c509.sh

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,19 +1039,31 @@ echo "============================================================${C_RST}"
10391039
printf " %-35s %d\n" "Total tests run:" "${TOTAL}"
10401040
printf " ${C_PASS}%-35s %d${C_RST}\n" "PASS:" "${PASS}"
10411041
printf " ${C_XFAIL}%-35s %d${C_RST}\n" "XFAIL (expected, see key):" "${XFAIL}"
1042-
printf " ${C_SKIP}%-35s %d${C_RST}\n" "SKIP (no reference data):" "${SKIP}"
1042+
printf " ${C_SKIP}%-35s %d${C_RST}\n" "SKIP (not run, see key):" "${SKIP}"
10431043
printf " ${C_FAIL}%-35s %d${C_RST}\n" "FAIL (unexpected):" "${FAIL}"
10441044
echo ""
1045-
echo " Expected-failure key (draft-ietf-cose-cbor-encoded-cert):"
1046-
echo " A Type 2 natively-signed (section *.4 or 3.11.3): §2.1, §2.3.5"
1047-
echo " SM2 and FRP256v1 type-3 PASS — Weierstrass bignum math works"
1048-
echo " RFC 9090 OID fallback IMPLEMENTED — unconvertible cert PASSES"
1049-
echo " B Type-2 signing (f2): unsupported key type, or f2 cannot encode the"
1050-
echo " cert as type-2 (e.g. id-alg-unsigned X25519/X448 end-entity)"
1051-
echo " RESOLVED for draft-20 — the r2 type-2 CSR path (RFC 6955 DhSig + the nested"
1052-
echo " 'withcert' embedded cert) and CRT-template decode/round-trip (§9) now PASS."
1053-
echo " Running --version 01 leaves the §8.7 withcert CSR as an expected draft-19-vs-20"
1054-
echo " divergence (its embedded cert is bytes .cbor-wrapped only from draft-20)."
1045+
echo " Key — what each result means:"
1046+
echo " PASS the reference implementation reproduced the draft's vector:"
1047+
echo " the C509 encoding is byte-exact, the signature is cryptographically"
1048+
echo " verified, or the X.509 DER round-trips byte-exact."
1049+
echo " XFAIL \"expected failure\" — the vector does not apply to this particular"
1050+
echo " check, by design (NOT a bug, and counted separately from FAIL)."
1051+
echo " The main case: a natively-signed Type-2 certificate signs over"
1052+
echo " CBOR, so it has no equivalent X.509 DER and cannot be round-tripped"
1053+
echo " through DER. Those same Type-2 vectors are still checked — and"
1054+
echo " pass — in the encoding and signature-verification phases. Every"
1055+
echo " XFAIL line above prints its own specific reason."
1056+
echo " SKIP the check could not be run — either an input it needs is not"
1057+
echo " present, OR the tool does not yet support that algorithm."
1058+
echo " (Signature verification currently covers ECDSA P-256/P-384/P-521"
1059+
echo " and Ed25519; brainpool / RSA / SM2 / Ed448 are not yet wired.)"
1060+
echo " FAIL a genuine, unexpected mismatch — a bug to fix."
1061+
if [ "${VERSION}" = "01" ]; then
1062+
echo ""
1063+
echo " Note (--version 01 only): the section 8.7 \"withcert\" CSR is an expected"
1064+
echo " draft-19-vs-20 difference — its embedded certificate is bytes .cbor-wrapped"
1065+
echo " only from draft-20 — so it will not match the older draft-19 vector."
1066+
fi
10551067
echo ""
10561068
if [ "${FAIL}" -eq 0 ]; then
10571069
echo -e "${C_PASS}${C_BOLD} All tests passed or accounted for as expected failures.${C_RST}"

0 commit comments

Comments
 (0)