< prev index next >

src/macosx/classes/apple/security/KeychainStore.java

Print this page
rev 13649 : 8218553: Enhance keystore load debug output
Reviewed-by: weijun

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -100,10 +100,12 @@
      * Constnats used in PBE decryption.
      */
     private static final int iterationCount = 1024;
     private static final int SALT_LEN = 20;
 
+    private static final Debug debug = Debug.getInstance("keystore");
+
     static {
         AccessController.doPrivileged(
             new PrivilegedAction<Void>() {
                 public Void run() {
                     System.loadLibrary("osx");

@@ -769,10 +771,14 @@
                 }
             }
 
             entries.clear();
             _scanKeychain();
+            if (debug != null) {
+                debug.println("KeychainStore load entry count: " +
+                        entries.size());
+            }
         }
     }
 
     private native void _scanKeychain();
 
< prev index next >