src/java.base/share/classes/java/security/KeyStoreSpi.java
changeset 48700 953eca1167b6
parent 47216 71c04702a3d5
child 58242 94bb65cb37d3
equal deleted inserted replaced
48699:f4e628259d1b 48700:953eca1167b6
     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