equal
deleted
inserted
replaced
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 = |