Java Code Examples for sun.security.x509.X509CertImpl#getSubjectAlternativeNames()

The following examples show how to use sun.security.x509.X509CertImpl#getSubjectAlternativeNames() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: X509Certificate.java    From jdk8u-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 2
Source File: X509Certificate.java    From j2objc with Apache License 2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 3
Source File: X509Certificate.java    From jdk8u-dev-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 4
Source File: X509Certificate.java    From jdk-1.7-annotated with Apache License 2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * <code>SubjectAltName</code> extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the <code>SubjectAltName</code> extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a <code>SubjectAltName</code>
 * extension, <code>null</code> is returned. Otherwise, a
 * <code>Collection</code> is returned with an entry representing each
 * <code>GeneralName</code> included in the extension. Each entry is a
 * <code>List</code> whose first entry is an <code>Integer</code>
 * (the name type, 0-8) and whose second entry is a <code>String</code>
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as <code>String</code>s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as <code>String</code>s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the <code>Collection</code> returned may contain more
 * than one name of the same type. Also, note that the returned
 * <code>Collection</code> is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not <code>abstract</code>
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable <code>Collection</code> of subject alternative
 * names (or <code>null</code>)
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 5
Source File: X509Certificate.java    From jdk8u-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 6
Source File: X509Certificate.java    From jdk8u_jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 5280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 7
Source File: X509Certificate.java    From openjdk-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 8
Source File: X509Certificate.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 9
Source File: X509Certificate.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 10
Source File: X509Certificate.java    From Java8CN with Apache License 2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 11
Source File: X509Certificate.java    From jdk1.8-source-analysis with Apache License 2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 12
Source File: X509Certificate.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 5280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 13
Source File: X509Certificate.java    From Bytecoder with Apache License 2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 5280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 14
Source File: X509Certificate.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 15
Source File: X509Certificate.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 5280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 16
Source File: X509Certificate.java    From JDKSourceCode1.8 with MIT License 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 17
Source File: X509Certificate.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 3280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 18
Source File: X509Certificate.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 5280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}
 
Example 19
Source File: X509Certificate.java    From dragonwell8_jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Gets an immutable collection of subject alternative names from the
 * {@code SubjectAltName} extension, (OID = 2.5.29.17).
 * <p>
 * The ASN.1 definition of the {@code SubjectAltName} extension is:
 * <pre>
 * SubjectAltName ::= GeneralNames
 *
 * GeneralNames :: = SEQUENCE SIZE (1..MAX) OF GeneralName
 *
 * GeneralName ::= CHOICE {
 *      otherName                       [0]     OtherName,
 *      rfc822Name                      [1]     IA5String,
 *      dNSName                         [2]     IA5String,
 *      x400Address                     [3]     ORAddress,
 *      directoryName                   [4]     Name,
 *      ediPartyName                    [5]     EDIPartyName,
 *      uniformResourceIdentifier       [6]     IA5String,
 *      iPAddress                       [7]     OCTET STRING,
 *      registeredID                    [8]     OBJECT IDENTIFIER}
 * </pre>
 * <p>
 * If this certificate does not contain a {@code SubjectAltName}
 * extension, {@code null} is returned. Otherwise, a
 * {@code Collection} is returned with an entry representing each
 * {@code GeneralName} included in the extension. Each entry is a
 * {@code List} whose first entry is an {@code Integer}
 * (the name type, 0-8) and whose second entry is a {@code String}
 * or a byte array (the name, in string or ASN.1 DER encoded form,
 * respectively).
 * <p>
 * <a href="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>, DNS, and URI
 * names are returned as {@code String}s,
 * using the well-established string formats for those types (subject to
 * the restrictions included in RFC 5280). IPv4 address names are
 * returned using dotted quad notation. IPv6 address names are returned
 * in the form "a1:a2:...:a8", where a1-a8 are hexadecimal values
 * representing the eight 16-bit pieces of the address. OID names are
 * returned as {@code String}s represented as a series of nonnegative
 * integers separated by periods. And directory names (distinguished names)
 * are returned in <a href="http://www.ietf.org/rfc/rfc2253.txt">
 * RFC 2253</a> string format. No standard string format is
 * defined for otherNames, X.400 names, EDI party names, or any
 * other type of names. They are returned as byte arrays
 * containing the ASN.1 DER encoded form of the name.
 * <p>
 * Note that the {@code Collection} returned may contain more
 * than one name of the same type. Also, note that the returned
 * {@code Collection} is immutable and any entries containing byte
 * arrays are cloned to protect against subsequent modifications.
 * <p>
 * This method was added to version 1.4 of the Java 2 Platform Standard
 * Edition. In order to maintain backwards compatibility with existing
 * service providers, this method is not {@code abstract}
 * and it provides a default implementation. Subclasses
 * should override this method with a correct implementation.
 *
 * @return an immutable {@code Collection} of subject alternative
 * names (or {@code null})
 * @throws CertificateParsingException if the extension cannot be decoded
 * @since 1.4
 */
public Collection<List<?>> getSubjectAlternativeNames()
    throws CertificateParsingException {
    return X509CertImpl.getSubjectAlternativeNames(this);
}