< prev index next >

test/jdk/sun/security/rsa/pss/TestPSSKeySupport.java

Print this page
*** 21,11 ***
   * questions.
   */
  
  /**
   * @test
!  * @bug 8146293 8242556
   * @summary Test RSASSA-PSS Key related support such as KeyPairGenerator
   * and KeyFactory of the SunRsaSign provider
   */
  
  import java.io.*;
--- 21,11 ---
   * questions.
   */
  
  /**
   * @test
!  * @bug 8146293 8242556 8172366
   * @summary Test RSASSA-PSS Key related support such as KeyPairGenerator
   * and KeyFactory of the SunRsaSign provider
   */
  
  import java.io.*;

*** 143,13 ***
              MGF1ParameterSpec.SHA256, 32, 1);
          kpg.initialize(new RSAKeyGenParameterSpec(2048, pubExp, params));
          KeyPair kp2 = kpg.generateKeyPair();
          checkKeyPair(kp2);
  
          KeyFactory kf = KeyFactory.getInstance(ALGO, "SunRsaSign");
          test(kf, kp.getPublic());
          test(kf, kp.getPrivate());
          test(kf, kp2.getPublic());
          test(kf, kp2.getPrivate());
! 
      }
  }
--- 143,20 ---
              MGF1ParameterSpec.SHA256, 32, 1);
          kpg.initialize(new RSAKeyGenParameterSpec(2048, pubExp, params));
          KeyPair kp2 = kpg.generateKeyPair();
          checkKeyPair(kp2);
  
+         params = new PSSParameterSpec("SHA3-256", "MGF1",
+             new MGF1ParameterSpec("SHA3-256"), 32, 1);
+         kpg.initialize(new RSAKeyGenParameterSpec(2048, pubExp, params));
+         KeyPair kp3 = kpg.generateKeyPair();
+         checkKeyPair(kp3);
+ 
          KeyFactory kf = KeyFactory.getInstance(ALGO, "SunRsaSign");
          test(kf, kp.getPublic());
          test(kf, kp.getPrivate());
          test(kf, kp2.getPublic());
          test(kf, kp2.getPrivate());
!         test(kf, kp3.getPublic());
+         test(kf, kp3.getPrivate());
      }
  }
< prev index next >