Skip to content

Commit

Permalink
documentation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemas committed Nov 15, 2024
1 parent 13b5886 commit e419b99
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crypto/evp_extra/evp_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@
#include "internal.h"
#include "../dilithium/internal.h"

// The function parse_key_type takes the algorithm cbs sequence |cbs| and
// extracts the OID. The OID is then searched against ASN.1 methods for a method
// with that OID. As the |OID| is read from |cbs| the buffer is advanced.
// parse_key_type takes the algorithm cbs sequence |cbs| and extracts the OID.
// The OID is then searched against ASN.1 methods for a method with that OID.
// As the |OID| is read from |cbs| the buffer is advanced.
// For the case of |NID_rsa| the method |rsa_asn1_meth| is returned.
// For the case of |EVP_PKEY_PQDSA| the method |pqdsa_asn1.meth| is returned, as
// the OID is not returned (and the |cbs| buffer is advanced) we return the OID
// as |cbs|. (This allows the specific OID, e.g. NID_MLDSA65 to be parsed to
// type specific decoding functions within the algorithm parameter.
// as |cbs|. (This allows the specific OID, e.g. NID_MLDSA65 to be parsed by
// the type-specific decoding functions within the algorithm parameter.)
static const EVP_PKEY_ASN1_METHOD *parse_key_type(CBS *cbs) {
CBS oid;
if (!CBS_get_asn1(cbs, &oid, CBS_ASN1_OBJECT)) {
Expand All @@ -101,7 +101,7 @@ static const EVP_PKEY_ASN1_METHOD *parse_key_type(CBS *cbs) {
}

#ifdef ENABLE_DILITHIUM
// if |cbs| is empty after parsing |oid| from it), we overwrite the contents
// if |cbs| is empty after parsing |oid| from it, we overwrite the contents
// with |oid| so that we can call pub_decode/priv_decode with the |algorithm|
// populated as |oid|.
if (CBS_len(cbs) == 0) {
Expand Down

0 comments on commit e419b99

Please sign in to comment.