jdk/src/share/classes/java/security/cert/PKIXReason.java
author xuelei
Wed, 20 Jan 2010 21:38:37 +0800
changeset 4807 2521b7dcf505
parent 1238 6d1f4b722acd
child 5506 202f599c92aa
permissions -rw-r--r--
6862064: incorrect implementation of PKIXParameters.clone() Reviewed-by: weijun, mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1238
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
     1
/*
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
     2
 * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
     4
 *
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    10
 *
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    15
 * accompanied this code).
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    16
 *
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    20
 *
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    23
 * have any questions.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    24
 */
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    25
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    26
package java.security.cert;
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    27
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    28
/**
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    29
 * The <code>PKIXReason</code> enumerates the potential PKIX-specific reasons
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    30
 * that an X.509 certification path may be invalid according to the PKIX
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    31
 * (RFC 3280) standard. These reasons are in addition to those of the
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    32
 * <code>CertPathValidatorException.BasicReason</code> enumeration.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    33
 *
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    34
 * @since 1.7
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    35
 */
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    36
public enum PKIXReason implements CertPathValidatorException.Reason {
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    37
    /**
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    38
     * The certificate does not chain correctly.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    39
     */
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    40
    NAME_CHAINING,
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    41
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    42
    /**
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    43
     * The certificate's key usage is invalid.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    44
     */
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    45
    INVALID_KEY_USAGE,
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    46
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    47
    /**
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    48
     * The policy constraints have been violated.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    49
     */
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    50
    INVALID_POLICY,
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    51
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    52
    /**
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    53
     * No acceptable trust anchor found.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    54
     */
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    55
    NO_TRUST_ANCHOR,
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    56
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    57
    /**
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    58
     * The certificate contains one or more unrecognized critical
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    59
     * extensions.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    60
     */
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    61
    UNRECOGNIZED_CRIT_EXT,
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    62
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    63
    /**
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    64
     * The certificate is not a CA certificate.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    65
     */
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    66
    NOT_CA_CERT,
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    67
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    68
    /**
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    69
     * The path length constraint has been violated.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    70
     */
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    71
    PATH_TOO_LONG,
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    72
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    73
    /**
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    74
     * The name constraints have been violated.
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    75
     */
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    76
    INVALID_NAME
6d1f4b722acd 6465942: Add problem identification facility to the CertPathValidator framework
mullan
parents:
diff changeset
    77
}