src/java.base/share/classes/sun/security/x509/GeneralName.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -114,10 +114,19 @@
             } else {
                 throw new IOException("Invalid encoding of DNS name");
             }
             break;
 
+        case GeneralNameInterface.NAME_X400:
+            if (encName.isContextSpecific() && encName.isConstructed()) {
+                encName.resetTag(DerValue.tag_IA5String);
+                name = new X400Address(encName);
+            } else {
+                throw new IOException("Invalid encoding of X400Address name");
+            }
+            break;
+
         case GeneralNameInterface.NAME_URI:
             if (encName.isContextSpecific() && !encName.isConstructed()) {
                 encName.resetTag(DerValue.tag_IA5String);
                 name = (nameConstraint ? URIName.nameConstraint(encName) :
                         new URIName(encName));