1 19 20 package com.maverick.crypto.asn1.misc; 21 22 import com.maverick.crypto.asn1.*; 23 24 38 public class NetscapeCertType 39 extends DERBitString 40 { 41 public static final int sslClient = (1 << 7); 42 public static final int sslServer = (1 << 6); 43 public static final int smime = (1 << 5); 44 public static final int objectSigning = (1 << 4); 45 public static final int reserved = (1 << 3); 46 public static final int sslCA = (1 << 2); 47 public static final int smimeCA = (1 << 1); 48 public static final int objectSigningCA = (1 << 0); 49 50 57 public NetscapeCertType( 58 int usage) 59 { 60 super(getBytes(usage), getPadBits(usage)); 61 } 62 63 public NetscapeCertType( 64 DERBitString usage) 65 { 66 super(usage.getBytes(), usage.getPadBits()); 67 } 68 69 public String toString() 70 { 71 return "NetscapeCertType: 0x" + Integer.toHexString(data[0] & 0xff); 72 } 73 } 74 | Popular Tags |