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