Hi community! This is my first blog post and I hope it might help you all to Run Simple.

One of the steps in setting up SSL in the NetWeaver Application Server ABAP is configuring the available TLS protocol versions and the cipher suites.

In some scenarios, selecting the correct values can be confusing and laborious. However, there is a very useful tool, described in SAP Note 510007, that go unnoticed for most of the readers.
The “sapgenpse tlsinfo” can be used to check the results of particular configurations of the ‘ssl/ciphersuites’ and ‘ssl/client_ciphersuites’ parameters.

The motivation of this post is to show some properties and some examples about this tool.

1. The ‘sapgenpse tlsinfo’

Obviously, the CommonCryptoLib must be correctly installed in order to use this command. It can be run on OS level or using the ‘RSBDCOS0’ report in ‘SE38’ transaction.

The correct syntax is:

sapgenpse tlsinfo [options] <TLS configuration>

There are a lot of options and the purpose of this post is not to explain all of them. For more information run: ‘sapgenpse tlsinfo -h’.

What matters here is the <TLS configuration> field. This is where you put the selected values from the ‘ssl/ciphersuites’ parameter.

I’m running all examples in my own test system, which has the CommonCryptoLib 8.5.6 installed.

2.1 Cipher suites

First, let’s check the default values enabled TLS settings for a 742+ release as example. This can be done by running:

‘sapgenpse tlsinfo HIGH:MEDIUM:+e3DES’.

The expected result should be all HIGH cipher suites with the highest preference, followed by the MEDIUM category and the +e3DES cipher suite at the end.
Notice that the ‘TLS_RSA_WITH_3DES_EDE_CBC_SHA’ cipher suite is in the HIGH category, but appears at the end. This is what the ‘+’ operator stands for: Scan current result list. Move matching items to the end of the result list.

The result of the previous command is:

Running in server mode
Configured protocol versions:
TLSv1.0, TLSv1.1, TLSv1.2
Enabled cipher suites:
TLS_RSA_WITH_AES128_GCM_SHA256
TLS_RSA_WITH_AES256_GCM_SHA384
TLS_RSA_WITH_AES128_CBC_SHA
TLS_RSA_WITH_AES256_CBC_SHA
TLS_RSA_WITH_RC4_128_SHA
TLS_RSA_WITH_RC4_128_MD5
TLS_RSA_WITH_3DES_EDE_CBC_SHA
(!)Elliptic curves were disabled by cipher suite configuration
(!)As no ECC cipher suites were enabled, elliptic curves will not be used with this configuration
Other options:
TLS version fallback protection support OFF

This matches perfectly with the expected results. It can be checked in the table presented in SAP Note 510007 (pay attention to the ‘NOTE:’ below the table in Section 6).

2.2 Modifying the order

Changing the categories order in the <TLS configuration> will modify the enabled chiper suites preference. Let’s see what happens  when we move the MEDIUM category to the beginning.

Running ‘sapgenpse tlsinfo MEDIUM:HIGH:+e3DES’:

Enabled cipher suites:
TLS_RSA_WITH_RC4_128_SHA
TLS_RSA_WITH_RC4_128_MD5
TLS_RSA_WITH_AES128_GCM_SHA256
TLS_RSA_WITH_AES256_GCM_SHA384
TLS_RSA_WITH_AES128_CBC_SHA
TLS_RSA_WITH_AES256_CBC_SHA
TLS_RSA_WITH_3DES_EDE_CBC_SHA

As we can see, the cipher suites in the MEDIUM category have the highest preference now.

3.1 Protocols

A number value (protocol version flags) can be inserted at the beginning of the SSL/TLS cipher suites strings in profile parameters to select the desired protocol versions.
Let’s take a look at the result of ‘sapgenpse tlsinfo 128:HIGH:MEDIUM:+e3DES’

