8165689: Fix module dependencies for sun/security/pkcs11/* tests
Reviewed-by: mullan
This commit is contained in:
parent
e99208ee7d
commit
0f9675b98e
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2016, 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
|
||||
@ -31,6 +31,7 @@ import java.util.List;
|
||||
* OID and algorithm transformation string should match.
|
||||
* Both could be able to be used to generate the algorithm instance.
|
||||
* @compile ../../TestSignatureOidHelper.java
|
||||
* @modules jdk.crypto.ec
|
||||
* @run main TestSHAwithECDSASignatureOids
|
||||
*/
|
||||
public class TestSHAwithECDSASignatureOids {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2016, 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,11 +25,16 @@
|
||||
* @test
|
||||
* @bug 6877357 6885166
|
||||
* @run main/othervm IPv6
|
||||
* @modules jdk.security.auth
|
||||
* @summary IPv6 address does not work
|
||||
*/
|
||||
|
||||
import com.sun.security.auth.module.Krb5LoginModule;
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.io.StringReader;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4856966
|
||||
* @summary
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm ReinitCipher
|
||||
* @run main/othervm ReinitCipher sm
|
||||
*/
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6687725
|
||||
* @summary Test internal PKCS5Padding impl with various error conditions.
|
||||
* @author Valerie Peng
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestPKCS5PaddingError
|
||||
* @run main/othervm TestPKCS5PaddingError sm
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4898468 6994008
|
||||
* @summary basic test for RSA cipher
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestRSACipher
|
||||
* @run main/othervm TestRSACipher sm
|
||||
*/
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6572331 6994008
|
||||
* @summary basic test for RSA cipher key wrapping functionality
|
||||
* @author Valerie Peng
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestRSACipherWrap
|
||||
* @run main/othervm TestRSACipherWrap sm
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6994008
|
||||
* @summary basic test for RSA/ECB/NoPadding cipher
|
||||
* @author Valerie Peng
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestRawRSACipher
|
||||
* @run main/othervm TestRawRSACipher sm
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4898461 6604496
|
||||
* @summary basic test for symmetric ciphers with padding
|
||||
* @author Valerie Peng
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestSymmCiphers
|
||||
* @run main/othervm TestSymmCiphers sm
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4898484 6604496 8001284
|
||||
* @summary basic test for symmetric ciphers with no padding
|
||||
* @author Valerie Peng
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestSymmCiphersNoPad
|
||||
* @run main/othervm TestSymmCiphersNoPad sm
|
||||
*/
|
||||
|
@ -21,21 +21,23 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 8072452
|
||||
* @summary Support DHE sizes up to 8192-bits and DSA sizes up to 3072-bits
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm SupportedDHKeys
|
||||
* @run main/othervm SupportedDHKeys sm
|
||||
*/
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import java.security.*;
|
||||
import javax.crypto.*;
|
||||
import javax.crypto.interfaces.*;
|
||||
import javax.crypto.spec.*;
|
||||
import java.security.KeyPair;
|
||||
import java.security.KeyPairGenerator;
|
||||
import java.security.Provider;
|
||||
import javax.crypto.interfaces.DHPrivateKey;
|
||||
import javax.crypto.interfaces.DHPublicKey;
|
||||
import javax.crypto.spec.DHParameterSpec;
|
||||
|
||||
public class SupportedDHKeys extends PKCS11Test {
|
||||
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4921804 6324825
|
||||
* @summary Verify that DH works properly
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestDH
|
||||
* @run main/othervm TestDH sm
|
||||
*/
|
||||
|
@ -21,11 +21,12 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 7146728
|
||||
* @summary Interop test for DH with secret that has a leading 0x00 byte
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestInterop
|
||||
* @run main/othervm TestInterop sm
|
||||
*/
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4942494 7146728
|
||||
* @summary KAT test for DH (normal and with secret that has leading a 0x00 byte)
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestShort
|
||||
* @run main/othervm TestShort sm
|
||||
*/
|
||||
|
@ -21,21 +21,19 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 8072452
|
||||
* @summary Support DHE sizes up to 8192-bits and DSA sizes up to 3072-bits
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm UnsupportedDHKeys
|
||||
* @run main/othervm UnsupportedDHKeys sm
|
||||
*/
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import java.security.*;
|
||||
import javax.crypto.*;
|
||||
import javax.crypto.interfaces.*;
|
||||
import javax.crypto.spec.*;
|
||||
import java.security.InvalidParameterException;
|
||||
import java.security.KeyPairGenerator;
|
||||
import java.security.Provider;
|
||||
|
||||
public class UnsupportedDHKeys extends PKCS11Test {
|
||||
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4898479
|
||||
* @summary Verify that the parity bits are set correctly
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm DESParity
|
||||
* @run main/othervm DESParity sm
|
||||
*/
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4917233 6461727 6490213 6720456
|
||||
* @summary test the KeyGenerator
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestKeyGenerator
|
||||
* @run main/othervm TestKeyGenerator sm
|
||||
*/
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 7196382 8072452
|
||||
* @summary Ensure that DH key pairs can be generated for 512 - 8192 bits
|
||||
* @author Valerie Peng
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestDH2048
|
||||
* @run main/othervm TestDH2048 sm
|
||||
*/
|
||||
|
@ -21,6 +21,17 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 4846410 6313661 4963723
|
||||
* @summary Basic known-answer-test for Hmac algorithms
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm MacKAT
|
||||
* @run main/othervm MacKAT sm
|
||||
*/
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.security.Provider;
|
||||
import java.util.Arrays;
|
||||
@ -30,15 +41,6 @@ import javax.crypto.Mac;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 4846410 6313661 4963723
|
||||
* @summary Basic known-answer-test for Hmac algorithms
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @run main/othervm MacKAT
|
||||
* @run main/othervm MacKAT sm
|
||||
*/
|
||||
public class MacKAT extends PKCS11Test {
|
||||
|
||||
private final static byte[] ALONG, BLONG, BKEY, BKEY_20, DDDATA_50,
|
||||
|
@ -21,6 +21,18 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8048603
|
||||
* @summary Check if doFinal and update operation result in same Mac
|
||||
* @author Yu-Ching Valerie Peng, Bill Situ, Alexander Fomin
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm MacSameTest
|
||||
* @run main/othervm MacSameTest sm
|
||||
* @key randomness
|
||||
*/
|
||||
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.NoSuchProviderException;
|
||||
@ -30,16 +42,6 @@ import java.util.List;
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8048603
|
||||
* @summary Check if doFinal and update operation result in same Mac
|
||||
* @author Yu-Ching Valerie Peng, Bill Situ, Alexander Fomin
|
||||
* @library ..
|
||||
* @run main/othervm MacSameTest
|
||||
* @run main/othervm MacSameTest sm
|
||||
* @key randomness
|
||||
*/
|
||||
public class MacSameTest extends PKCS11Test {
|
||||
|
||||
private static final int MESSAGE_SIZE = 25;
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4856966
|
||||
* @summary
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm ReinitMac
|
||||
* @run main/othervm ReinitMac sm
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4856966
|
||||
* @summary Test the MessageDigest.update(ByteBuffer) method
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm ByteBuffers
|
||||
* @run main/othervm ByteBuffers sm
|
||||
*/
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4856966
|
||||
* @summary Basic known-answer-test for all our MessageDigest algorithms
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm DigestKAT
|
||||
* @run main/othervm DigestKAT sm
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4856966
|
||||
* @summary
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm ReinitDigest
|
||||
* @run main/othervm ReinitDigest sm
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6414899
|
||||
* @summary Ensure the cloning functionality works.
|
||||
* @author Valerie Peng
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestCloning
|
||||
* @run main/othervm TestCloning sm
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2016, 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
|
||||
@ -20,13 +20,16 @@
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 7003952 7191662
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @summary load DLLs and launch executables using fully qualified path
|
||||
*/
|
||||
import java.security.*;
|
||||
|
||||
import java.security.InvalidParameterException;
|
||||
import java.security.Provider;
|
||||
|
||||
public class Absolute {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2016, 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,20 +21,16 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4000000
|
||||
* @summary XXX todo
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
*/
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import java.security.*;
|
||||
|
||||
import javax.crypto.*;
|
||||
import java.security.Provider;
|
||||
|
||||
public class SampleTest extends PKCS11Test {
|
||||
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6414980
|
||||
* @summary Test that the PKCS#11 KeyStore handles RSA, DSA, and EC keys
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm AddPrivateKey
|
||||
* @run main/othervm AddPrivateKey sm policy
|
||||
*/
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6298106
|
||||
* @summary make sure we can add a trusted cert to the NSS KeyStore module
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm AddTrustedCert
|
||||
* @run main/othervm AddTrustedCert sm policy
|
||||
*/
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6329006
|
||||
* @summary verify that NSS no-db mode works correctly
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm Crypto
|
||||
* @run main/othervm Crypto sm policy
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6273877 6322208 6275523
|
||||
* @summary make sure we can access the NSS softtoken KeyStore
|
||||
* and use a private key
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm GetPrivateKey
|
||||
* @run main/othervm GetPrivateKey sm policy
|
||||
*/
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6269847
|
||||
* @summary store a NSS PKCS11 PrivateKeyEntry to JKS KeyStore throws confusing NPE
|
||||
* @author Wang Weijun
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm JksSetPrivateKey
|
||||
* @run main/othervm JksSetPrivateKey sm policy
|
||||
*/
|
||||
|
@ -21,6 +21,16 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8048622 8134232
|
||||
* @summary Checks that PKCS#11 keystore can't be loaded with wrong password
|
||||
* @library ../
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm LoadKeystore
|
||||
* @run main/othervm LoadKeystore sm policy
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.security.KeyStore;
|
||||
@ -30,14 +40,6 @@ import java.security.Security;
|
||||
import java.security.UnrecoverableKeyException;
|
||||
import java.util.Collections;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8048622 8134232
|
||||
* @summary Checks that PKCS#11 keystore can't be loaded with wrong password
|
||||
* @library ../
|
||||
* @run main/othervm LoadKeystore
|
||||
* @run main/othervm LoadKeystore sm policy
|
||||
*/
|
||||
public class LoadKeystore extends SecmodTest {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6298106 6275523 6420252 8059627
|
||||
* @summary make sure we can access the NSS trust anchor module
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TrustAnchors
|
||||
* @run main/othervm TrustAnchors sm policy
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6246411
|
||||
* @summary basic test for PKCS#11 SecureRandom
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm Basic
|
||||
* @run main/othervm Basic sm
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2016, 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,15 +21,22 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6837847
|
||||
* @summary Ensure a deserialized PKCS#11 SecureRandom is functional.
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
*/
|
||||
|
||||
import java.security.*;
|
||||
import java.io.*;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.Provider;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.Security;
|
||||
|
||||
public class TestDeserialization extends PKCS11Test {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2016, 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,18 +21,22 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4921802
|
||||
* @summary Test that the SunPKCS11 provider can be serialized
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
*/
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
import java.security.*;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.security.Provider;
|
||||
import java.security.Security;
|
||||
|
||||
public class SerializeProvider extends PKCS11Test {
|
||||
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4856966
|
||||
* @summary Test the Signature.update(ByteBuffer) method
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm ByteBuffers
|
||||
* @run main/othervm ByteBuffers sm
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2016, 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,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4856966
|
||||
* @summary test that reinitializing Signatures works correctly
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main ReinitSignature
|
||||
* @run main ReinitSignature
|
||||
* @run main ReinitSignature
|
||||
@ -330,9 +331,13 @@
|
||||
* @run main ReinitSignature
|
||||
*/
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import java.security.*;
|
||||
import java.security.KeyPair;
|
||||
import java.security.KeyPairGenerator;
|
||||
import java.security.PrivateKey;
|
||||
import java.security.Provider;
|
||||
import java.security.PublicKey;
|
||||
import java.security.Signature;
|
||||
import java.util.Random;
|
||||
|
||||
public class ReinitSignature extends PKCS11Test {
|
||||
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4856966
|
||||
* @summary basic test of SHA1withDSA and RawDSA signing/verifying
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestDSA
|
||||
* @run main/othervm TestDSA sm
|
||||
*/
|
||||
|
@ -28,6 +28,7 @@
|
||||
* with unsupported key sizes
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestDSAKeyLength
|
||||
* @run main/othervm TestDSAKeyLength sm
|
||||
*/
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test %W% %E%
|
||||
* @bug 6695485
|
||||
* @summary Make sure initSign/initVerify() check RSA key lengths
|
||||
* @author Yu-Ching Valerie Peng
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestRSAKeyLength
|
||||
* @run main/othervm TestRSAKeyLength sm
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6405536 6414980 8051972
|
||||
* @summary Make sure that we can parse certificates using various named curves
|
||||
@ -29,6 +29,7 @@
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @library ../../../../java/security/testlibrary
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm ReadCertificates
|
||||
* @run main/othervm ReadCertificates sm policy
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6405536
|
||||
* @summary Verify that we can parse ECPrivateKeys from PKCS#12 and use them
|
||||
@ -29,6 +29,7 @@
|
||||
* @library ..
|
||||
* @library ../../../../java/security/testlibrary
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm ReadPKCS12
|
||||
* @run main/othervm ReadPKCS12 sm policy
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6405536
|
||||
* @summary Basic known answer test for ECDH
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @library ../../../../java/security/testlibrary
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestECDH
|
||||
* @run main/othervm TestECDH sm policy
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6405536
|
||||
* @summary basic test of ECDSA signatures for P-256 and P-384 from the
|
||||
@ -29,6 +29,7 @@
|
||||
* @library ..
|
||||
* @library ../../../../java/security/testlibrary
|
||||
* @modules java.base/sun.security.util
|
||||
* jdk.crypto.pkcs11
|
||||
* @compile -XDignore.symbol.file TestECDH2.java
|
||||
* @run main/othervm TestECDH2
|
||||
* @run main/othervm TestECDH2 sm
|
||||
|
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6405536 8042967
|
||||
* @summary basic test of SHA1withECDSA and NONEwithECDSA signing/verifying
|
||||
@ -29,6 +29,7 @@
|
||||
* @library ..
|
||||
* @library ../../../../java/security/testlibrary
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestECDSA
|
||||
* @run main/othervm TestECDSA sm policy
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6405536
|
||||
* @summary basic test of ECDSA signatures for P-256 and P-384 from the
|
||||
@ -29,6 +29,7 @@
|
||||
* @library ..
|
||||
* @library ../../../../java/security/testlibrary
|
||||
* @modules java.base/sun.security.util
|
||||
* jdk.crypto.pkcs11
|
||||
* @compile -XDignore.symbol.file TestECDSA2.java
|
||||
* @run main/othervm TestECDSA2
|
||||
* @run main/othervm TestECDSA2 sm
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6405536
|
||||
* @summary Verify that we can use ECGenParameterSpec
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestECGenSpec
|
||||
* @run main/othervm TestECGenSpec sm
|
||||
*/
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6405536
|
||||
* @summary Test the P11ECKeyFactory
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestKeyFactory
|
||||
* @run main/othervm TestKeyFactory sm
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6231216
|
||||
* @summary Verify key wrapping (of extractable keys) works for RSA/PKCS1
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm KeyWrap
|
||||
* @run main/othervm KeyWrap sm
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4856966
|
||||
* @summary Test the new RSA provider can verify all the RSA certs in the cacerts file
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @library ../../../../java/security/testlibrary
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestCACerts
|
||||
* @run main/othervm TestCACerts sm TestCACerts.policy
|
||||
*/
|
||||
|
@ -21,12 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4856966
|
||||
* @summary Test KeyFactory of the new RSA provider
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestKeyFactory
|
||||
* @run main/othervm TestKeyFactory sm rsakeys.ks.policy
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4856966
|
||||
* @summary Verify that the RSA KeyPairGenerator works (use -Dseed=X to set PRNG seed)
|
||||
@ -29,6 +29,7 @@
|
||||
* @library ..
|
||||
* @library /lib/testlibrary
|
||||
* @build jdk.testlibrary.*
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator
|
||||
* @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator
|
||||
* sm TestKeyPairGenerator.policy
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 4856966
|
||||
* @summary Test signing/verifying using all the signature algorithms
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @key randomness
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestSignatures
|
||||
* @run main/othervm TestSignatures sm rsakeys.ks.policy
|
||||
*/
|
||||
|
@ -33,6 +33,7 @@
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @library ../../../../java/security/testlibrary
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1"
|
||||
* ClientJSSEServerJSSE
|
||||
* @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1"
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6316539
|
||||
* @summary Known-answer-test for TlsKeyMaterial generator
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules java.base/sun.security.internal.spec
|
||||
* jdk.crypto.pkcs11
|
||||
* @run main/othervm TestKeyMaterial
|
||||
* @run main/othervm TestKeyMaterial sm policy
|
||||
*/
|
||||
|
@ -27,6 +27,7 @@
|
||||
* @summary Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
|
||||
* @library ..
|
||||
* @author Pasi Eronen
|
||||
* @modules jdk.crypto.pkcs11
|
||||
* @run main/othervm TestLeadingZeroesP11
|
||||
* @run main/othervm TestLeadingZeroesP11 sm
|
||||
*/
|
||||
|
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6316539
|
||||
* @summary Known-answer-test for TlsMasterSecret generator
|
||||
@ -29,6 +29,7 @@
|
||||
* @library ..
|
||||
* @modules java.base/sun.security.internal.interfaces
|
||||
* java.base/sun.security.internal.spec
|
||||
* jdk.crypto.pkcs11
|
||||
* @run main/othervm TestMasterSecret
|
||||
* @run main/othervm TestMasterSecret sm TestMasterSecret.policy
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6316539 6345251
|
||||
* @summary Basic known-answer-test for TlsPrf
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules java.base/sun.security.internal.spec
|
||||
* jdk.crypto.pkcs11
|
||||
* @run main/othervm TestPRF
|
||||
* @run main/othervm TestPRF sm policy
|
||||
*/
|
||||
|
@ -21,13 +21,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @test
|
||||
* @bug 6316539
|
||||
* @summary Basic tests for TlsRsaPremasterSecret generator
|
||||
* @author Andreas Sterbenz
|
||||
* @library ..
|
||||
* @modules java.base/sun.security.internal.spec
|
||||
* jdk.crypto.pkcs11
|
||||
* @run main/othervm TestPremaster
|
||||
* @run main/othervm TestPremaster sm policy
|
||||
*/
|
||||
|
@ -26,6 +26,7 @@
|
||||
* @bug 8138766
|
||||
* @summary New default -sigalg for keytool
|
||||
* @modules java.base/sun.security.tools.keytool
|
||||
* @modules jdk.crypto.ec
|
||||
* @run main/othervm DefaultSignatureAlgorithm RSA 1024 SHA256withRSA
|
||||
* @run main/othervm DefaultSignatureAlgorithm RSA 3072 SHA256withRSA
|
||||
* @run main/othervm DefaultSignatureAlgorithm RSA 3073 SHA384withRSA
|
||||
|
@ -23,6 +23,15 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8134708
|
||||
* @summary Check if LDAP resources from CRLDP and AIA extensions can be loaded
|
||||
* @run main/othervm ExtensionsWithLDAP CRLDP ldap.host.for.crldp
|
||||
* @modules jdk.security.auth
|
||||
* @run main/othervm ExtensionsWithLDAP AIA ldap.host.for.aia
|
||||
*/
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -45,13 +54,6 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8134708
|
||||
* @summary Check if LDAP resources from CRLDP and AIA extensions can be loaded
|
||||
* @run main/othervm ExtensionsWithLDAP CRLDP ldap.host.for.crldp
|
||||
* @run main/othervm ExtensionsWithLDAP AIA ldap.host.for.aia
|
||||
*/
|
||||
public class ExtensionsWithLDAP {
|
||||
|
||||
/*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2016, 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,17 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8049237
|
||||
* @modules java.base/sun.security.x509
|
||||
* java.base/sun.security.util
|
||||
* jdk.crypto.ec
|
||||
* @summary This test generates V3 certificate with all the supported
|
||||
* extensions. Writes back the generated certificate in to a file and checks for
|
||||
* equality with the original certificate.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
@ -28,7 +39,6 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintWriter;
|
||||
import static java.lang.System.out;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.KeyPair;
|
||||
import java.security.KeyPairGenerator;
|
||||
@ -50,15 +60,8 @@ import sun.security.util.BitArray;
|
||||
import sun.security.util.ObjectIdentifier;
|
||||
import sun.security.x509.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8049237
|
||||
* @modules java.base/sun.security.x509
|
||||
* java.base/sun.security.util
|
||||
* @summary This test generates V3 certificate with all the supported
|
||||
* extensions. Writes back the generated certificate in to a file and checks for
|
||||
* equality with the original certificate.
|
||||
*/
|
||||
import static java.lang.System.out;
|
||||
|
||||
public class V3Certificate {
|
||||
|
||||
public static final String V3_FILE = "certV3";
|
||||
|
Loading…
Reference in New Issue
Block a user