Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8043349

Consider adding aliases for Ucrypto algorithm-only Cipher transformations.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • security-libs
    • None


        On Solaris, people requesting "AES" algorithm will get bounced over to SunPKCS11 if no provider specified, or NoSuchAlgorithmException if OracleUcrypto provider is requested.

        import java.net.*;
        import javax.crypto.*;

        public class TestClass {

            public static void main(String args[]) throws Exception {
                Cipher c;

                try {
                    c = Cipher.getInstance("AES", "OracleUcrypto");
                } catch (Exception e) {
                    System.out.println(e);
                }

                c = Cipher.getInstance("AES");
                System.out.println(c.getProvider());

                c = Cipher.getInstance("AES/ECB/PKCS5Padding", "OracleUcrypto");
                System.out.println(c.getProvider());
            }
        }

        % java TestClass
        java.security.NoSuchAlgorithmException: No such algorithm: AES
        SunPKCS11-Solaris version 1.7
        OracleUcrypto version 1.0

              valeriep Valerie Peng
              wetmore Bradford Wetmore
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: