jdk/src/share/classes/sun/security/ec/ECParameters.java
changeset 13661 7c894680910a
parent 12436 1dc3d95b3bc9
child 13813 ca3a2b5731d0
equal deleted inserted replaced
13659:18f4e55bb34b 13661:7c894680910a
     1 /*
     1 /*
     2  * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   274 
   274 
   275     // used by ECPublicKeyImpl and ECPrivateKeyImpl
   275     // used by ECPublicKeyImpl and ECPrivateKeyImpl
   276     static AlgorithmParameters getAlgorithmParameters(ECParameterSpec spec)
   276     static AlgorithmParameters getAlgorithmParameters(ECParameterSpec spec)
   277             throws InvalidKeyException {
   277             throws InvalidKeyException {
   278         try {
   278         try {
   279             AlgorithmParameters params = AlgorithmParameters.getInstance
   279             AlgorithmParameters params =
   280                                         ("EC", ECKeyFactory.ecInternalProvider);
   280                 AlgorithmParameters.getInstance("EC", "SunEC");
   281             params.init(spec);
   281             params.init(spec);
   282             return params;
   282             return params;
   283         } catch (GeneralSecurityException e) {
   283         } catch (GeneralSecurityException e) {
   284             throw new InvalidKeyException("EC parameters error", e);
   284             throw new InvalidKeyException("EC parameters error", e);
   285         }
   285         }