From e575924131672c3ae662bbc44435c7acea3959d5 Mon Sep 17 00:00:00 2001 From: Valerie Peng Date: Mon, 17 Apr 2023 04:47:40 +0000 Subject: [PATCH] 8305336: java.security.debug=sunpkcs11 breaks PKCS#11 configuration with slotListIndex Reviewed-by: mpowers, weijun --- .../share/classes/sun/security/pkcs11/SunPKCS11.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java index 04a1a70ed23..b5b64054c38 100644 --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2023, 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 @@ -363,8 +363,8 @@ public final class SunPKCS11 extends AuthProvider { long[] slots = p11.C_GetSlotList(false); if (showInfo) { System.out.println("All slots: " + toString(slots)); - slots = p11.C_GetSlotList(true); - System.out.println("Slots with tokens: " + toString(slots)); + System.out.println("Slots with tokens: " + + toString(p11.C_GetSlotList(true))); } if (slotID < 0) { if ((slotListIndex < 0)