Skip to content

In what cases are updates by TSSslSecretSet() actually used? #9562

@ywkaras

Description

@ywkaras

I'm running a test with this ssl_multicert.config file:

dest_ip=* ssl_cert_name=2050.crt ssl_key_name=private.key

The cert in 2050.crt expires in the year 2050. The steps of the test are:

  1. Execute a curl that makes a TLS connection, but does not authenticate the received server cert, with verbose output enabled.
  2. Use TSSslSecretSet()/TSSslSecretUpdate() to change the 2050.crt to one that is identical, except for expiring in 2060.
  3. Repeat the same curl command.

Here is the debug trace output with the debug regex ssl: https://gist.github.com/ywkaras/a7b511a290d62627be18ba301653944c
The update of the cert can be seen starting a line 201. However, the expiration date in the verbose output in the second curl does not change. Presumably this means the new cert is not used.

I notice that, in this function:

params->getCTX(certFilePath, keyFilePath, caCertFilePath.empty() ? params->clientCACertFilename : caCertFilePath.c_str(),

getCTX() is only called in the client case, not the server case. Does this limit the cases where updates to secrets are actually used?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions