summaryrefslogtreecommitdiff
path: root/src/crypto/evp/p_rsa_asn1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/evp/p_rsa_asn1.c')
-rw-r--r--src/crypto/evp/p_rsa_asn1.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/crypto/evp/p_rsa_asn1.c b/src/crypto/evp/p_rsa_asn1.c
index 866fc594..3231ffb6 100644
--- a/src/crypto/evp/p_rsa_asn1.c
+++ b/src/crypto/evp/p_rsa_asn1.c
@@ -77,7 +77,7 @@ void EVP_set_buggy_rsa_parser(int buggy) {
}
static int rsa_pub_encode(CBB *out, const EVP_PKEY *key) {
- /* See RFC 3279, section 2.3.1. */
+ // See RFC 3279, section 2.3.1.
CBB spki, algorithm, oid, null, key_bitstring;
if (!CBB_add_asn1(out, &spki, CBS_ASN1_SEQUENCE) ||
!CBB_add_asn1(&spki, &algorithm, CBS_ASN1_SEQUENCE) ||
@@ -101,9 +101,9 @@ static int rsa_pub_decode(EVP_PKEY *out, CBS *params, CBS *key) {
buggy = g_buggy;
CRYPTO_STATIC_MUTEX_unlock_read(&g_buggy_lock);
- /* See RFC 3279, section 2.3.1. */
+ // See RFC 3279, section 2.3.1.
- /* The parameters must be NULL. */
+ // The parameters must be NULL.
CBS null;
if (!CBS_get_asn1(params, &null, CBS_ASN1_NULL) ||
CBS_len(&null) != 0 ||
@@ -112,12 +112,12 @@ static int rsa_pub_decode(EVP_PKEY *out, CBS *params, CBS *key) {
return 0;
}
- /* Estonian IDs issued between September 2014 to September 2015 are
- * broken. See https://crbug.com/532048 and https://crbug.com/534766.
- *
- * TODO(davidben): Switch this to the strict version in March 2016 or when
- * Chromium can force client certificates down a different codepath, whichever
- * comes first. */
+ // Estonian IDs issued between September 2014 to September 2015 are
+ // broken. See https://crbug.com/532048 and https://crbug.com/534766.
+ //
+ // TODO(davidben): Switch this to the strict version in March 2016 or when
+ // Chromium can force client certificates down a different codepath, whichever
+ // comes first.
RSA *rsa = buggy ? RSA_parse_public_key_buggy(key) : RSA_parse_public_key(key);
if (rsa == NULL || CBS_len(key) != 0) {
OPENSSL_PUT_ERROR(EVP, EVP_R_DECODE_ERROR);
@@ -153,7 +153,7 @@ static int rsa_priv_encode(CBB *out, const EVP_PKEY *key) {
}
static int rsa_priv_decode(EVP_PKEY *out, CBS *params, CBS *key) {
- /* Per RFC 3447, A.1, the parameters have type NULL. */
+ // Per RFC 3447, A.1, the parameters have type NULL.
CBS null;
if (!CBS_get_asn1(params, &null, CBS_ASN1_NULL) ||
CBS_len(&null) != 0 ||
@@ -189,7 +189,7 @@ static void int_rsa_free(EVP_PKEY *pkey) { RSA_free(pkey->pkey.rsa); }
const EVP_PKEY_ASN1_METHOD rsa_asn1_meth = {
EVP_PKEY_RSA,
- /* 1.2.840.113549.1.1.1 */
+ // 1.2.840.113549.1.1.1
{0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01}, 9,
rsa_pub_decode,