equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2009, 2018, 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 |
125 byte[] encodedParams = // DER OID |
125 byte[] encodedParams = // DER OID |
126 ECUtil.encodeECParameterSpec(null, privateKey.getParams()); |
126 ECUtil.encodeECParameterSpec(null, privateKey.getParams()); |
127 |
127 |
128 try { |
128 try { |
129 |
129 |
130 return deriveKey(s, publicValue, encodedParams); |
130 byte[] result = deriveKey(s, publicValue, encodedParams); |
|
131 publicValue = null; |
|
132 return result; |
131 |
133 |
132 } catch (GeneralSecurityException e) { |
134 } catch (GeneralSecurityException e) { |
133 throw new ProviderException("Could not derive key", e); |
135 throw new ProviderException("Could not derive key", e); |
134 } |
136 } |
135 |
137 |