diff options
author | Pauli <pauli@openssl.org> | 2021-05-31 14:28:45 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-06-02 16:30:15 +1000 |
commit | 69e21cb648f140c173ba238a761ce700bef643f6 (patch) | |
tree | c105cb42bf531d26bfe6330a0bfda117982ac310 /crypto | |
parent | 1c8c5d4755cb4bd7fec527071f81a522834759c4 (diff) |
x509: remove TODOs
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15539)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/x509/t_x509.c | 6 | ||||
-rw-r--r-- | crypto/x509/v3_addr.c | 1 | ||||
-rw-r--r-- | crypto/x509/v3_bcons.c | 1 | ||||
-rw-r--r-- | crypto/x509/v3_utl.c | 1 | ||||
-rw-r--r-- | crypto/x509/x509_lu.c | 1 | ||||
-rw-r--r-- | crypto/x509/x509_vfy.c | 7 | ||||
-rw-r--r-- | crypto/x509/x_pubkey.c | 1 |
7 files changed, 3 insertions, 15 deletions
diff --git a/crypto/x509/t_x509.c b/crypto/x509/t_x509.c index bdfb4cb08b..8b84792b05 100644 --- a/crypto/x509/t_x509.c +++ b/crypto/x509/t_x509.c @@ -523,11 +523,5 @@ int X509_STORE_CTX_print_verify_cb(int ok, X509_STORE_CTX *ctx) BIO_free(bio); } - /* - * TODO we could check policies here too, e.g.: - * if (cert_error == X509_V_OK && ok == 2) - * policies_print(NULL, ctx); - */ - return ok; } diff --git a/crypto/x509/v3_addr.c b/crypto/x509/v3_addr.c index 4e0403844e..8bb35bd8a3 100644 --- a/crypto/x509/v3_addr.c +++ b/crypto/x509/v3_addr.c @@ -140,7 +140,6 @@ static int i2r_address(BIO *out, return 0; BIO_printf(out, "%d.%d.%d.%d", addr[0], addr[1], addr[2], addr[3]); break; - /* TODO possibly combine with ipaddr_to_asc() */ case IANA_AFI_IPV6: if (!addr_expand(addr, bs, 16, fill)) return 0; diff --git a/crypto/x509/v3_bcons.c b/crypto/x509/v3_bcons.c index 2fabcd900e..6e7a165f26 100644 --- a/crypto/x509/v3_bcons.c +++ b/crypto/x509/v3_bcons.c @@ -72,7 +72,6 @@ static BASIC_CONSTRAINTS *v2i_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, } else if (strcmp(val->name, "pathlen") == 0) { if (!X509V3_get_value_int(val, &bcons->pathlen)) goto err; - /* TODO add sanity check on int value - at least, must be >= 0 */ } else { ERR_raise(ERR_LIB_X509V3, X509V3_R_INVALID_NAME); X509V3_conf_add_error_name_value(val); diff --git a/crypto/x509/v3_utl.c b/crypto/x509/v3_utl.c index 6da3fdfa52..255db422bd 100644 --- a/crypto/x509/v3_utl.c +++ b/crypto/x509/v3_utl.c @@ -991,7 +991,6 @@ char *ossl_ipaddr_to_asc(unsigned char *p, int len) case 4: /* IPv4 */ BIO_snprintf(buf, sizeof(buf), "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); break; - /* TODO possibly combine with static i2r_address() in v3_addr.c */ case 16: /* IPv6 */ for (out = buf, i = 8, remain = sizeof(buf); i-- > 0 && bytes >= 0; diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c index b36ddb69a1..3b76b92f71 100644 --- a/crypto/x509/x509_lu.c +++ b/crypto/x509/x509_lu.c @@ -541,7 +541,6 @@ STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(const X509_STORE *v) return v->objs; } -/* TODO param type could be constified as change to lock is intermittent */ STACK_OF(X509) *X509_STORE_get1_all_certs(X509_STORE *store) { STACK_OF(X509) *sk; diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 278b8b6765..bb54a064bc 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -553,7 +553,6 @@ static int check_extensions(X509_STORE_CTX *ctx) CB_FAIL_IF(x->altname != NULL && sk_GENERAL_NAME_num(x->altname) <= 0, ctx, x, i, X509_V_ERR_EMPTY_SUBJECT_ALT_NAME); - /* TODO add more checks on SAN entries */ /* Check sig alg consistency acc. to RFC 5280 section 4.1.1.2 */ CB_FAIL_IF(X509_ALGOR_cmp(&x->sig_alg, &x->cert_info.signature) != 0, ctx, x, i, X509_V_ERR_SIGNATURE_ALGORITHM_INCONSISTENCY); @@ -2088,8 +2087,9 @@ X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer, rvn = sk_X509_REVOKED_value(revs, i); /* - * Add only if not also in base. TODO: need something cleverer here - * for some more complex CRLs covering multiple CAs. + * Add only if not also in base. + * Need something cleverer here for some more complex CRLs covering + * multiple CAs. */ if (!X509_CRL_get0_by_serial(base, &rvtmp, &rvn->serialNumber)) { rvtmp = X509_REVOKED_dup(rvn); @@ -2101,7 +2101,6 @@ X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer, } } } - /* TODO: optionally prune deleted entries */ if (skey != NULL && md != NULL && !X509_CRL_sign(crl, skey, md)) goto memerr; diff --git a/crypto/x509/x_pubkey.c b/crypto/x509/x_pubkey.c index 7ae35f21fd..c21184d964 100644 --- a/crypto/x509/x_pubkey.c +++ b/crypto/x509/x_pubkey.c @@ -225,7 +225,6 @@ X509_PUBKEY *X509_PUBKEY_dup(const X509_PUBKEY *a) return pubkey; } -/* TODO should better be called X509_PUBKEY_set1 */ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) { X509_PUBKEY *pk = NULL; |