jdk/src/share/classes/sun/security/x509/AlgorithmId.java
changeset 13661 7c894680910a
parent 13361 bda5c2354fc6
child 13672 604588823b5a
equal deleted inserted replaced
13659:18f4e55bb34b 13661:7c894680910a
   118     protected void decodeParams() throws IOException {
   118     protected void decodeParams() throws IOException {
   119         String algidString = algid.toString();
   119         String algidString = algid.toString();
   120         try {
   120         try {
   121             algParams = AlgorithmParameters.getInstance(algidString);
   121             algParams = AlgorithmParameters.getInstance(algidString);
   122         } catch (NoSuchAlgorithmException e) {
   122         } catch (NoSuchAlgorithmException e) {
   123             try {
   123             /*
   124                 // Try the internal EC code so that we can fully parse EC
   124              * This algorithm parameter type is not supported, so we cannot
   125                 // keys even if the provider is not registered.
   125              * parse the parameters.
   126                 // This code can go away once we have EC in the SUN provider.
   126              */
   127                 algParams = AlgorithmParameters.getInstance(algidString,
   127             algParams = null;
   128                                 sun.security.ec.ECKeyFactory.ecInternalProvider);
   128             return;
   129             } catch (NoSuchAlgorithmException ee) {
   129         }
   130                 /*
   130 
   131                  * This algorithm parameter type is not supported, so we cannot
       
   132                  * parse the parameters.
       
   133                  */
       
   134                 algParams = null;
       
   135                 return;
       
   136             }
       
   137         }
       
   138         // Decode (parse) the parameters
   131         // Decode (parse) the parameters
   139         algParams.init(params.toByteArray());
   132         algParams.init(params.toByteArray());
   140     }
   133     }
   141 
   134 
   142     /**
   135     /**