on 2020 Sep 16 2:48 PM
Hello everyone.
I am trying to access keystore from UDF in my mapping and get public key from certificate. Version of SAP PI 7.5 SP15
My code is:
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.PublicKey;
import com.sap.aii.security.lib;
import com.sap.engine.interfaces.keystore.KeystoreManager;<br>
public String getPublicKey(String view, String alias, Container container) throws StreamTransformationException{ KeyStore keystore = getKeystore(view);
PublicKey publicKey = null;
try {
publicKey = keystore.getCertificate(alias).getPublicKey();
if (publicKey == null) {
return "public key is null";
}
} catch (Exception e) {
e.printStackTrace();
}
return publicKey;
}<br>
But while I am importing libraries - I am getting the following error:
error: package com.sap.aii.security.lib does not existimport com.sap.aii.security.lib;
error: package com.sap.engine.interfaces.keystore does not exist
import com.sap.engine.interfaces.keystore.KeystoreManager;
Could you please help. What is incorrect here?
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi Olesya,
I think the import statements are not correct. From my memories they should look like these:
import com.sap.aii.security.lib.KeyStoreManager;
//... or more generic
import com.sap.aii.security.lib.*;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
12 | |
9 | |
8 | |
8 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.