1 13 14 package org.ejbca.core.model.ca.certificateprofiles; 15 16 import java.util.ArrayList ; 17 18 24 public class HardTokenAuthEncCertificateProfile extends CertificateProfile{ 25 26 28 public static final String CERTIFICATEPROFILENAME = "HARDTOKEN_AUTHENC"; 29 30 35 public HardTokenAuthEncCertificateProfile() { 36 37 setType(TYPE_ENDENTITY); 38 39 setUseKeyUsage(true); 40 setKeyUsage(new boolean[9]); 41 setKeyUsage(KEYENCIPHERMENT,true); 42 setKeyUsage(DIGITALSIGNATURE,true); 43 setKeyUsageCritical(true); 44 45 setUseExtendedKeyUsage(true); 46 ArrayList eku = new ArrayList (); 47 eku.add(new Integer (CLIENTAUTH)); 48 eku.add(new Integer (EMAILPROTECTION)); 49 eku.add(new Integer (SMARTCARDLOGON)); 50 eku.add(new Integer (IPSECUSER)); 51 setExtendedKeyUsage(eku); 52 setExtendedKeyUsageCritical(false); 53 54 } 55 56 public void upgrade(){ 58 if(Float.compare(LATEST_VERSION, getVersion()) != 0) { 59 61 super.upgrade(); 62 } 63 } 64 65 66 } 68 | Popular Tags |