Commit 80873ec3 authored by David Benjamin's avatar David Benjamin Committed by Daniel Bevenius
Browse files

crypto: fix public key encoding name in comment

PKCS#8 describes an encoding for private keys, not public keys. Using
the name as a format usually refers to the PrivateKeyInfo structure it
defines. (Or sometimes the EncryptedPrivateKeyInfo variant or the
little-used OneAsymmetricKey extension defined in RFC 5958.) None of
these structures can hold public keys to begin with.

d2i_PUBKEY actually parses the public key analogous format defined in
X.509, SubjectPublicKeyInfo. This function already uses "X.509" to refer
to an entire certificate, so say SubjectPublicKeyInfo in the comment.

(The abbreviation SPKI sometimes refers to SubjectPublicKeyInfo, e.g. in
RFC 7469, but it can also an alternate S-expression-based PKI to X.509,
Simple Public Key Infrastructure. To avoid confusion, stick with the
expanded name.)

PR-URL: https://github.com/nodejs/node/pull/25736


Reviewed-By: default avatarSam Roberts <vieuxtech@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 7c9fba30
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment