📄 pkixparameters.java
字号:
* Returns an immutable list of cert stores. This method never returns * null. * * @return The list of cert stores. */ public List getCertStores() { return Collections.unmodifiableList(certStores); } /** * Set the cert stores. If the argument is null the list of cert * stores will be empty. * * @param certStores The cert stores. */ public void setCertStores(List certStores) { this.certStores.clear(); if (certStores == null) return; for (Iterator i = certStores.iterator(); i.hasNext(); ) { this.certStores.add((CertStore) i.next()); } } /** * Returns the value of the <i>revocation enabled</i> flag. The default * value for this flag is <code>true</code>. * * @return The <i>revocation enabled</i> flag. */ public boolean isRevocationEnabled() { return revocationEnabled; } /** * Sets the value of the <i>revocation enabled</i> flag. * * @param value The new value. */ public void setRevocationEnabled(boolean value) { revocationEnabled = value; } /** * Returns the value of the <i>explicit policy required</i> flag. The * default value of this flag is <code>false</code>. * * @return The <i>explicit policy required</i> flag. */ public boolean isExplicitPolicyRequired() { return exPolicyRequired; } /** * Sets the value of the <i>explicit policy required</i> flag. * * @param value The new value. */ public void setExplicitPolicyRequired(boolean value) { exPolicyRequired = value; } /** * Returns the value of the <i>policy mapping inhibited</i> flag. The * default value of this flag is <code>false</code>. * * @return The <i>policy mapping inhibited</i> flag. */ public boolean isPolicyMappingInhibited() { return policyMappingInhibited; } /** * Sets the value of the <i>policy mapping inhibited</i> flag. * * @param value The new value. */ public void setPolicyMappingInhibited(boolean value) { policyMappingInhibited = value; } /** * Returns the value of the <i>any policy inhibited</i> flag. The * default value of this flag is <code>false</code>. * * @return The <i>any policy inhibited</i> flag. */ public boolean isAnyPolicyInhibited() { return anyPolicyInhibited; } /** * Sets the value of the <i>any policy inhibited</i> flag. * * @param value The new value. */ public void setAnyPolicyInhibited(boolean value) { anyPolicyInhibited = value; } /** * Returns the value of the <i>policy qualifiers enabled</i> flag. The * default value of this flag is <code>true</code>. * * @return The <i>policy qualifiers enabled</i> flag. */ public boolean getPolicyQualifiersRejected() { return policyQualRejected; } /** * Sets the value of the <i>policy qualifiers enabled</i> flag. * * @param value The new value. */ public void setPolicyQualifiersRejected(boolean value) { policyQualRejected = value; } /** * Returns the date for which the certificate path should be * validated, or null if the current time should be used. The date * object is copied to prevent subsequent modification. * * @return The date, or null if not set. */ public Date getDate() { return date != null ? (Date) date.clone() : null; } /** * Sets the date for which the certificate path should be validated, * or null if the current time should be used. * * @param date The new date, or null. */ public void setDate(Date date) { if (date != null) this.date = (Date) date.clone(); else this.date = null; } /** * Add a certificate path checker. * * @param checker The certificate path checker to add. */ public void addCertPathChecker(PKIXCertPathChecker checker) { if (checker != null) pathCheckers.add(checker); } /** * Returns an immutable list of all certificate path checkers. * * @return An immutable list of all certificate path checkers. */ public List getCertPathCheckers() { return Collections.unmodifiableList(pathCheckers); } /** * Sets the certificate path checkers. If the argument is null, the * list of checkers will merely be cleared. * * @param pathCheckers The new list of certificate path checkers. * @throws ClassCastException If any element of <i>pathCheckers</i> is * not a {@link PKIXCertPathChecker}. */ public void setCertPathCheckers(List pathCheckers) { this.pathCheckers.clear(); if (pathCheckers == null) return; for (Iterator i = pathCheckers.iterator(); i.hasNext(); ) { this.pathCheckers.add((PKIXCertPathChecker) i.next()); } } /** * Returns the signature algorithm provider, or null if not set. * * @return The signature algorithm provider, or null if not set. */ public String getSigProvider() { return sigProvider; } /** * Sets the signature algorithm provider, or null if there is no * preferred provider. * * @param sigProvider The signature provider name. */ public void setSigProvider(String sigProvider) { this.sigProvider = sigProvider; } /** * Returns the constraints placed on the target certificate, or null * if there are none. The target constraints are copied to prevent * subsequent modification. * * @return The target constraints, or null. */ public CertSelector getTargetCertConstraints() { return targetConstraints != null ? (CertSelector) targetConstraints.clone() : null; } /** * Sets the constraints placed on the target certificate. * * @param targetConstraints The target constraints. */ public void setTargetCertConstraints(CertSelector targetConstraints) { this.targetConstraints = targetConstraints != null ? (CertSelector) targetConstraints.clone() : null; } /** * Returns a copy of these parameters. * * @return The copy. */ public Object clone() { return new PKIXParameters(this); } /** * Returns a printable representation of these parameters. * * @return A printable representation of these parameters. */ public String toString() { return "[ Trust Anchors: " + trustAnchors + "; Initial Policy OIDs=" + (initPolicies != null ? initPolicies.toString() : "any") + "; Validity Date=" + date + "; Signature Provider=" + sigProvider + "; Default Revocation Enabled=" + revocationEnabled + "; Explicit Policy Required=" + exPolicyRequired + "; Policy Mapping Inhibited=" + policyMappingInhibited + "; Any Policy Inhibited=" + anyPolicyInhibited + "; Policy Qualifiers Rejected=" + policyQualRejected + "; Target Cert Contstraints=" + targetConstraints + "; Certification Path Checkers=" + pathCheckers + "; CertStores=" + certStores + " ]"; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -