cancel
Showing results for 
Search instead for 
Did you mean: 

DC Usages for JAVA SSL Client

Former Member
0 Kudos

Hello,

I am currently struggling on implementing a java client, that is able to call an url via HTTPS.

HTTP URL calls are working fine, but HTTPs is not working.

I found already the piece of code, whis is missing, but I cannot implement until I have found the DCs from SAP_JEE or SAP_JTECHS, which contain the following classes.

- SecureConnectionFactory

- KeystoreManager

My piece of code for SSL Support:


			// setup connection
			serverURL = ApplicationProperties.getProperty("partminer.url.request");
			if (null != serverURL && serverURL.startsWith("https")) {
				InitialContext ctx = ctx = new InitialContext();
				Object o = (Object) ctx.lookup("keystore");
				KeystoreManager manager = (KeystoreManager) o;
				KeyStore keyStore = manager.getKeystore("DEFAULT");
				// Create factory
				SecureConnectionFactory factory = new SecureConnectionFactory(keyStore, null);
				// Create the HTTPS connection
				con = factory.createURLConnection(serverURL);
			} else {
				URL url = new URL(serverURL);
				con = (HttpURLConnection) url.openConnection();
			}

Can anyone please let me know, which DC are to be used by my java client DC ?

Thank you,

Stefan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

Have you solved your problem in accessing own ketstore-view (MYSTORE), please let me know the solution if you have solved.

KeyStore keyStore = manager.getKeystore("MYSTORE");

Caused by: java.rmi.RemoteException: com.sap.engine.services.keystore.exceptions.BaseRemoteException: Remote call errored

Caused by: com.sap.engine.services.keystore.exceptions.BaseKeystoreException: Application is not authorized to execute keystore operation [

Caused by: java.security.AccessControlException: access denied

Please advice.

Thanks

MMK