⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cacertificateprofile.java

📁 JAVA做的J2EE下CA认证系统 基于EJB开发
💻 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.                                     * *                                                                       * *************************************************************************/ /* * CACertificateProfile.java * * Created on den 29 juli 2002, 22:08 */package se.anatom.ejbca.ca.store.certificateprofiles;import java.util.ArrayList;/** * CACertificateProfile is a class defining the fixed characteristics of a CA certificate profile. * * @version $Id: CACertificateProfile.java,v 1.15 2005/02/14 08:04:05 anatom Exp $ */public class CACertificateProfile extends CertificateProfile{    // Public Constants    public static final String CERTIFICATEPROFILENAME =  "SUBCA";    // Public Methods    /**     * Creates a certificate with the characteristics of an end user.     */    public CACertificateProfile() {      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_SUBCA);      int[] bitlengths = {512,1024,2048,4096};      setAvailableBitLengths(bitlengths);      setUseKeyUsage(true);      setKeyUsage(new boolean[9]);      setKeyUsage(DIGITALSIGNATURE,true);      setKeyUsage(KEYCERTSIGN,true);      setKeyUsage(CRLSIGN,true);      setKeyUsageCritical(true);      setUseExtendedKeyUsage(false);      setExtendedKeyUsage(new ArrayList());      setExtendedKeyUsageCritical(false);            ArrayList availablecas = new ArrayList();      availablecas.add(new Integer(ANYCA));      setAvailableCAs(availablecas);            setPublisherList(new ArrayList());    }    // Public Methods.    public void upgrade(){      super.upgrade(); 	      if(LATEST_VERSION != getVersion()){        // New version of the class, upgrade		              }     }    // Private fields.}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -