cancel
Showing results for 
Search instead for 
Did you mean: 

Obtain Public Key

Former Member
0 Kudos

We are developing an application to communicate BSP with other system. For secure communication we must implement the "Public-key technology" with Digital Signed.

From a BSP Application a String (XML) is send to another system. The string must be encrypted(signed) by private key. When the string is received by the other system, it must be decrypted (verified) with a public key (dispatched previously).

We have used a SSF_KRN_SIGN_BY_AS function, and it covers almost all the requirements, but we need to send a pubic key to the receiver in text format:

-

-


BEGIN PUBLIC KEY-----

MIIBgjCCAUICAQAwCQYHKoZIzjgEAzAOMQwwCgYDVQQDEwNXQVMwHhc

NOTcxMDAx....

....

...

-

-


END PUBLIC KEY-----

The SSF_KRN_SIGN_BY_AS uses .pse files and from this type of file the public key cannot be obtained in text format (transaction STRUST).

Is it possible to obtain the public key from a WAS ABAP system in text format?

Version WAS ABAP

Component Versión Netweaver 04

Component Release Level SP

SAP_BASIS 640 0010 SAPKB64010

SAP_ABA 640 0010 SAPKA64010

Best Regards,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Carmen,

I think you already have installed the sapcryptolib. So you can use the program sapgenpse on OS level.

Try e.g.

sapgenpse -h (to display command syntax)

sapgenpse -h gen_pse (to display option of gen_pse command)

or read the docu of sapgenpse

regards

jürgen

gregorw
Active Contributor
0 Kudos

Hello Carmen,

normaly the Public Keys of the communicating sytems is exchanged only once and imported into STRUST. Then this keys are ready to use them to verify, decrypt and encrypt.

Regards

Gregor

Former Member
0 Kudos

Hi Gregor,

I know the transaction STRUST, but I need obtain Public Key in text format... like a:

-


BEGIN PUBLIC KEY-----

MIIBgjCCAUICAQAwCQYHKoZIzjgEAzAOMQwwCgYDVQQDEwNXQVMwHhc

NOTcxMDAx....

....

AwCQYHKoZIzjgEAzAOMQwwCgYDAOMQwwCgYDVQQDEwNDVQQDE=

-


END PUBLIC KEY-----

Some idea??

Kind regards

Former Member
0 Kudos

You can convert between formats using the openssl toolkit. (http://www.openssl.org).

You can export your certificate and convert using a syntax like:

openssl x509 -in cert.der -inform DER -out cert.pem -outform PEM

(from memory....)

-AD