jdk/src/share/classes/sun/security/ssl/DHCrypt.java
changeset 51 6fe31bc95bbc
parent 2 90ce3da70b43
child 715 f16baef3a20e
equal deleted inserted replaced
50:a437b3f9d7f4 51:6fe31bc95bbc
   130             DHParameterSpec params = dhKey.getParams();
   130             DHParameterSpec params = dhKey.getParams();
   131             return new DHPublicKeySpec(dhKey.getY(), params.getP(), params.getG());
   131             return new DHPublicKeySpec(dhKey.getY(), params.getP(), params.getG());
   132         }
   132         }
   133         try {
   133         try {
   134             KeyFactory factory = JsseJce.getKeyFactory("DH");
   134             KeyFactory factory = JsseJce.getKeyFactory("DH");
   135             return (DHPublicKeySpec)factory.getKeySpec
   135             return factory.getKeySpec(key, DHPublicKeySpec.class);
   136                                             (key, DHPublicKeySpec.class);
       
   137         } catch (Exception e) {
   136         } catch (Exception e) {
   138             throw new RuntimeException(e);
   137             throw new RuntimeException(e);
   139         }
   138         }
   140     }
   139     }
   141 
   140