Running in server mode
Configured protocol versions:
TLSv1.0
Enabled cipher suites:
TLS_RSA_WITH_AES128_CBC_SHA
TLS_RSA_WITH_AES256_CBC_SHA
TLS_RSA_WITH_RC4_128_SHA
TLS_RSA_WITH_RC4_128_MD5
TLS_RSA_WITH_3DES_EDE_CBC_SHA
(!)Elliptic curves were disabled by cipher suite configuration
(!)As no ECC cipher suites were enabled, elliptic curves will not be used with this configuration
Other options:
TLS version fallback protection support OFF

Here, the only protocol available is the TLSv1.0, which corresponds to the ‘128’ value. Also, notice that the first two cipher suites in the 2.2 example are now gone.
This is correct, since both are only available to TLSv1.2, as described in the ‘NOTE:’ below the Section 6 table.

3.2 Enabling more protocols

Lets say you want to use only TLSv1.1 in your application server. The correct procedure will be select the ‘256’ value, right?

Well, no.

Testing the ‘sapgenpse tlsinfo 256:HIGH:MEDIUM:+e3DES’ :

Running in server mode
Configured protocol versions:
TLSv1.0, TLSv1.1
Enabled cipher suites:
TLS_RSA_WITH_AES128_CBC_SHA
TLS_RSA_WITH_AES256_CBC_SHA
TLS_RSA_WITH_RC4_128_SHA
TLS_RSA_WITH_RC4_128_MD5
TLS_RSA_WITH_3DES_EDE_CBC_SHA
(!)Elliptic curves were disabled by cipher suite configuration
(!)As no ECC cipher suites were enabled, elliptic curves will not be used with this configuration
Other options:
TLS version fallback protection support OFF

It may look incorrect, but this is the expected result. In fact, TLSv1.0 will be automatically enabled, unless we explicit disabled it. The correct way to do is adding the ’32’ bit-flag value to the values already selected.

Now, running with 256+32 value:

‘sapgenpse tlsinfo 288:HIGH:MEDIUM:+e3DES’

Running in server mode
Configured protocol versions:
TLSv1.1 (Strict Protocol Version Mode)
Enabled cipher suites:
TLS_RSA_WITH_AES128_CBC_SHA
TLS_RSA_WITH_AES256_CBC_SHA
TLS_RSA_WITH_RC4_128_SHA
TLS_RSA_WITH_RC4_128_MD5
TLS_RSA_WITH_3DES_EDE_CBC_SHA
(!)Elliptic curves were disabled by cipher suite configuration
(!)As no ECC cipher suites were enabled, elliptic curves will not be used with this configuration
Other options:
TLS version fallback protection support OFF

we can see that only TLSv1.1 will be enabled.

4. Conclusion

This tool is very helpful to understand and confirm all the possibilities when selecting the ‘ssl/ciphersuites’ parameters. I hope this clarifies some points related to this parameters and help everyone who needs to configure SSL in the ABAP Application Server.

For now, this is it. Stay tunned for more posts.

5. Additional information

510007 : Setting up SSL on Application Server ABAP

RFC 7525 : Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)

RFC 5246 : The Transport Layer Security (TLS) Protocol Version 1.2

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Florian Henninger

    Hi Geferson,

     

    nice one. Wasn’t aware to have such an easy solution to test it. I’m not the main basis-guy but of course, everyone touches it when it comes to problems:-)

    And go on writing blogs. Nicely written and looking forward to get some additional on that topic:-)

    ~Florian

    (2) 
  2. Matt Fraser

    Agreed with Florian, excellent and useful blog. Understanding how to influence the preferred order of ciphersuites has always seemed like one of the most arcane things, and previously I’ve relied on more of a trial-and-error approach for this, which is time-consuming to say the least.

    Can we expect some further discussion about the different ciphersuites and why we might prefer a particular order? For instance, why does 3DES default to a lower priority than the RC4 suites, or why is AES128 higher priority than AES256? Perhaps it’s already out there somewhere, but I’d love to see a blog discussing this in more detail.

     

    (0) 
    1. Geferson Hess Post author

      Hi Matt,

      Thank you for the feedback and the ideas.

      The RFC 7525 has a complete discussion about the protocols and cipher suites. In this section you could check the recommended ones.

      (1) 

Leave a Reply