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

📄 ocspcaservicerequest.java

📁 一个免费的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.                                     * *                                                                       * *************************************************************************/ package org.ejbca.core.model.ca.caadmin.extendedcaservices;import java.io.Serializable;import java.security.PrivateKey;import java.util.ArrayList;import java.util.List;import org.apache.log4j.Logger;import org.bouncycastle.asn1.x509.X509Extensions;import org.bouncycastle.ocsp.OCSPReq;/** * Class used when requesting OCSP related services from a CA.   * * @version $Id: OCSPCAServiceRequest.java,v 1.3 2006/12/20 17:15:48 anatom Exp $ */public class OCSPCAServiceRequest extends ExtendedCAServiceRequest implements Serializable {        	public static final Logger m_log = Logger.getLogger(OCSPCAServiceRequest.class);	    private OCSPReq req = null;    private ArrayList responseList = null;    private X509Extensions exts = null;    private String sigAlg = "SHA1WithRSA";    private boolean useCACert = false;    private boolean includeChain = true;    private String privKeyProvider = "BC"; // Default for OCSP responder not using the CAs private key        // Parameters that are used when we use the CAs private key to sign responses    private PrivateKey privKey = null;    private List certificateChain = null;        /** Constructor for OCSPCAServiceRequest     */                       public OCSPCAServiceRequest(OCSPReq req, ArrayList responseList, X509Extensions exts, String sigAlg, boolean useCACert, boolean includeChain) {        this.req = req;        this.responseList = responseList;        this.exts = exts;        this.sigAlg = sigAlg;               this.useCACert = useCACert;        this.includeChain = includeChain;    }    public OCSPReq getOCSPrequest() {        return req;    }      public X509Extensions getExtensions() {    	return exts;    }    public ArrayList getResponseList() {    	return responseList;    }    public String getSigAlg() {        return sigAlg;    }    /** If true, the CA certificate should be used to sign the OCSP response.     *      * @return true if the CA cert should be used, false if the OCSPSigner cert shoudl be used.     */    public boolean useCACert() {        return useCACert;    }    /** If true, the CA certificate chain is included in the response.     *      * @return true if the CA cert chain should be included in the response.     */    public boolean includeChain() {        return includeChain;    }    /** Used when the CA passes a certificate chain for use when signing with the CAs signature key     *      * @return List with certificates or null, if another chain should be used     */	public List getCertificateChain() {		return certificateChain;	}	public void setCertificateChain(List certificatechain) {		this.certificateChain = certificatechain;	}    /** Used when the CA passes a private key (reference) for use when signing with the CAs signature key     *      * @return private key or null, if another private key should be used     */	public PrivateKey getPrivKey() {		return privKey;	}	public void setPrivKey(PrivateKey privKey) {		this.privKey = privKey;	}	public String getPrivKeyProvider() {		return privKeyProvider;	}	public void setPrivKeyProvider(String privKeyProvider) {		this.privKeyProvider = privKeyProvider;	}}

⌨️ 快捷键说明

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