2619N/A * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This class implements the RFC822Name as required by the GeneralNames 0N/A * @author Amit Kapoor 0N/A * @author Hemma Prafullchandra 0N/A * @see GeneralNameInterface 0N/A * Create the RFC822Name object from the passed encoded Der value. 0N/A * @param derValue the encoded DER RFC822Name. 0N/A * @exception IOException on error. 0N/A * Create the RFC822Name object with the specified name. 0N/A * @param name the RFC822Name. 0N/A * @throws IOException on invalid input name 0N/A * Parse an RFC822Name string to see if it is a valid 0N/A * addr-spec according to IETF RFC822 and RFC2459: 0N/A * [local-part@]domain 0N/A * local-part@ could be empty for an RFC822Name NameConstraint, 0N/A * but the domain at least must be non-empty. Case is not 0N/A * @param name the RFC822Name string 0N/A * @throws IOException if name is not valid 0N/A // See if domain is a valid domain name 0N/A //An RFC822 NameConstraint could start with a ., although 0N/A * Return the type of the GeneralName. 0N/A * Return the actual name value of the GeneralName. 0N/A * Encode the RFC822 name into the DerOutputStream. 0N/A * @param out the DER stream to encode the RFC822Name to. 0N/A * @exception IOException on encoding errors. 0N/A * Convert the name into user readable string. 0N/A * Compares this name with another, for equality. 0N/A * @return true iff the names are equivalent 0N/A * according to RFC2459. 0N/A // RFC2459 mandates that these names are 0N/A // not case-sensitive 0N/A * Returns the hash code value for this object. 0N/A * @return a hash code value for this object. 0N/A * Return constraint type:<ul> 0N/A * <li>NAME_DIFF_TYPE = -1: input name is different type from name (i.e. does not constrain) 0N/A * <li>NAME_MATCH = 0: input name matches name 0N/A * <li>NAME_NARROWS = 1: input name narrows name 0N/A * <li>NAME_WIDENS = 2: input name widens name 0N/A * <li>NAME_SAME_TYPE = 3: input name does not match or narrow name, but is same type 0N/A * </ul>. These results are used in checking NameConstraints during 0N/A * certification path verification. 0N/A * [RFC2459] When the subjectAltName extension contains an Internet mail address, 0N/A * the address MUST be included as an rfc822Name. The format of an 0N/A * rfc822Name is an "addr-spec" as defined in RFC 822 [RFC 822]. An 0N/A * addr-spec has the form "local-part@domain". Note that an addr-spec 0N/A * has no phrase (such as a common name) before it, has no comment (text 0N/A * surrounded in parentheses) after it, and is not surrounded by "<" and 0N/A * ">". Note that while upper and lower case letters are allowed in an 0N/A * RFC 822 addr-spec, no significance is attached to the case. 0N/A * @param inputName to be checked for being constrained 0N/A * @returns constraint type above 0N/A * @throws UnsupportedOperationException if name is not exact match, but narrowing and widening are 0N/A * not supported for this name type. 0N/A //RFC2459 specifies that case is not significant in RFC822Names 0N/A /* if both names contain @, then they had to match exactly */ 0N/A /* if thisName contains @, then they had to match exactly */ 0N/A * Return subtree depth of this name for purposes of determining 0N/A * NameConstraints minimum and maximum bounds. 0N/A * @returns distance of name from root 0N/A * @throws UnsupportedOperationException if not supported for this name type 0N/A /* strip off name@ portion */ 0N/A /* count dots in dnsname, adding one if dnsname preceded by @ */