01: package org.bouncycastle.asn1.test;
02:
03: import java.io.IOException;
04:
05: import org.bouncycastle.asn1.x509.KeyUsage;
06: import org.bouncycastle.util.test.SimpleTest;
07:
08: public class KeyUsageTest extends SimpleTest {
09: public String getName() {
10: return "KeyUsage";
11: }
12:
13: public void performTest() throws IOException {
14: BitStringConstantTester.testFlagValueCorrect(0,
15: KeyUsage.digitalSignature);
16: BitStringConstantTester.testFlagValueCorrect(1,
17: KeyUsage.nonRepudiation);
18: BitStringConstantTester.testFlagValueCorrect(2,
19: KeyUsage.keyEncipherment);
20: BitStringConstantTester.testFlagValueCorrect(3,
21: KeyUsage.dataEncipherment);
22: BitStringConstantTester.testFlagValueCorrect(4,
23: KeyUsage.keyAgreement);
24: BitStringConstantTester.testFlagValueCorrect(5,
25: KeyUsage.keyCertSign);
26: BitStringConstantTester.testFlagValueCorrect(6,
27: KeyUsage.cRLSign);
28: BitStringConstantTester.testFlagValueCorrect(7,
29: KeyUsage.encipherOnly);
30: BitStringConstantTester.testFlagValueCorrect(8,
31: KeyUsage.decipherOnly);
32: }
33:
34: public static void main(String[] args) {
35: runTest(new KeyUsageTest());
36: }
37: }
|