equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2014, 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 |
167 throws InvalidKeyException { |
167 throws InvalidKeyException { |
168 implInit(opmode, key); |
168 implInit(opmode, key); |
169 } |
169 } |
170 |
170 |
171 // see JCE spec |
171 // see JCE spec |
|
172 @SuppressWarnings("deprecation") |
172 protected void engineInit(int opmode, Key key, |
173 protected void engineInit(int opmode, Key key, |
173 AlgorithmParameterSpec params, SecureRandom random) |
174 AlgorithmParameterSpec params, SecureRandom random) |
174 throws InvalidKeyException, InvalidAlgorithmParameterException { |
175 throws InvalidKeyException, InvalidAlgorithmParameterException { |
175 if (params != null) { |
176 if (params != null) { |
176 if (!(params instanceof TlsRsaPremasterSecretParameterSpec)) { |
177 if (!(params instanceof TlsRsaPremasterSecretParameterSpec)) { |
459 token.releaseSession(s); |
460 token.releaseSession(s); |
460 } |
461 } |
461 } |
462 } |
462 |
463 |
463 // see JCE spec |
464 // see JCE spec |
|
465 @SuppressWarnings("deprecation") |
464 protected Key engineUnwrap(byte[] wrappedKey, String algorithm, |
466 protected Key engineUnwrap(byte[] wrappedKey, String algorithm, |
465 int type) throws InvalidKeyException, NoSuchAlgorithmException { |
467 int type) throws InvalidKeyException, NoSuchAlgorithmException { |
466 |
468 |
467 boolean isTlsRsaPremasterSecret = |
469 boolean isTlsRsaPremasterSecret = |
468 algorithm.equals("TlsRsaPremasterSecret"); |
470 algorithm.equals("TlsRsaPremasterSecret"); |