src/java.base/share/classes/sun/security/ssl/RSAServerKeyExchange.java
changeset 53734 cb1642ccc732
parent 53064 103ed9569fc8
equal deleted inserted replaced
53733:b5d45c2fe8a0 53734:cb1642ccc732
     1 /*
     1 /*
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2018, 2019, 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
   304             // validate
   304             // validate
   305             //
   305             //
   306             // check constraints of RSA PublicKey
   306             // check constraints of RSA PublicKey
   307             RSAPublicKey publicKey;
   307             RSAPublicKey publicKey;
   308             try {
   308             try {
   309                 KeyFactory kf = JsseJce.getKeyFactory("RSA");
   309                 KeyFactory kf = KeyFactory.getInstance("RSA");
   310                 RSAPublicKeySpec spec = new RSAPublicKeySpec(
   310                 RSAPublicKeySpec spec = new RSAPublicKeySpec(
   311                     new BigInteger(1, skem.modulus),
   311                     new BigInteger(1, skem.modulus),
   312                     new BigInteger(1, skem.exponent));
   312                     new BigInteger(1, skem.exponent));
   313                 publicKey = (RSAPublicKey)kf.generatePublic(spec);
   313                 publicKey = (RSAPublicKey)kf.generatePublic(spec);
   314             } catch (GeneralSecurityException gse) {
   314             } catch (GeneralSecurityException gse) {