use of com.unboundid.asn1.ASN1Null in project ldapsdk by pingidentity.
the class DebugTestCase method testDebugASN1Write1DisabledAll.
/**
* Tests the first {@code debugASN1Write} method with the debugger disabled
* and a debug type set of all types.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testDebugASN1Write1DisabledAll() throws Exception {
Debug.setEnabled(false);
testLogHandler.resetMessageCount();
assertFalse(Debug.debugEnabled(DebugType.ASN1));
Debug.debugASN1Write(new ASN1Null());
assertTrue(testLogHandler.getMessageCount() >= 0);
}
use of com.unboundid.asn1.ASN1Null in project ldapsdk by pingidentity.
the class DebugTestCase method testDebugASN1Read2EnabledWithoutASN1.
/**
* Tests the second {@code debugASN1Read} method with the debugger enabled
* and a debug type set that does not include the ASN.1 type.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testDebugASN1Read2EnabledWithoutASN1() throws Exception {
Debug.setEnabled(true, EnumSet.of(DebugType.OTHER));
testLogHandler.resetMessageCount();
assertFalse(Debug.debugEnabled(DebugType.ASN1));
Debug.debugASN1Read(Level.FINEST, new ASN1Null());
assertTrue(testLogHandler.getMessageCount() >= 0);
}
use of com.unboundid.asn1.ASN1Null in project ldapsdk by pingidentity.
the class DebugTestCase method testDebugASN1Read1DisabledAll.
/**
* Tests the first {@code debugASN1Read} method with the debugger disabled
* and a debug type set of all types.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testDebugASN1Read1DisabledAll() throws Exception {
Debug.setEnabled(false);
testLogHandler.resetMessageCount();
assertFalse(Debug.debugEnabled(DebugType.ASN1));
Debug.debugASN1Read(new ASN1Null());
assertTrue(testLogHandler.getMessageCount() >= 0);
}
use of com.unboundid.asn1.ASN1Null in project ldapsdk by pingidentity.
the class DebugTestCase method testDebugASN1Read2DisabledAll.
/**
* Tests the second {@code debugASN1Read} method with the debugger disabled
* and a debug type set of all types.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testDebugASN1Read2DisabledAll() throws Exception {
Debug.setEnabled(false);
testLogHandler.resetMessageCount();
assertFalse(Debug.debugEnabled(DebugType.ASN1));
Debug.debugASN1Read(Level.FINEST, new ASN1Null());
assertTrue(testLogHandler.getMessageCount() >= 0);
}
use of com.unboundid.asn1.ASN1Null in project ldapsdk by pingidentity.
the class X509CertificateTestCase method testIsSelfSignedWithDifferentAuthorityAndSubjectKeyIdentifiers.
/**
* Tests the {@code isSelfSigned} method for a certificate that has both
* subject key identifier and authority key identifier extensions with
* different values.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testIsSelfSignedWithDifferentAuthorityAndSubjectKeyIdentifiers() throws Exception {
final X509Certificate c = new X509Certificate(X509CertificateVersion.V3, BigInteger.valueOf(12345L), SignatureAlgorithmIdentifier.SHA_256_WITH_RSA.getOID(), new ASN1Null(), new ASN1BitString(true, false, true, false, true), new DN("CN=Test,O=Example Corporation,C=US"), System.currentTimeMillis(), System.currentTimeMillis() + (365L * 86_400_000L), new DN("CN=Test,O=Example Corporation,C=US"), PublicKeyAlgorithmIdentifier.RSA.getOID(), new ASN1Null(), new ASN1BitString(false, true, false, true, false), null, null, null, new SubjectKeyIdentifierExtension(false, new ASN1OctetString("keyIdentifier")), new AuthorityKeyIdentifierExtension(false, new ASN1OctetString("differentKeyIdentifier"), null, null));
assertFalse(c.isSelfSigned());
}
Aggregations