Skip to content

Accept EC and Ed25519 client certificate keys - #431

Open
wtn wants to merge 1 commit into
hashicorp:masterfrom
wtn:pkey
Open

wtn wants to merge 1 commit into
hashicorp:masterfrom
wtn:pkey

Conversation

@wtn

@wtn wtn commented Nov 17, 2026

Copy link
Copy Markdown

Vault::Client loads the client key from ssl_pem_file or ssl_pem_contents with OpenSSL::PKey::RSA.new, so a client certificate with an EC or Ed25519 key fails on the first request. step-ca and SPIRE issue client certificates with EC P-256 keys by default.

pem = cert.to_pem + OpenSSL::PKey::EC.generate("prime256v1").private_to_pem # cert matches the EC key
client = Vault::Client.new(address: "https://vault.example:8200", ssl_pem_contents: pem)
client.get("/v1/sys/health")
#=> OpenSSL::PKey::PKeyError: incorrect pkey type: id-ecPublicKey

The client key is now loaded with OpenSSL::PKey.read, which accepts RSA, EC and Ed25519 keys.

Vault::Client loaded the client key from ssl_pem_file or
ssl_pem_contents with OpenSSL::PKey::RSA.new, which rejects EC and
Ed25519 keys. Load the key with OpenSSL::PKey.read instead.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@wtn
wtn requested a review from a team as a code owner November 17, 2026 17:43
@hashicorp-cla-app

hashicorp-cla-app Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app

Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant