elastic / elastic-transport-js

Transport classes and utilities shared among Node.js Elastic client libraries
Apache License 2.0
4 stars 24 forks source link

CA fingerprint comparison of SHA-256 strings should support both colon-separated hex string and lowercase string #107

Open JoshMock opened 1 week ago

JoshMock commented 1 week ago

🐛 Bug Report

As noted in https://github.com/observablehq/framework/pull/1490, the caFingerprint option fails when comparing a SHA-256 string that is provided as all lowercase, no colons (e.g. a1b2c3d4 rather than A1:B2:C3:D4). The lowercase format is what Elasticsearch prints to the console on startup, which fails the string comparison and is a confusing experience. All fingerprints should be normalized to the same format before comparison.