diff --git a/test/jdk/com/sun/security/auth/callback/TextCallbackHandler/Default.java b/test/jdk/com/sun/security/auth/callback/TextCallbackHandler/Default.java index 1fb3350c8f7..5b7b075250e 100644 --- a/test/jdk/com/sun/security/auth/callback/TextCallbackHandler/Default.java +++ b/test/jdk/com/sun/security/auth/callback/TextCallbackHandler/Default.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, 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 @@ -23,7 +23,7 @@ /* * @test - * @library /test/lib /java/security/testlibrary + * @library /test/lib * @bug 4470717 * @summary fix default handling and other misc * @run main/othervm Default @@ -34,6 +34,7 @@ import javax.security.auth.callback.*; import java.io.*; +import jdk.test.lib.security.HumanInputStream; public class Default { public static void main(String args[]) throws Exception { diff --git a/test/jdk/java/security/KeyFactory/Failover.java b/test/jdk/java/security/KeyFactory/Failover.java index 7107ef1ad02..3fd69a3cbc3 100644 --- a/test/jdk/java/security/KeyFactory/Failover.java +++ b/test/jdk/java/security/KeyFactory/Failover.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ -24,7 +24,7 @@ /** * @test * @bug 4894125 7054918 8130181 - * @library ../testlibrary /test/lib + * @library /test/lib * @summary test that failover for KeyFactory works * @author Andreas Sterbenz */ @@ -32,8 +32,8 @@ import java.util.*; import java.security.*; -import java.security.interfaces.*; import java.security.spec.*; +import jdk.test.lib.security.ProvidersSnapshot; import jdk.test.lib.security.SecurityUtils; public class Failover { diff --git a/test/jdk/java/security/KeyPairGenerator/Failover.java b/test/jdk/java/security/KeyPairGenerator/Failover.java index 7fc8da8ccfc..1bc2bfee2c8 100644 --- a/test/jdk/java/security/KeyPairGenerator/Failover.java +++ b/test/jdk/java/security/KeyPairGenerator/Failover.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ -24,7 +24,7 @@ /** * @test * @bug 4894125 7054918 8130181 - * @library ../testlibrary + * @library /test/lib * @summary test that failover for KeyPairGenerator works * @author Andreas Sterbenz */ @@ -32,8 +32,8 @@ import java.util.*; import java.security.*; -import java.security.interfaces.*; import java.security.spec.*; +import jdk.test.lib.security.ProvidersSnapshot; public class Failover { diff --git a/test/jdk/java/security/Provider/ChangeProviders.java b/test/jdk/java/security/Provider/ChangeProviders.java index 2c699cd70b1..7c408d70fb6 100644 --- a/test/jdk/java/security/Provider/ChangeProviders.java +++ b/test/jdk/java/security/Provider/ChangeProviders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ -24,14 +24,13 @@ /* * @test * @bug 4856968 7054918 8130181 - * @library ../testlibrary + * @library /test/lib * @summary make sure add/insert/removeProvider() work correctly * @author Andreas Sterbenz */ -import java.util.*; - import java.security.*; +import jdk.test.lib.security.ProvidersSnapshot; public class ChangeProviders extends Provider { diff --git a/test/jdk/java/security/Provider/GetInstance.java b/test/jdk/java/security/Provider/GetInstance.java index d0d6417f02b..f0e1a149f5c 100644 --- a/test/jdk/java/security/Provider/GetInstance.java +++ b/test/jdk/java/security/Provider/GetInstance.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ -24,7 +24,7 @@ /* * @test * @bug 4856968 7054918 8130181 - * @library ../testlibrary + * @library /test/lib * @summary make sure getInstance() works correctly, including failover * and delayed provider selection for Signatures * @author Andreas Sterbenz @@ -34,6 +34,7 @@ import java.security.*; import java.security.cert.*; +import jdk.test.lib.security.ProvidersSnapshot; public class GetInstance { diff --git a/test/jdk/java/security/Provider/GetServiceRace.java b/test/jdk/java/security/Provider/GetServiceRace.java index 7f3f6b56ff7..427d555d375 100644 --- a/test/jdk/java/security/Provider/GetServiceRace.java +++ b/test/jdk/java/security/Provider/GetServiceRace.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, 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 @@ -24,7 +24,6 @@ /* * @test * @bug 8231387 - * @library ../testlibrary * @summary make sure getService() avoids a race * @author Tianmin Shi */ diff --git a/test/jdk/java/security/Provider/RemoveProvider.java b/test/jdk/java/security/Provider/RemoveProvider.java index 05ab5eb0549..9983aa59b2a 100644 --- a/test/jdk/java/security/Provider/RemoveProvider.java +++ b/test/jdk/java/security/Provider/RemoveProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, 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 @@ -24,13 +24,14 @@ /* * @test * @bug 4190873 7054918 8130181 - * @library ../testlibrary + * @library /test/lib * @summary Make sure provider instance can be removed from list of registered * providers, and "entrySet", "keySet", and "values" methods don't loop * indefinitely. */ import java.security.*; import java.util.*; +import jdk.test.lib.security.ProvidersSnapshot; public class RemoveProvider { diff --git a/test/jdk/java/security/Security/NoInstalledProviders.java b/test/jdk/java/security/Security/NoInstalledProviders.java index 551f1896ecb..1e701f9a6e1 100644 --- a/test/jdk/java/security/Security/NoInstalledProviders.java +++ b/test/jdk/java/security/Security/NoInstalledProviders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2025, 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 @@ -24,12 +24,13 @@ /* * @test * @bug 4273454 7054918 7052537 - * @library ../testlibrary + * @library /test/lib * @summary Make sure getProviders(filter) doesn't throw NPE * @run main/othervm NoInstalledProviders */ import java.security.*; +import jdk.test.lib.security.ProvidersSnapshot; public class NoInstalledProviders { diff --git a/test/jdk/java/security/Security/SynchronizedAccess.java b/test/jdk/java/security/Security/SynchronizedAccess.java index 28019213b3c..c1443529fe7 100644 --- a/test/jdk/java/security/Security/SynchronizedAccess.java +++ b/test/jdk/java/security/Security/SynchronizedAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2025, 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 @@ -24,13 +24,14 @@ /* * @test * @bug 4162583 7054918 8130181 8028127 - * @library /test/lib ../testlibrary + * @library /test/lib * @summary Make sure Provider api implementations are synchronized properly */ import java.security.*; import jdk.test.lib.Asserts; +import jdk.test.lib.security.ProvidersSnapshot; public class SynchronizedAccess { diff --git a/test/jdk/java/security/Security/removing/RemoveProviders.java b/test/jdk/java/security/Security/removing/RemoveProviders.java index 0d9f6b207c5..38edf983fb0 100644 --- a/test/jdk/java/security/Security/removing/RemoveProviders.java +++ b/test/jdk/java/security/Security/removing/RemoveProviders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ -24,7 +24,7 @@ /** * @test * @bug 4963416 7054918 - * @library ../../testlibrary + * @library /test/lib * @summary make sure removeProvider() always works correctly * @author Andreas Sterbenz */ @@ -32,6 +32,7 @@ import java.util.*; import java.security.*; +import jdk.test.lib.security.ProvidersSnapshot; public class RemoveProviders { diff --git a/test/jdk/java/security/cert/CertPathValidator/OCSP/GetAndPostTests.java b/test/jdk/java/security/cert/CertPathValidator/OCSP/GetAndPostTests.java index 478e94572bc..d29ca878cd3 100644 --- a/test/jdk/java/security/cert/CertPathValidator/OCSP/GetAndPostTests.java +++ b/test/jdk/java/security/cert/CertPathValidator/OCSP/GetAndPostTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, 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 @@ -25,8 +25,7 @@ * @test * @bug 8179503 8328638 * @summary Java should support GET OCSP calls - * @library /javax/net/ssl/templates /java/security/testlibrary - * @build SimpleOCSPServer + * @library /javax/net/ssl/templates /test/lib * @modules java.base/sun.security.util * java.base/sun.security.provider.certpath * java.base/sun.security.x509 @@ -64,7 +63,7 @@ import java.util.Set; import java.util.concurrent.TimeUnit; -import sun.security.testlibrary.SimpleOCSPServer; +import jdk.test.lib.security.SimpleOCSPServer; import sun.security.util.DerOutputStream; import sun.security.util.DerValue; import sun.security.util.ObjectIdentifier; diff --git a/test/jdk/java/security/cert/CertPathValidator/OCSP/OCSPTimeout.java b/test/jdk/java/security/cert/CertPathValidator/OCSP/OCSPTimeout.java index dfd7dcdc81e..342617a5fa9 100644 --- a/test/jdk/java/security/cert/CertPathValidator/OCSP/OCSPTimeout.java +++ b/test/jdk/java/security/cert/CertPathValidator/OCSP/OCSPTimeout.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, 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 @@ -34,8 +34,7 @@ * @modules java.base/sun.security.x509 * java.base/sun.security.provider.certpath * java.base/sun.security.util - * @library ../../../../../java/security/testlibrary - * @build CertificateBuilder SimpleOCSPServer + * @library /test/lib * @run main/othervm -Djava.security.debug=certpath OCSPTimeout 1000 true * @run main/othervm -Djava.security.debug=certpath * -Dcom.sun.security.ocsp.readtimeout=5 OCSPTimeout 1000 true @@ -59,8 +58,8 @@ import java.security.cert.*; import java.util.concurrent.TimeUnit; -import sun.security.testlibrary.SimpleOCSPServer; -import sun.security.testlibrary.CertificateBuilder; +import jdk.test.lib.security.SimpleOCSPServer; +import jdk.test.lib.security.CertificateBuilder; import static java.security.cert.PKIXRevocationChecker.Option.*; @@ -84,7 +83,7 @@ public class OCSPTimeout { public static void main(String[] args) throws Exception { int ocspTimeout = 15000; - boolean expected = false; + boolean expected; createPKI(); @@ -195,7 +194,6 @@ private static void createPKI() throws Exception { rootOcsp = new SimpleOCSPServer(rootKeystore, passwd, ROOT_ALIAS, null); rootOcsp.enableLog(debug); rootOcsp.setNextUpdateInterval(3600); - rootOcsp.setDisableContentLength(true); rootOcsp.start(); // Wait 60 seconds for server ready diff --git a/test/jdk/java/security/cert/CertPathValidator/crlDP/CheckAllCRLs.java b/test/jdk/java/security/cert/CertPathValidator/crlDP/CheckAllCRLs.java index 71627dbc64f..88ef85fe6ca 100644 --- a/test/jdk/java/security/cert/CertPathValidator/crlDP/CheckAllCRLs.java +++ b/test/jdk/java/security/cert/CertPathValidator/crlDP/CheckAllCRLs.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, 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 @@ -26,7 +26,6 @@ import java.math.BigInteger; import java.security.KeyPair; import java.security.KeyPairGenerator; -import java.security.PublicKey; import java.security.cert.CertificateFactory; import java.security.cert.CertPath; import java.security.cert.CertPathValidator; @@ -54,7 +53,7 @@ import sun.security.x509.X509CRLEntryImpl; import sun.security.x509.X509CRLImpl; import static sun.security.x509.X509CRLImpl.TBSCertList; -import sun.security.testlibrary.CertificateBuilder; +import jdk.test.lib.security.CertificateBuilder; /* * @test @@ -65,8 +64,7 @@ * fresh or stale. * @modules java.base/sun.security.x509 * java.base/sun.security.util - * @library ../../../../../java/security/testlibrary - * @build CertificateBuilder CheckAllCRLs + * @library /test/lib * @run main/othervm -Dcom.sun.security.enableCRLDP=true CheckAllCRLs */ public class CheckAllCRLs { diff --git a/test/jdk/java/security/cert/CertPathValidator/trustAnchor/ValWithAnchorByName.java b/test/jdk/java/security/cert/CertPathValidator/trustAnchor/ValWithAnchorByName.java index 29abfb9f551..c57abdf243d 100644 --- a/test/jdk/java/security/cert/CertPathValidator/trustAnchor/ValWithAnchorByName.java +++ b/test/jdk/java/security/cert/CertPathValidator/trustAnchor/ValWithAnchorByName.java @@ -52,8 +52,8 @@ public class ValWithAnchorByName { // The following certificates and OCSP responses were captured from // a test run that used certificates and responses generated by - // sun.security.testlibrary.CertificateBuilder and - // sun.security.testlibrary.SimpleOCSPServer. + // jdk.test.lib.security.CertificateBuilder and + // jdk.test.lib.security.SimpleOCSPServer. // Subject: CN=SSLCertificate, O=SomeCompany // Issuer: CN=Intermediate CA Cert, O=SomeCompany diff --git a/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecException.java b/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecException.java index f55f1eea42c..5385beb9999 100644 --- a/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecException.java +++ b/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ -24,19 +24,20 @@ /** * @test * @bug 4508341 7055362 - * @library ../../../java/security/testlibrary + * @library /test/lib * @summary Test the error conditions of * EncryptedPrivateKeyInfo.getKeySpec(...) methods. * @author Valerie Peng * @run main/othervm -DcipherAlg=PBEWithMD5AndDES GetKeySpecException * @run main/othervm -DcipherAlg=PBEWithSHA1AndDESede GetKeySpecException */ + import java.security.*; -import java.util.Arrays; import java.util.Vector; import java.security.spec.*; import javax.crypto.*; import javax.crypto.spec.*; +import jdk.test.lib.security.ProvidersSnapshot; public class GetKeySpecException { private static String cipherAlg; diff --git a/test/jdk/javax/crypto/JceSecurity/SunJCE_BC_LoadOrdering.java b/test/jdk/javax/crypto/JceSecurity/SunJCE_BC_LoadOrdering.java index 50a1c188d0f..82ac4e70899 100644 --- a/test/jdk/javax/crypto/JceSecurity/SunJCE_BC_LoadOrdering.java +++ b/test/jdk/javax/crypto/JceSecurity/SunJCE_BC_LoadOrdering.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, 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 @@ -24,7 +24,7 @@ /* * @test * @bug 6377058 7055362 - * @library ../../../java/security/testlibrary + * @library /test/lib * @summary SunJCE depends on sun.security.provider.SignatureImpl * behaviour, BC can't load into 1st slot. * @author Brad R. Wetmore @@ -33,7 +33,7 @@ import java.security.*; import javax.crypto.*; -import java.io.*; +import jdk.test.lib.security.ProvidersSnapshot; public class SunJCE_BC_LoadOrdering { diff --git a/test/jdk/javax/net/ssl/Stapling/HttpsUrlConnClient.java b/test/jdk/javax/net/ssl/Stapling/HttpsUrlConnClient.java index 72a68cdddb0..b9829621d68 100644 --- a/test/jdk/javax/net/ssl/Stapling/HttpsUrlConnClient.java +++ b/test/jdk/javax/net/ssl/Stapling/HttpsUrlConnClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 @@ -28,8 +28,7 @@ * @test * @bug 8046321 8153829 * @summary OCSP Stapling for TLS - * @library ../../../../java/security/testlibrary - * @build CertificateBuilder SimpleOCSPServer + * @library /test/lib * @run main/othervm HttpsUrlConnClient RSA SHA256withRSA * @run main/othervm HttpsUrlConnClient RSASSA-PSS RSASSA-PSS */ @@ -59,8 +58,8 @@ import java.util.*; import java.util.concurrent.TimeUnit; -import sun.security.testlibrary.SimpleOCSPServer; -import sun.security.testlibrary.CertificateBuilder; +import jdk.test.lib.security.SimpleOCSPServer; +import jdk.test.lib.security.CertificateBuilder; public class HttpsUrlConnClient { diff --git a/test/jdk/javax/net/ssl/Stapling/SSLEngineWithStapling.java b/test/jdk/javax/net/ssl/Stapling/SSLEngineWithStapling.java index ec869f83431..506e7b00e6d 100644 --- a/test/jdk/javax/net/ssl/Stapling/SSLEngineWithStapling.java +++ b/test/jdk/javax/net/ssl/Stapling/SSLEngineWithStapling.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 @@ -28,8 +28,7 @@ * @test * @bug 8046321 8153829 * @summary OCSP Stapling for TLS - * @library ../../../../java/security/testlibrary - * @build CertificateBuilder SimpleOCSPServer + * @library /test/lib * @run main/othervm SSLEngineWithStapling */ @@ -87,8 +86,8 @@ import java.util.Map; import java.util.concurrent.TimeUnit; -import sun.security.testlibrary.SimpleOCSPServer; -import sun.security.testlibrary.CertificateBuilder; +import jdk.test.lib.security.SimpleOCSPServer; +import jdk.test.lib.security.CertificateBuilder; public class SSLEngineWithStapling { diff --git a/test/jdk/javax/net/ssl/Stapling/SSLSocketWithStapling.java b/test/jdk/javax/net/ssl/Stapling/SSLSocketWithStapling.java index 7e1473c2828..30f5e589889 100644 --- a/test/jdk/javax/net/ssl/Stapling/SSLSocketWithStapling.java +++ b/test/jdk/javax/net/ssl/Stapling/SSLSocketWithStapling.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 @@ -28,8 +28,7 @@ * @test * @bug 8046321 8153829 * @summary OCSP Stapling for TLS - * @library ../../../../java/security/testlibrary - * @build CertificateBuilder SimpleOCSPServer + * @library /test/lib * @run main/othervm SSLSocketWithStapling */ @@ -63,8 +62,8 @@ import java.util.HashMap; import java.util.concurrent.TimeUnit; -import sun.security.testlibrary.SimpleOCSPServer; -import sun.security.testlibrary.CertificateBuilder; +import jdk.test.lib.security.SimpleOCSPServer; +import jdk.test.lib.security.CertificateBuilder; public class SSLSocketWithStapling { diff --git a/test/jdk/javax/net/ssl/Stapling/StapleEnableProps.java b/test/jdk/javax/net/ssl/Stapling/StapleEnableProps.java index 14651cf3db9..90b01d19c03 100644 --- a/test/jdk/javax/net/ssl/Stapling/StapleEnableProps.java +++ b/test/jdk/javax/net/ssl/Stapling/StapleEnableProps.java @@ -28,8 +28,7 @@ * @test * @bug 8145854 8153829 * @summary SSLContextImpl.statusResponseManager should be generated if required - * @library ../../../../java/security/testlibrary - * @build CertificateBuilder SimpleOCSPServer + * @library /test/lib * @run main/othervm StapleEnableProps */ @@ -49,8 +48,8 @@ import java.util.Objects; import java.util.concurrent.TimeUnit; -import sun.security.testlibrary.SimpleOCSPServer; -import sun.security.testlibrary.CertificateBuilder; +import jdk.test.lib.security.SimpleOCSPServer; +import jdk.test.lib.security.CertificateBuilder; public class StapleEnableProps { diff --git a/test/jdk/sun/security/ec/TestEC.java b/test/jdk/sun/security/ec/TestEC.java index dacb67ce892..3720df03e1f 100644 --- a/test/jdk/sun/security/ec/TestEC.java +++ b/test/jdk/sun/security/ec/TestEC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2025, 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 @@ -34,7 +34,6 @@ * @library ../pkcs11 * @library ../pkcs11/ec * @library ../pkcs11/sslecc - * @library ../../../java/security/testlibrary * @library ../../../javax/net/ssl/TLSCommon * @modules jdk.crypto.cryptoki/sun.security.pkcs11.wrapper * @run main/othervm -Djdk.tls.namedGroups="secp256r1" TestEC @@ -45,6 +44,7 @@ import java.security.NoSuchProviderException; import java.security.Provider; import java.security.Security; +import jdk.test.lib.security.ProvidersSnapshot; /* * Leverage the collection of EC tests used by PKCS11 diff --git a/test/jdk/sun/security/pkcs11/ec/ReadCertificates.java b/test/jdk/sun/security/pkcs11/ec/ReadCertificates.java index 4b4a6a20a4a..e0700a45553 100644 --- a/test/jdk/sun/security/pkcs11/ec/ReadCertificates.java +++ b/test/jdk/sun/security/pkcs11/ec/ReadCertificates.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, 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 @@ -28,7 +28,6 @@ * and verify their signatures * @author Andreas Sterbenz * @library /test/lib .. - * @library ../../../../java/security/testlibrary * @modules jdk.crypto.cryptoki * @run main/othervm ReadCertificates * @run main/othervm -Djava.security.manager=allow ReadCertificates sm policy @@ -56,6 +55,7 @@ import java.util.List; import java.util.Map; import javax.security.auth.x500.X500Principal; +import jdk.test.lib.security.Providers; public class ReadCertificates extends PKCS11Test { diff --git a/test/jdk/sun/security/pkcs11/ec/ReadPKCS12.java b/test/jdk/sun/security/pkcs11/ec/ReadPKCS12.java index 6005d88aec4..7acd4c2dc69 100644 --- a/test/jdk/sun/security/pkcs11/ec/ReadPKCS12.java +++ b/test/jdk/sun/security/pkcs11/ec/ReadPKCS12.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, 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 @@ -27,7 +27,6 @@ * @summary Verify that we can parse ECPrivateKeys from PKCS#12 and use them * @author Andreas Sterbenz * @library /test/lib .. - * @library ../../../../java/security/testlibrary * @key randomness * @modules jdk.crypto.cryptoki jdk.crypto.ec/sun.security.ec * @run main/othervm ReadPKCS12 @@ -55,6 +54,7 @@ import java.util.List; import java.util.Map; import java.util.Random; +import jdk.test.lib.security.Providers; public class ReadPKCS12 extends PKCS11Test { diff --git a/test/jdk/sun/security/pkcs11/ec/TestECDH.java b/test/jdk/sun/security/pkcs11/ec/TestECDH.java index 49061f1288d..d2a45f3842d 100644 --- a/test/jdk/sun/security/pkcs11/ec/TestECDH.java +++ b/test/jdk/sun/security/pkcs11/ec/TestECDH.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, 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 @@ -27,7 +27,6 @@ * @summary Basic known answer test for ECDH * @author Andreas Sterbenz * @library /test/lib .. - * @library ../../../../java/security/testlibrary * @modules jdk.crypto.cryptoki * @run main/othervm TestECDH * @run main/othervm -Djava.security.manager=allow TestECDH sm policy @@ -44,6 +43,8 @@ import java.security.spec.X509EncodedKeySpec; import java.util.Arrays; import javax.crypto.KeyAgreement; +import jdk.test.lib.security.Providers; + public class TestECDH extends PKCS11Test { diff --git a/test/jdk/sun/security/pkcs11/ec/TestECDH2.java b/test/jdk/sun/security/pkcs11/ec/TestECDH2.java index 69ea7275193..1e4de55da02 100644 --- a/test/jdk/sun/security/pkcs11/ec/TestECDH2.java +++ b/test/jdk/sun/security/pkcs11/ec/TestECDH2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -27,7 +27,6 @@ * @summary basic test of ECDSA signatures for P-256 and P-384 from the * example data in "Suite B Implementer's Guide to FIPS 186-3". * @library /test/lib .. - * @library ../../../../java/security/testlibrary * @modules java.base/sun.security.util * jdk.crypto.cryptoki * @compile -XDignore.symbol.file TestECDH2.java diff --git a/test/jdk/sun/security/pkcs11/ec/TestECDSA.java b/test/jdk/sun/security/pkcs11/ec/TestECDSA.java index 59db0a3ed01..8ce69c61667 100644 --- a/test/jdk/sun/security/pkcs11/ec/TestECDSA.java +++ b/test/jdk/sun/security/pkcs11/ec/TestECDSA.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, 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 @@ -27,7 +27,6 @@ * @summary basic test of SHA1withECDSA and NONEwithECDSA signing/verifying * @author Andreas Sterbenz * @library /test/lib .. - * @library ../../../../java/security/testlibrary * @key randomness * @modules jdk.crypto.cryptoki * @run main/othervm TestECDSA @@ -46,6 +45,7 @@ import java.security.spec.PKCS8EncodedKeySpec; import java.security.spec.X509EncodedKeySpec; import java.util.Random; +import jdk.test.lib.security.Providers; public class TestECDSA extends PKCS11Test { diff --git a/test/jdk/sun/security/pkcs11/ec/TestECDSA2.java b/test/jdk/sun/security/pkcs11/ec/TestECDSA2.java index 4b6cb6f14ed..88edb93668e 100644 --- a/test/jdk/sun/security/pkcs11/ec/TestECDSA2.java +++ b/test/jdk/sun/security/pkcs11/ec/TestECDSA2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025, 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 @@ -27,7 +27,6 @@ * @summary basic test of ECDSA signatures for P-256 and P-384 from the * example data in "Suite B Implementer's Guide to FIPS 186-3". * @library /test/lib .. - * @library ../../../../java/security/testlibrary * @modules java.base/sun.security.util * jdk.crypto.cryptoki * @compile -XDignore.symbol.file TestECDSA2.java diff --git a/test/jdk/sun/security/pkcs11/rsa/TestCACerts.java b/test/jdk/sun/security/pkcs11/rsa/TestCACerts.java index c95d27bc3d8..a6844d28f78 100644 --- a/test/jdk/sun/security/pkcs11/rsa/TestCACerts.java +++ b/test/jdk/sun/security/pkcs11/rsa/TestCACerts.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ -27,7 +27,6 @@ * @summary Test the new RSA provider can verify all the RSA certs in the cacerts file * @author Andreas Sterbenz * @library /test/lib .. - * @library ../../../../java/security/testlibrary * @modules jdk.crypto.cryptoki * @run main/othervm TestCACerts * @run main/othervm -Djava.security.manager=allow TestCACerts sm TestCACerts.policy @@ -43,6 +42,7 @@ import java.security.Security; import java.security.cert.X509Certificate; import java.util.Enumeration; +import jdk.test.lib.security.Providers; public class TestCACerts extends PKCS11Test { diff --git a/test/jdk/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java b/test/jdk/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java index 08b29fe6df1..e57ba07741c 100644 --- a/test/jdk/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java +++ b/test/jdk/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2025, 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 @@ -32,7 +32,6 @@ * @summary Verify that all ciphersuites work (incl. ECC using NSS crypto) * @author Andreas Sterbenz * @library /test/lib .. ../../../../javax/net/ssl/TLSCommon - * @library ../../../../java/security/testlibrary * @modules jdk.crypto.cryptoki * @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1" * ClientJSSEServerJSSE @@ -42,6 +41,7 @@ import java.security.Provider; import java.security.Security; +import jdk.test.lib.security.Providers; public class ClientJSSEServerJSSE extends PKCS11Test { diff --git a/test/jdk/sun/security/pkcs12/GetSetEntryTest.java b/test/jdk/sun/security/pkcs12/GetSetEntryTest.java index 2bfb92aae2f..00e6e2b69e7 100644 --- a/test/jdk/sun/security/pkcs12/GetSetEntryTest.java +++ b/test/jdk/sun/security/pkcs12/GetSetEntryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, 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 @@ -25,10 +25,9 @@ * @test * @bug 8327461 * @summary engineGetEntry in PKCS12KeyStore should be thread-safe - * @library /test/lib ../../../java/security/testlibrary + * @library /test/lib * @modules java.base/sun.security.x509 * java.base/sun.security.util - * @build CertificateBuilder * @run main GetSetEntryTest */ @@ -42,7 +41,7 @@ import java.util.concurrent.TimeUnit; import java.util.Date; -import sun.security.testlibrary.CertificateBuilder; +import jdk.test.lib.security.CertificateBuilder; public class GetSetEntryTest { diff --git a/test/jdk/sun/security/provider/certpath/OCSP/OCSPNoContentLength.java b/test/jdk/sun/security/provider/certpath/OCSP/OCSPNoContentLength.java index 8be1b05cd85..979d270d8a5 100644 --- a/test/jdk/sun/security/provider/certpath/OCSP/OCSPNoContentLength.java +++ b/test/jdk/sun/security/provider/certpath/OCSP/OCSPNoContentLength.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, 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 @@ -28,8 +28,7 @@ * @modules java.base/sun.security.x509 * java.base/sun.security.provider.certpath * java.base/sun.security.util - * @library ../../../../../java/security/testlibrary - * @build CertificateBuilder SimpleOCSPServer + * @library /test/lib * @run main/othervm OCSPNoContentLength */ @@ -46,8 +45,8 @@ import java.util.concurrent.TimeUnit; -import sun.security.testlibrary.SimpleOCSPServer; -import sun.security.testlibrary.CertificateBuilder; +import jdk.test.lib.security.SimpleOCSPServer; +import jdk.test.lib.security.CertificateBuilder; public class OCSPNoContentLength { diff --git a/test/jdk/sun/security/ssl/Stapling/StatusResponseManager.java b/test/jdk/sun/security/ssl/Stapling/StatusResponseManager.java index 58ebb5b876a..0f66db4064c 100644 --- a/test/jdk/sun/security/ssl/Stapling/StatusResponseManager.java +++ b/test/jdk/sun/security/ssl/Stapling/StatusResponseManager.java @@ -23,10 +23,12 @@ /* * @test + * @library /test/lib + * @build jdk.test.lib.security.SimpleOCSPServer + * jdk.test.lib.security.CertificateBuilder * @bug 8046321 - * @library ../../../../java/security/testlibrary - * @build CertificateBuilder SimpleOCSPServer - * @run main/othervm -Djavax.net.debug=ssl:respmgr java.base/sun.security.ssl.StatusResponseManagerTests * @summary OCSP Stapling for TLS + * @run main/othervm -Djavax.net.debug=ssl:respmgr + * java.base/sun.security.ssl.StatusResponseManagerTests */ diff --git a/test/jdk/sun/security/ssl/Stapling/java.base/sun/security/ssl/StatusResponseManagerTests.java b/test/jdk/sun/security/ssl/Stapling/java.base/sun/security/ssl/StatusResponseManagerTests.java index 07058a29c25..63910c67e2d 100644 --- a/test/jdk/sun/security/ssl/Stapling/java.base/sun/security/ssl/StatusResponseManagerTests.java +++ b/test/jdk/sun/security/ssl/Stapling/java.base/sun/security/ssl/StatusResponseManagerTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 @@ -33,8 +33,8 @@ import java.security.PublicKey; import java.util.concurrent.TimeUnit; -import sun.security.testlibrary.SimpleOCSPServer; -import sun.security.testlibrary.CertificateBuilder; +import jdk.test.lib.security.SimpleOCSPServer; +import jdk.test.lib.security.CertificateBuilder; import static sun.security.ssl.CertStatusExtension.*; diff --git a/test/jdk/sun/security/tools/keytool/KeyToolTest.java b/test/jdk/sun/security/tools/keytool/KeyToolTest.java index 954951a1a78..793ffd62793 100644 --- a/test/jdk/sun/security/tools/keytool/KeyToolTest.java +++ b/test/jdk/sun/security/tools/keytool/KeyToolTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, 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 @@ -23,7 +23,7 @@ /* * @test - * @library /java/security/testlibrary + * @library /test/lib * @bug 6251120 8231950 8242151 * @summary Testing keytool * @@ -68,10 +68,10 @@ import java.util.*; import java.security.cert.X509Certificate; import jdk.test.lib.util.FileUtils; +import jdk.test.lib.security.HumanInputStream; import jdk.test.lib.security.SecurityUtils; import sun.security.util.ObjectIdentifier; - public class KeyToolTest { // The stdout and stderr outputs after a keytool run diff --git a/test/jdk/sun/security/tools/keytool/NssTest.java b/test/jdk/sun/security/tools/keytool/NssTest.java index 1ed2d4c3f39..6f82da4b4c8 100644 --- a/test/jdk/sun/security/tools/keytool/NssTest.java +++ b/test/jdk/sun/security/tools/keytool/NssTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, 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 @@ -29,7 +29,7 @@ /* * @test * @summary It tests (almost) all keytool behaviors with NSS. - * @library /test/lib /test/jdk/sun/security/pkcs11 /java/security/testlibrary + * @library /test/lib /test/jdk/sun/security/pkcs11 * @modules java.base/sun.security.tools.keytool * java.base/sun.security.util * java.base/sun.security.x509 diff --git a/test/jdk/sun/security/x509/URICertStore/AIACertTimeout.java b/test/jdk/sun/security/x509/URICertStore/AIACertTimeout.java index 487f5e2471c..cabb225bf1c 100644 --- a/test/jdk/sun/security/x509/URICertStore/AIACertTimeout.java +++ b/test/jdk/sun/security/x509/URICertStore/AIACertTimeout.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, 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 @@ -27,8 +27,7 @@ * @summary Enhance OCSP, CRL and Certificate Fetch Timeouts * @modules java.base/sun.security.x509 * java.base/sun.security.util - * @library /test/lib ../../../../java/security/testlibrary - * @build CertificateBuilder + * @library /test/lib * @run main/othervm -Dcom.sun.security.enableAIAcaIssuers=true * -Dcom.sun.security.cert.readtimeout=1 AIACertTimeout 5000 false * @run main/othervm -Dcom.sun.security.enableAIAcaIssuers=true @@ -55,10 +54,7 @@ import java.util.*; import java.util.concurrent.TimeUnit; -import sun.security.testlibrary.CertificateBuilder; - -import sun.security.x509.*; -import sun.security.util.*; +import jdk.test.lib.security.CertificateBuilder; public class AIACertTimeout { diff --git a/test/jdk/java/security/testlibrary/CertificateBuilder.java b/test/lib/jdk/test/lib/security/CertificateBuilder.java similarity index 99% rename from test/jdk/java/security/testlibrary/CertificateBuilder.java rename to test/lib/jdk/test/lib/security/CertificateBuilder.java index 1e26d471c97..818bcf17521 100644 --- a/test/jdk/java/security/testlibrary/CertificateBuilder.java +++ b/test/lib/jdk/test/lib/security/CertificateBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 @@ -23,7 +23,7 @@ * questions. */ -package sun.security.testlibrary; +package jdk.test.lib.security; import java.io.*; import java.util.*; diff --git a/test/jdk/java/security/testlibrary/HumanInputStream.java b/test/lib/jdk/test/lib/security/HumanInputStream.java similarity index 98% rename from test/jdk/java/security/testlibrary/HumanInputStream.java rename to test/lib/jdk/test/lib/security/HumanInputStream.java index 50e5dd0bcc8..c68f515881e 100644 --- a/test/jdk/java/security/testlibrary/HumanInputStream.java +++ b/test/lib/jdk/test/lib/security/HumanInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, 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 @@ -21,6 +21,7 @@ * questions. */ +package jdk.test.lib.security; import java.io.BufferedReader; import java.io.IOException; @@ -82,6 +83,7 @@ public HumanInputStream(String input) { } return re; } + @Override public int read(byte[] buffer, int offset, int len) { inLine = true; try { @@ -92,6 +94,7 @@ public HumanInputStream(String input) { inLine = false; } } + @Override public int available() { if (pos < length) return 1; return 0; diff --git a/test/jdk/java/security/testlibrary/Providers.java b/test/lib/jdk/test/lib/security/Providers.java similarity index 92% rename from test/jdk/java/security/testlibrary/Providers.java rename to test/lib/jdk/test/lib/security/Providers.java index b3e9f3e96b6..42dd6984036 100644 --- a/test/jdk/java/security/testlibrary/Providers.java +++ b/test/lib/jdk/test/lib/security/Providers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2025, 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 @@ -21,6 +21,8 @@ * questions. */ +package jdk.test.lib.security; + import java.security.Provider; import java.security.Security; diff --git a/test/jdk/java/security/testlibrary/ProvidersSnapshot.java b/test/lib/jdk/test/lib/security/ProvidersSnapshot.java similarity index 93% rename from test/jdk/java/security/testlibrary/ProvidersSnapshot.java rename to test/lib/jdk/test/lib/security/ProvidersSnapshot.java index 33c45329e3f..cef02f814be 100644 --- a/test/jdk/java/security/testlibrary/ProvidersSnapshot.java +++ b/test/lib/jdk/test/lib/security/ProvidersSnapshot.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2025, 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 @@ -21,6 +21,8 @@ * questions. */ +package jdk.test.lib.security; + import java.security.Provider; import java.security.Security; diff --git a/test/jdk/java/security/testlibrary/SimpleOCSPServer.java b/test/lib/jdk/test/lib/security/SimpleOCSPServer.java similarity index 99% rename from test/jdk/java/security/testlibrary/SimpleOCSPServer.java rename to test/lib/jdk/test/lib/security/SimpleOCSPServer.java index 405ed721267..d5819b90cb9 100644 --- a/test/jdk/java/security/testlibrary/SimpleOCSPServer.java +++ b/test/lib/jdk/test/lib/security/SimpleOCSPServer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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 @@ -23,7 +23,7 @@ * questions. */ -package sun.security.testlibrary; +package jdk.test.lib.security; import java.io.*; import java.net.*;