Search in sources :

Example 6 with CertificatePolicyCpsUriExtensionField

use of org.nhindirect.policy.x509.CertificatePolicyCpsUriExtensionField in project nhin-d by DirectProject.

the class CertificatePolicyCpsUriExtensionField_injectReferenceValueTest method testInjectRefereneValue_mixedCPS_assertValue.

public void testInjectRefereneValue_mixedCPS_assertValue() throws Exception {
    final X509Certificate cert = TestUtils.loadCertificate("policyMixedQualifier.der");
    final CertificatePolicyCpsUriExtensionField field = new CertificatePolicyCpsUriExtensionField(true);
    field.injectReferenceValue(cert);
    Collection<String> pols = field.getPolicyValue().getPolicyValue();
    assertEquals(2, pols.size());
//assertTrue(pols.contains("http://www.cerner.com/CPS"));
}
Also used : X509Certificate(java.security.cert.X509Certificate) CertificatePolicyCpsUriExtensionField(org.nhindirect.policy.x509.CertificatePolicyCpsUriExtensionField)

Aggregations

CertificatePolicyCpsUriExtensionField (org.nhindirect.policy.x509.CertificatePolicyCpsUriExtensionField)6 X509Certificate (java.security.cert.X509Certificate)5 PolicyRequiredException (org.nhindirect.policy.PolicyRequiredException)1