net: lib: tls_credentials: Rename TLS_CREDENTIAL_SERVER_CERTIFICATE

TLS_CREDENTIAL_SERVER_CERTIFICATE credential type is misleading, as in
fact it just represents a public certificate, it does not matter if the
certificate belongs to a server or a client. And actually, it was
already used in-tree for clients as well, for example in LwM2M.

Therefore rename the credential type to a more generic
TLS_CREDENTIAL_PUBLIC_CERTIFICATE and deprecate the old one.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2025-03-19 12:45:41 +01:00 committed by Benjamin Cabé
commit a61287e876
19 changed files with 42 additions and 31 deletions

View file

@ -450,7 +450,7 @@ void TSSLSocketFactory::loadCertificateFromBuffer(const char *aCertificate, cons
if (strcmp(format, "PEM") == 0) {
const int status = tls_credential_add(Thrift_TLS_SERVER_CERT_TAG,
TLS_CREDENTIAL_SERVER_CERTIFICATE,
TLS_CREDENTIAL_PUBLIC_CERTIFICATE,
aCertificate, strlen(aCertificate) + 1);
if (status != 0) {