equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 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 |
393 * @since 1.5 |
393 * @since 1.5 |
394 */ |
394 */ |
395 public void engineLoad(KeyStore.LoadStoreParameter param) |
395 public void engineLoad(KeyStore.LoadStoreParameter param) |
396 throws IOException, NoSuchAlgorithmException, |
396 throws IOException, NoSuchAlgorithmException, |
397 CertificateException { |
397 CertificateException { |
|
398 engineLoad(null, param); |
|
399 } |
|
400 |
|
401 void engineLoad(InputStream stream, KeyStore.LoadStoreParameter param) |
|
402 throws IOException, NoSuchAlgorithmException, |
|
403 CertificateException { |
398 |
404 |
399 if (param == null) { |
405 if (param == null) { |
400 engineLoad((InputStream)null, (char[])null); |
406 engineLoad((InputStream)null, (char[])null); |
401 return; |
407 return; |
402 } |
408 } |
423 } |
429 } |
424 } else { |
430 } else { |
425 throw new NoSuchAlgorithmException("ProtectionParameter must" |
431 throw new NoSuchAlgorithmException("ProtectionParameter must" |
426 + " be PasswordProtection or CallbackHandlerProtection"); |
432 + " be PasswordProtection or CallbackHandlerProtection"); |
427 } |
433 } |
428 engineLoad(null, password); |
434 engineLoad(stream, password); |
429 return; |
435 return; |
430 } |
436 } |
431 |
437 |
432 /** |
438 /** |
433 * Gets a {@code KeyStore.Entry} for the specified alias |
439 * Gets a {@code KeyStore.Entry} for the specified alias |