Skip to content

Commit

Permalink
Remove Sun.Java dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
hwupathum committed Nov 11, 2024
1 parent 334819f commit dfd3290
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
import org.wso2.identity.integration.test.restclients.OAuth2RestClient;
import org.wso2.identity.integration.test.util.Utils;
import org.wso2.identity.integration.test.utils.OAuth2Constant;
import sun.security.provider.X509Factory;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -116,6 +115,8 @@ public class OAuth2ServiceAbstractIntegrationTest extends ISIntegrationTest {
private static final String customClaimURI2 = "http://wso2.org/claims/stateorprovince";
private static final String GRANT_TYPE_PASSWORD = "password";
private static final String SCOPE_PRODUCTION = "PRODUCTION";
private static final String BEGIN_CERT = "-----BEGIN CERTIFICATE-----";
private static final String END_CERT = "-----END CERTIFICATE-----";
public static final String OIDC = "oidc";
public static final String SAML = "saml";
private final static int TOMCAT_PORT = 8490;
Expand Down Expand Up @@ -912,10 +913,8 @@ public void updateApplicationCertificate(String appId, X509Certificate sp1X509Pu
*/
public String convertToPem(X509Certificate x509Certificate) throws CertificateEncodingException {

String certBegin = X509Factory.BEGIN_CERT;
String endCert = X509Factory.END_CERT;
String pemCert = new String(java.util.Base64.getEncoder().encode(x509Certificate.getEncoded()));
return certBegin + pemCert + endCert;
String pemCert = new String(java.util.Base64.getEncoder().encode(x509Certificate.getEncoded()));
return BEGIN_CERT + pemCert + END_CERT;
}

/**
Expand Down

0 comments on commit dfd3290

Please sign in to comment.