From 07061b97ea43bf3f86840bf392ee055b50809cb8 Mon Sep 17 00:00:00 2001 From: Camilo Viecco Date: Tue, 8 Jul 2014 16:16:22 -0700 Subject: [PATCH] Bug 1030204 - 2/2 Tests for Name constraints for ANSSI(DCISS) Root cert in psm. r=keeler --HG-- extra : rebase_source : 0b64f7206446a8c414df5b0f4a9653f0180b8b44 --- .../ssl/tests/unit/test_name_constraints.js | 7 +++++++ .../NameConstraints.dcissallowed.cert | Bin 0 -> 888 bytes .../NameConstraints.dcissblocked.cert | Bin 0 -> 889 bytes .../unit/test_name_constraints/dcisscopy.der | Bin 0 -> 957 bytes 4 files changed, 7 insertions(+) create mode 100644 security/manager/ssl/tests/unit/test_name_constraints/NameConstraints.dcissallowed.cert create mode 100644 security/manager/ssl/tests/unit/test_name_constraints/NameConstraints.dcissblocked.cert create mode 100644 security/manager/ssl/tests/unit/test_name_constraints/dcisscopy.der diff --git a/security/manager/ssl/tests/unit/test_name_constraints.js b/security/manager/ssl/tests/unit/test_name_constraints.js index bfa71849e28..31297203e76 100644 --- a/security/manager/ssl/tests/unit/test_name_constraints.js +++ b/security/manager/ssl/tests/unit/test_name_constraints.js @@ -269,4 +269,11 @@ function run_test() { check_cert_err_generic(cert, SEC_ERROR_CERT_NOT_IN_NAME_SPACE, certificateUsageSSLServer); check_cert_err_generic(cert, 0, certificateUsageSSLClient); } + + // DCISS tests + // The certs used here were generated by the NSS test suite and are + // originally located as security/nss/tests/libpkix/cert/ + load_cert("dcisscopy", "C,C,C"); + check_ok(certFromFile('NameConstraints.dcissallowed.cert')); + check_fail(certFromFile('NameConstraints.dcissblocked.cert')); } diff --git a/security/manager/ssl/tests/unit/test_name_constraints/NameConstraints.dcissallowed.cert b/security/manager/ssl/tests/unit/test_name_constraints/NameConstraints.dcissallowed.cert new file mode 100644 index 0000000000000000000000000000000000000000..539adcfee927bdd583c848eea16281217f5b958a GIT binary patch literal 888 zcmXqLVlFXgVv1S7%*4pV#LRE|)qt0cQ>)FR?K>|cBP%O|L1U{Sw*e;`b0`a&Fq2!5 zAwN(7ki#L&=2n!Lmz-+IXTSpzU>9Z$NG!@MHWV=61M#_p*#ms_gWX;HU@EwUSzVli zgFRt(6M%Tms zeyV=0_J5&bLP4Su-`@rQKlXN>GcV*^+^Bam&&P1X|J%10zvw<*YFKjd^;K4OgXu=O zUm21Vb21+3q~^-kpHKDb%C?Ev_MCf_ck%1B=@xtT6l&ZEX6q_9@2a16R72u&wpZ4Y zd)0;Ax38^z@_8D^?HM7Lw|*&jTo~h6oV4L#+cN`gUYVtpANE#wcif3d40n*KeOmjt z&-C2%GWC=j&9~nK=yzXatM6H>usd?nb&H%RnVk4$+f{p+m>C%u7aJJp83?j*CbW4l zw*7EoWMpAsW@0-4P6V>TjEw(Tm<$*UxPc)o%MX%b-hmvZz!U`xQ$~hd!yTGyUNUvQ z7hQJv*)wKg-=^>1ob-1E#HfWwov0{z%H%m&Y0{<}bywH;?%&g_!N1H}RHh{H{o>~7 zlRo7cG9EZ;owl%c`;@b+2PX9d9lo;e&xRKglV#p|Ec_I(Tp&4#LsnH~r{P`4jBmlp zB^SAu%BD;>a^1mN@$syOxxuIE%?+RCwWrsfUhCnf$q@3Qf@{4GyYlC$*J91CIQD4v zi;I<)P0M5dwbf<+KGExIZr+`uIaj-Q?*^VdWeg9jBM)e|AJ6}kn4Z=ceL2+3(Bu00 zk5aRC7P(JK(atz&Uy@(kl*FI^W5TSe7ZLjD5!e2{2-@}J<~o%om8t8`r0sX&$$UBY F69A`lM??Ss literal 0 HcmV?d00001 diff --git a/security/manager/ssl/tests/unit/test_name_constraints/NameConstraints.dcissblocked.cert b/security/manager/ssl/tests/unit/test_name_constraints/NameConstraints.dcissblocked.cert new file mode 100644 index 0000000000000000000000000000000000000000..28f84919de2e82c0e0334e9da9c35b1c5482311b GIT binary patch literal 889 zcmXqLVlFjkVv1eB%*4pV#LRE|#ekQMQ>)FR?K>|cBP%O|L1U{Sw*e;`b0`a&Fq2!5 zAwN(7ki#L&=2n!Lmz-+IXTSpzU>9Z$NG!@MHWV=61M#_p*#ms_gWX;HU@EwUSzVli zgFRt;F{F zymyktd&BQqXC-Gi-MeM##-Ja=qVH1o#%7(`V&9#u8*J27ovuG+VrFDuTx?*VXCTPN znb79J*!IJTk&%UknThQHI2FhWGcx{XVKQJa;06YO`|MyF?b=b_AbFG>0`phSvPd(>+d!Xdx&Un5rT9KaTRcicf=XZ+N z@iy37u&=w_`;epNmb2!OKfQmaHMu@qY3Jae#NPD1Izr01!6x*34x~vR@>>Z0QWsn^v5E%q9MdryYxc&A%???e`jfsmu;tUwY+(*u-~^ zmwwO7U&XVCnq`-r>ErU73Aur=a-i0r4<>-iSrto7#JBC z8JZgz8kt9l^BN&@2aP+M7?qHNkdc*vxrvdV!Jvtei>Zl`k>S9j&w75d<9<99zZ_V| zKY#mfZ`+5)%YI&58)bMZcWv}r$tWY)m4?yH@2n-8CvA!0mnnJr^}W*K8%isL`6SHM zLRP=4x^~saDLtq0FOOU8jhowhx5<HqX z-fD4Y8Cwwr0sUkD4^6v#E`C1$l@8gh7dL)8uuh&!X8)Gyg7vx4%N~FGb9?VWt0u-6 zal@|~rhi;M=s)K8dV8~gKwNR{`^wn?b3TO_y%LWs*8F!#a^8*Y%A4%I`9D+L{Nd?m zNuzZy7QQw9IcM(~1GW*n=)Jj#+sq+lW^`8De$8vimBNHeZep zjr{W8S2fP*>x?eGzpa_|>Z?#vgy(@%$ROVejD1FJ>hLf$ow+onwW z)f3a7qNw=S?DR{&867nR`q1jI9qpTBbGMeH)(M|J!T#;t_6uirINY9{dh)>6qzOrhRZ+)_Pd!Z4 Ua?VcT7FesGx!AvW{(`D#0Hd~F