test/jdk/sun/security/pkcs12/PBES2Encoding.java
changeset 59104 046e4024e55a
parent 51142 69dc9ea17b33
equal deleted inserted replaced
59103:4a09d4df104c 59104:046e4024e55a
     1 /*
     1 /*
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2018, 2019, 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.
     7  * published by the Free Software Foundation.
    33 public class PBES2Encoding {
    33 public class PBES2Encoding {
    34 
    34 
    35     // This is a PKCS 12 file using PBES2 to encrypt the cert and key. It is
    35     // This is a PKCS 12 file using PBES2 to encrypt the cert and key. It is
    36     // generated with these commands:
    36     // generated with these commands:
    37     //
    37     //
    38     // keytool -keystore ks -genkeypair -storepass changeit -alias a -dname CN=A
    38     // keytool -keystore ks -genkeypair -keyalg DSA -storepass changeit -alias a -dname CN=A
    39     // openssl pkcs12 -in ks -nodes -out kandc -passin pass:changeit
    39     // openssl pkcs12 -in ks -nodes -out kandc -passin pass:changeit
    40     // openssl pkcs12 -export -in kandc -out p12 -name a -passout pass:changeit
    40     // openssl pkcs12 -export -in kandc -out p12 -name a -passout pass:changeit
    41     //         -certpbe AES-128-CBC -keypbe AES-128-CBC
    41     //         -certpbe AES-128-CBC -keypbe AES-128-CBC
    42 
    42 
    43     static final String P12_FILE =
    43     static final String P12_FILE =