qUEnbcAr
qUEnbcAr

Reputation: 61

List all TLS versions and ciphers a server supports using Axios?

I'd like to use Axios to get a list of TLS versions and ciphers supported by a server.

Are there properties or functions in the request or response object that expose these values?

I'm familiar with request.connection.ssl.getCurrentCipher(), but this only returns the cipher currently being used.

Example:

const axios = require('axios').default;

axios.head('https://example.com').then(r => {
  return r.somePropertyOrMethodForTLSVersionsAndCiphers // ??
});

Related article using TLS library, not axios, and for the client not the server: List all TLS Ciphers the Client supports in Nodejs

Upvotes: 0

Views: 1161

Answers (1)

Steffen Ullrich
Steffen Ullrich

Reputation: 123260

A TLS client has no visibility in what the server supports. The client just offers a number of ciphers and the server accepts a single one. No information are provided to the client of what others ciphers the server might support.

The client would basically need to actually try all the ciphers by their own to see if a specific cipher is supported or not, i.e. do lots of TLS handshakes to figure out the supported ciphers. Similar for the TLS protocol version the client can only try to connect with a specific protocol and check with which protocol the server responds.

Upvotes: 2

Related Questions