当前位置: 首页>>代码示例>>Java>>正文


Java Validator.VAR_GENERIC属性代码示例

本文整理汇总了Java中sun.security.validator.Validator.VAR_GENERIC属性的典型用法代码示例。如果您正苦于以下问题:Java Validator.VAR_GENERIC属性的具体用法?Java Validator.VAR_GENERIC怎么用?Java Validator.VAR_GENERIC使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在sun.security.validator.Validator的用法示例。


在下文中一共展示了Validator.VAR_GENERIC属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getValidator

public String getValidator() {
    if (this == CLIENT) {
        return Validator.VAR_TLS_CLIENT;
    } else if (this == SERVER) {
        return Validator.VAR_TLS_SERVER;
    }
    return Validator.VAR_GENERIC;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:X509KeyManagerImpl.java

示例2: AlgorithmChecker

/**
 * Create a new {@code AlgorithmChecker} with the
 * given {@code TrustAnchor}, {@code AlgorithmConstraints},
 * {@code Timestamp}, and {@code String} variant.
 *
 * @param anchor the trust anchor selected to validate the target
 *     certificate
 * @param constraints the algorithm constraints (or null)
 * @param pkixdate The date specified by the PKIXParameters date.  If the
 *                 PKIXParameters is null, the current date is used.  This
 *                 should be null when jar files are being checked.
 * @param jarTimestamp Timestamp passed for JAR timestamp constraint
 *                     checking. Set to null if not applicable.
 * @param variant is the Validator variants of the operation. A null value
 *                passed will set it to Validator.GENERIC.
 */
public AlgorithmChecker(TrustAnchor anchor,
        AlgorithmConstraints constraints, Date pkixdate,
        Timestamp jarTimestamp, String variant) {

    if (anchor != null) {
        if (anchor.getTrustedCert() != null) {
            this.trustedPubKey = anchor.getTrustedCert().getPublicKey();
            // Check for anchor certificate restrictions
            trustedMatch = checkFingerprint(anchor.getTrustedCert());
            if (trustedMatch && debug != null) {
                debug.println("trustedMatch = true");
            }
        } else {
            this.trustedPubKey = anchor.getCAPublicKey();
        }
    } else {
        this.trustedPubKey = null;
        if (debug != null) {
            debug.println("TrustAnchor is null, trustedMatch is false.");
        }
    }

    this.prevPubKey = this.trustedPubKey;
    this.constraints = (constraints == null ? certPathDefaultConstraints :
            constraints);
    // If we are checking jar files, set pkixdate the same as the timestamp
    // for certificate checking
    this.pkixdate = (jarTimestamp != null ? jarTimestamp.getTimestamp() :
            pkixdate);
    this.jarTimestamp = jarTimestamp;
    this.variant = (variant == null ? Validator.VAR_GENERIC : variant);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:48,代码来源:AlgorithmChecker.java

示例3: extendedMsg

String extendedMsg(ConstraintsParameters cp) {
    return (cp.getCertificate() == null ? "." :
            " used with certificate: " +
                    cp.getCertificate().getSubjectX500Principal() +
            (cp.getVariant() != Validator.VAR_GENERIC ?
                    ".  Usage was " + cp.getVariant() : "."));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:7,代码来源:DisabledAlgorithmConstraints.java

示例4: ConstraintsParameters

public ConstraintsParameters(X509Certificate c, boolean match,
        Date pkixdate, Timestamp jarTime, String variant) {
    cert = c;
    trustedMatch = match;
    pkixDate = pkixdate;
    jarTimestamp = jarTime;
    this.variant = (variant == null ? Validator.VAR_GENERIC : variant);
    algorithm = null;
    algParams = null;
    publicKey = null;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:11,代码来源:ConstraintsParameters.java


注:本文中的sun.security.validator.Validator.VAR_GENERIC属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。