abap news
Home » SAP STRUST: Install an SSL Certificate for Outbound HTTPS

SAP STRUST: Install an SSL Certificate for Outbound HTTPS

SAPBy xabap Published Updated
Installing an SSL certificate in SAP STRUST

Last updated:

When ABAP calls an HTTPS service, SAP must trust the certificate chain of that server. Import the root certificate (and an intermediate certificate if the server does not send it) into the SSL client PSE used by the call. Do this in transaction STRUST.

Root or server certificate?

Server certificates are renewed often. If you trust only the current server certificate, a renewal can break the connection. A root certificate is valid far longer and covers every certificate issued under it, which is also how web browsers work. Check the validity dates in the certificate rather than assuming a fixed lifetime.

1. Export the certificate

In Chrome, open the site, view the certificate and select the root in the certificate hierarchy. Export it as a Base64 file.

Installing an SSL certificate in SAP STRUST (step 1)
Installing an SSL certificate in SAP STRUST (step 2)
Installing an SSL certificate in SAP STRUST (step 3)

Compare the fingerprint with the one published by the certificate authority before you trust it.

2. Import it in STRUST

  1. Open STRUST and switch to change mode.
  2. Select the PSE your call uses: SSL client (Anonymous) for ssl_id = 'ANONYM', SSL client (Standard) for 'DFAULT', or the PSE named in the SM59 destination.
  3. Import the certificate and choose Add to Certificate List.
  4. Save. If the new certificate is not picked up, restart the ICM in SMICM with your administrator.

You only need to change the PSE that is used.

3. Test

Run the connection test of the SM59 destination or call the service from ABAP.

Message Likely cause
SSSLERR_PEER_CERT_UNTRUSTED Root or intermediate certificate missing in this PSE
SSSLERR_SERVER_CERT_MISMATCH Host name is not covered by the certificate
Handshake failure Protocol or cipher not supported; check the SMICM trace