Skip to content

Commit

Permalink
[INJIVEr-587] - test fix
Browse files Browse the repository at this point in the history
Signed-off-by: Sreenadh S <[email protected]>
  • Loading branch information
sree96 committed Dec 23, 2024
1 parent e6bf2aa commit 1e1c22d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.junit.jupiter.api.Test;

import java.security.interfaces.RSAPublicKey;
import java.util.Base64;

public class SecurityUtilsTest {

Expand All @@ -27,8 +28,9 @@ public void shouldNotReturnNullForValidPublicKey() throws Exception {
"Q8tqKn8P0B00vto8bEhadIpj53efNTTMmP6fnLhFEX+xOWVp4lJi8qM4Y0UMbbnx\n"+
"ewIDAQAB\n"+
"-----END PUBLIC KEY-----";
byte[] encoded = Base64.getEncoder().encode(pemString.getBytes());

RSAPublicKey publicKey = SecurityUtils.readX509PublicKey(pemString);
RSAPublicKey publicKey = SecurityUtils.readX509PublicKey(new String(encoded));

assertNotNull(publicKey);
}
Expand Down

0 comments on commit 1e1c22d

Please sign in to comment.