equal
deleted
inserted
replaced
48 |
48 |
49 # Part 1: JKS keystore with same storepass and keypass |
49 # Part 1: JKS keystore with same storepass and keypass |
50 |
50 |
51 rm jks 2> /dev/null |
51 rm jks 2> /dev/null |
52 $KT -genkeypair -keystore jks -storetype jks -alias me -dname CN=Me \ |
52 $KT -genkeypair -keystore jks -storetype jks -alias me -dname CN=Me \ |
53 -storepass pass1111 -keypass pass1111 || exit 11 |
53 -keyalg rsa -storepass pass1111 -keypass pass1111 || exit 11 |
54 |
54 |
55 # Cannot only change storepass |
55 # Cannot only change storepass |
56 rm p12 2> /dev/null |
56 rm p12 2> /dev/null |
57 $KT -importkeystore -noprompt \ |
57 $KT -importkeystore -noprompt \ |
58 -srcstoretype jks -srckeystore jks -destkeystore p12 -deststoretype pkcs12 \ |
58 -srcstoretype jks -srckeystore jks -destkeystore p12 -deststoretype pkcs12 \ |
83 # Part 2: JKS keystore with different storepass and keypass |
83 # Part 2: JKS keystore with different storepass and keypass |
84 # Must import by alias (-srckeypass is not available when importing all) |
84 # Must import by alias (-srckeypass is not available when importing all) |
85 |
85 |
86 rm jks 2> /dev/null |
86 rm jks 2> /dev/null |
87 $KT -genkeypair -keystore jks -storetype jks -alias me -dname CN=Me \ |
87 $KT -genkeypair -keystore jks -storetype jks -alias me -dname CN=Me \ |
88 -storepass pass1111 -keypass pass2222 || exit 21 |
88 -keyalg rsa -storepass pass1111 -keypass pass2222 || exit 21 |
89 |
89 |
90 # Can use old keypass as new storepass so new storepass and keypass are same |
90 # Can use old keypass as new storepass so new storepass and keypass are same |
91 rm p12 2> /dev/null |
91 rm p12 2> /dev/null |
92 $KT -importkeystore -noprompt -srcalias me \ |
92 $KT -importkeystore -noprompt -srcalias me \ |
93 -srcstoretype jks -srckeystore jks -destkeystore p12 -deststoretype pkcs12 \ |
93 -srcstoretype jks -srckeystore jks -destkeystore p12 -deststoretype pkcs12 \ |