Print this page


Split Close
Expand all
Collapse all
          --- old/jdk/test/sun/security/tools/keytool/KeyToolTest.java
          +++ new/jdk/test/sun/security/tools/keytool/KeyToolTest.java
↓ open down ↓ 1753 lines elided ↑ open up ↑
1754 1754          testFail("", "-keypasswd -protected -new password " +
1755 1755                  "-keystore x.jks -storetype JKS");
1756 1756          assertTrue(ex.indexOf("if -protected is specified, then") != -1);
1757 1757          remove("x.jks");
1758 1758      }
1759 1759  
1760 1760      void i18nPKCS11Test() throws Exception {
1761 1761          //PKCS#11 tests
1762 1762  
1763 1763          //   1. sccs edit cert8.db key3.db
1764      -        //Runtime.getRuntime().exec("/usr/ccs/bin/sccs edit cert8.db key3.db");
     1764 +        //Runtime.getRuntime().exec("/usr/bin/sccs edit cert8.db key3.db");
1765 1765          testOK("", p11Arg + ("-storepass test12 -genkey -alias genkey" +
1766 1766                  " -dname cn=genkey -keysize 512 -keyalg rsa"));
1767 1767          testOK("", p11Arg + "-storepass test12 -list");
1768 1768          testOK("", p11Arg + "-storepass test12 -list -alias genkey");
1769 1769          testOK("", p11Arg +
1770 1770                  "-storepass test12 -certreq -alias genkey -file genkey.certreq");
1771 1771          testOK("", p11Arg +
1772 1772                  "-storepass test12 -export -alias genkey -file genkey.cert");
1773 1773          testOK("", "-printcert -file genkey.cert");
1774 1774          testOK("", p11Arg +
1775 1775                  "-storepass test12 -selfcert -alias genkey -dname cn=selfCert");
1776 1776          testOK("", p11Arg +
1777 1777                  "-storepass test12 -list -alias genkey -v");
1778 1778          assertTrue(out.indexOf("Owner: CN=selfCert") != -1);
1779 1779          //(check that cert subject DN is [cn=selfCert])
1780 1780          testOK("", p11Arg + "-storepass test12 -delete -alias genkey");
1781 1781          testOK("", p11Arg + "-storepass test12 -list");
1782 1782          assertTrue(out.indexOf("Your keystore contains 0 entries") != -1);
1783 1783          //(check for empty database listing)
1784      -        //Runtime.getRuntime().exec("/usr/ccs/bin/sccs unedit cert8.db key3.db");
     1784 +        //Runtime.getRuntime().exec("/usr/bin/sccs unedit cert8.db key3.db");
1785 1785          remove("genkey.cert");
1786 1786          remove("genkey.certreq");
1787 1787          //  12. sccs unedit cert8.db key3.db
1788 1788      }
1789 1789  
1790 1790      // tesing new option -srcProviderName
1791 1791      void sszzTest() throws Exception {
1792 1792          testAnyway("", NSS_P11_ARG+"-delete -alias nss -storepass test12");
1793 1793          testAnyway("", NZZ_P11_ARG+"-delete -alias nss -storepass test12");
1794 1794          testOK("", NSS_P11_ARG+"-genkeypair -dname CN=NSS " +
↓ open down ↓ 238 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX