src/java.base/share/classes/java/security/KeyStore.java
changeset 48700 953eca1167b6
parent 47216 71c04702a3d5
child 51131 9502e3b9d415
equal deleted inserted replaced
48699:f4e628259d1b 48700:953eca1167b6
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 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
  1800                 dataStream.reset(); // prepare the stream for the next probe
  1800                 dataStream.reset(); // prepare the stream for the next probe
  1801             }
  1801             }
  1802 
  1802 
  1803             // Load the keystore data
  1803             // Load the keystore data
  1804             if (keystore != null) {
  1804             if (keystore != null) {
       
  1805                 dataStream.reset(); // prepare the stream for loading
  1805                 if (hasPassword) {
  1806                 if (hasPassword) {
  1806                     dataStream.reset(); // prepare the stream for loading
       
  1807                     keystore.load(dataStream, password);
  1807                     keystore.load(dataStream, password);
  1808                 } else {
  1808                 } else {
  1809                     keystore.load(param);
  1809                     keystore.keyStoreSpi.engineLoad(dataStream, param);
  1810                 }
  1810                 }
  1811                 return keystore;
  1811                 return keystore;
  1812             }
  1812             }
  1813         }
  1813         }
  1814 
  1814