Class WorkloadCertificateUtils (2.91.0)

public class WorkloadCertificateUtils

Internal utility class for managing dynamic workload certificates.

Inheritance

java.lang.Object > WorkloadCertificateUtils

Static Methods

getCertificateFingerprint(String certPath)

public static String getCertificateFingerprint(String certPath)

Computes the SHA-256 fingerprint of the certificate file at certPath, returning "" if the path is null, unreadable, empty (e.g., temporarily truncated to 0 bytes mid-write by an external certificate rotator), or hashes to the empty-byte digest.

Returning "" on unreadable or empty files ensures callers (shouldRefresh() and refresh()) safely skip refreshing during transient mid-write states rather than treating an empty digest as a certificate rotation mismatch.

Parameter
Name Description
certPath String
Returns
Type Description
String