📄 hardtokenauthcertificateprofile.java
字号:
/************************************************************************* * * * EJBCA: The OpenSource Certificate Authority * * * * This software is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or any later version. * * * * See terms of license at gnu.org. * * * *************************************************************************/ package se.anatom.ejbca.ca.store.certificateprofiles;import java.util.ArrayList;/** * HardTokenAuthCertificateProfile is a class defining the fixed characteristics * of a hard token authentication certificate. * * @version $Id: HardTokenAuthCertificateProfile.java,v 1.2 2004/04/16 07:38:59 anatom Exp $ */public class HardTokenAuthCertificateProfile extends CertificateProfile{ // Public Constants public final static String CERTIFICATEPROFILENAME = "HARDTOKEN_AUTH"; // Public Methods /** Creates a certificate with the characteristics of an end user. */ public HardTokenAuthCertificateProfile() { setCertificateVersion(VERSION_X509V3); setValidity(730); setUseBasicConstraints(true); setBasicConstraintsCritical(true); setUseSubjectKeyIdentifier(true); setSubjectKeyIdentifierCritical(false); setUseAuthorityKeyIdentifier(true); setAuthorityKeyIdentifierCritical(false); setUseSubjectAlternativeName(true); setSubjectAlternativeNameCritical(false); setUseCRLDistributionPoint(false); setCRLDistributionPointCritical(false); setCRLDistributionPointURI(""); setUseCertificatePolicies(false); setCertificatePoliciesCritical(false); setCertificatePolicyId("2.5.29.32.0"); setType(TYPE_ENDENTITY); int[] bitlengths = {512,1024,2048,4096}; setAvailableBitLengths(bitlengths); setUseKeyUsage(true); setKeyUsage(new boolean[9]); setKeyUsage(DIGITALSIGNATURE,true); setKeyUsageCritical(true); setUseExtendedKeyUsage(true); ArrayList eku = new ArrayList(); setExtendedKeyUsage(eku); setExtendedKeyUsageCritical(false); ArrayList availablecas = new ArrayList(); availablecas.add(new Integer(ANYCA)); setAvailableCAs(availablecas); setPublisherList(new ArrayList()); } // Public Methods. public void upgrade(){ if(LATEST_VERSION != getVersion()){ // New version of the class, upgrade super.upgrade(); } } // Private fields.}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -