]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Removed all FIXME comments in code [ci skip]
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 15 Mar 2019 16:00:17 +0000 (17:00 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 16 Mar 2019 18:44:14 +0000 (19:44 +0100)
We expand informational comments on limitations, but with removing
FIXME (keyword didn't help fixing these), and remove completely unhelpful
comments, obsolete ones, or comments about ideas.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
13 files changed:
lib/algorithms/kx.c
lib/buffers.c
lib/cert-cred.c
lib/constate.c
lib/handshake.c
lib/pkcs11.c
lib/pkcs11_secret.c
lib/pkcs11_write.c
lib/str-unicode.c
lib/x509/key_decode.c
lib/x509/mpi.c
lib/x509/verify-high.c
src/certtool.c

index 151b3dc0254338a2eda8157da784ac4d5b2a633d..9b670693b46438128ecd2dcd97a9ed99e52420d3 100644 (file)
@@ -44,7 +44,7 @@ extern mod_auth_st srp_dss_auth_struct;
 
 
 /* Cred type mappings to KX algorithms
- * FIXME: The mappings are not 1-1. Some KX such as SRP_RSA require
+ * The mappings are not 1-1. Some KX such as SRP_RSA require
  * more than one credentials type.
  */
 typedef struct {
index 73f96ab6c2f35206744295da586695778353e945..076a39f06b60b23cf0434304036677cea8430eaf 100644 (file)
@@ -277,7 +277,7 @@ _gnutls_dgram_read(gnutls_session_t session, mbuffer_st ** bufel,
                                 fd);
                if (i == 0) {
                        /* If we get here, we likely have a stream socket.
-                        * FIXME: this probably breaks DCCP. */
+                        * That assumption may not work on DCCP. */
                        gnutls_assert();
                        ret = 0;
                        goto cleanup;
index 8a08d26d8c20f10d2c8e1f5a6ccb66cfdd5e080e..e2cc798cbcb44e661c70933a2bfe35dc72b18eb2 100644 (file)
@@ -273,14 +273,13 @@ void gnutls_certificate_free_keys(gnutls_certificate_credentials_t sc)
  * gnutls_certificate_free_cas:
  * @sc: is a #gnutls_certificate_credentials_t type.
  *
- * This function will delete all the CAs associated with the given
- * credentials. Servers that do not use
- * gnutls_certificate_verify_peers2() may call this to save some
- * memory.
+ * This function was operational on very early versions of gnutls.
+ * Due to internal refactorings and the fact that this was hardly ever
+ * used, it is currently a no-op.
+ *
  **/
 void gnutls_certificate_free_cas(gnutls_certificate_credentials_t sc)
 {
-       /* FIXME: do nothing for now */
        return;
 }
 
index d28c00bc31e2ed0a68f2848719e8e0f43ebb910e..be784bce64d705eec8108df2350c3aeaa814701c 100644 (file)
@@ -56,8 +56,6 @@ static int
 _gnutls_set_keys(gnutls_session_t session, record_parameters_st * params,
                 unsigned hash_size, unsigned IV_size, unsigned key_size)
 {
-       /* FIXME: This function is too long
-        */
        uint8_t rnd[2 * GNUTLS_RANDOM_SIZE];
        int pos, ret;
        int block_size;
index 8446da45e5f62cec0f3fbdf8d25ccf382974b3bc..da1f87d183c4347a72e0fee8c31cc99645488bbb 100644 (file)
@@ -2499,7 +2499,6 @@ recv_hello_verify_request(gnutls_session_t session,
                return GNUTLS_E_UNEXPECTED_PACKET;
        }
 
-       /* TODO: determine if we need to do anything with the server version field */
        DECR_LEN(len, 2);
        pos += 2;
 
@@ -3671,9 +3670,6 @@ gnutls_handshake_get_last_out(gnutls_session_t session)
 }
 
 /* This returns the session hash as in draft-ietf-tls-session-hash-02.
- *
- * FIXME: It duplicates some of the actions in _gnutls_handshake_sign_crt_vrfy*.
- * See whether they can be merged.
  */
 int _gnutls_handshake_get_session_hash(gnutls_session_t session, gnutls_datum_t *shash)
 {
index fbe2b48f2299fc14a55403f81ce329ef7fa93f40..2ec642bf8ab492c5e47969ffdeac46eaa0bd3deb 100644 (file)
@@ -2999,7 +2999,6 @@ find_privkeys(struct pkcs11_session_info *sinfo,
 
        /* Find an object with private key class and a certificate ID
         * which matches the certificate. */
-       /* FIXME: also match the cert subject. */
        a[0].type = CKA_CLASS;
        a[0].value = &class;
        a[0].value_len = sizeof class;
index 828fbff6da072a2fa43edf1571c5845ab02b1099..95bbfae757c25b47c1e1536b7ebda36122a119d9 100644 (file)
@@ -89,8 +89,8 @@ gnutls_pkcs11_copy_secret_key(const char *token_url, gnutls_datum_t * key,
                return ret;
        }
 
-       /* FIXME: copy key usage flags */
-
+       /* We do not copy key usage flags.
+        */
        a[0].type = CKA_CLASS;
        a[0].value = &class;
        a[0].value_len = sizeof(class);
index b1176fb0ff089bc24b3683a75d535cc3dea3fc49..ab740dcd62ac82e9957ce5f7e04f2ba84c4f3418 100644 (file)
@@ -187,6 +187,8 @@ gnutls_pkcs11_copy_x509_crt2(const char *token_url,
                a[1].value_len = cid->size;
        }
 
+       /* we do not use the key usage flags; these are apparent from
+        * the certificate itself. */
        a[2].type = CKA_VALUE;
        a[2].value = der;
        a[2].value_len = der_size;
@@ -196,7 +198,6 @@ gnutls_pkcs11_copy_x509_crt2(const char *token_url,
        a[4].type = CKA_CERTIFICATE_TYPE;
        a[4].value = &type;
        a[4].value_len = sizeof(type);
-       /* FIXME: copy key usage flags */
 
        a_val = 5;
 
@@ -715,7 +716,6 @@ gnutls_pkcs11_copy_x509_privkey2(const char *token_url,
        pk = gnutls_x509_privkey_get_pk_algorithm(key);
        FIX_KEY_USAGE(pk, key_usage);
 
-       /* FIXME: copy key usage flags */
        a_val = 0;
        a[a_val].type = CKA_CLASS;
        a[a_val].value = &class;
index 0cd47d4953e3a47ffbb2255cd25b6f9581698969..d66710a5f27045dbf1b1b581acd3e3b90f4f85f7 100644 (file)
@@ -123,7 +123,7 @@ static int check_for_valid_freeformclass(uint32_t *ucs4, unsigned ucs4_size)
 
                /* Disallowed 
                   o  Old Hangul Jamo characters, i.e., the OldHangulJamo ("I") category
-                     [FIXME: not handled in this code]
+                     (not handled in this code)
 
                   o  Control characters, i.e., the Controls ("L") category
 
index 1e07bbc441703edc2b46b7b68fdb473e4249b599..00f1950acbb75c1fd188010277a58513fe70526e 100644 (file)
@@ -193,9 +193,9 @@ _gnutls_x509_read_dsa_params(uint8_t * der, int dersize,
                return _gnutls_asn2err(result);
        }
 
-       /* FIXME: If the parameters are not included in the certificate
+       /* If the parameters are not included in the certificate
         * then the issuer's parameters should be used. This is not
-        * done yet.
+        * implemented, and is not used in practice (along with DSA).
         */
 
        /* Read p */
index 664b22c50964bdb818158d8a4c8b940d9b4b0f1e..1be3da484edbfbf552e9d7ec2ca20ee532dc60bb 100644 (file)
@@ -134,10 +134,6 @@ _gnutls_get_asn_mpis(ASN1_TYPE asn, const char *root,
        _asnstr_append_name(name, sizeof(name), root,
                            ".algorithm.parameters");
 
-       /* FIXME: If the parameters are not included in the certificate
-        * then the issuer's parameters should be used. This is not
-        * needed in practice though.
-        */
        if (pk_algorithm != GNUTLS_PK_RSA && pk_algorithm != GNUTLS_PK_EDDSA_ED25519 && pk_algorithm != GNUTLS_PK_ECDH_X25519) {
                /* RSA and EdDSA do not use parameters */
                result = _gnutls_x509_read_value(asn, name, &tmp);
index bbb54a0f93d36bde172b835ffb6ebb3e4529fedc..5515d54ff90b54e1a1bcf146ed8c4982b69b418b 100644 (file)
@@ -186,14 +186,6 @@ add_new_ca_to_rdn_seq(gnutls_x509_trust_list_t list,
         * This will be sent to clients when a certificate
         * request message is sent.
         */
-
-       /* FIXME: in case of a client it is not needed
-        * to do that. This would save time and memory.
-        * However we don't have that information available
-        * here.
-        * Further, this function is now much more efficient,
-        * so optimizing that is less important.
-        */
        tmp.data = ca->raw_dn.data;
        tmp.size = ca->raw_dn.size;
 
index ea8fc81c672cb288cdb45564047e505af80243d4..11dc27a6fd6d994ed918cd172340f89b1c4154d2 100644 (file)
@@ -3702,8 +3702,7 @@ void smime_to_pkcs7(void)
        char *lineptr = NULL;
        ssize_t len;
 
-       /* Find body.  FIXME: Handle non-b64 Content-Transfer-Encoding.
-          Reject non-S/MIME tagged Content-Type's? */
+       /* Find body. We do not handle non-b64 Content-Transfer-Encoding. */
        do {
                len = getline(&lineptr, &linesize, infile);
                if (len == -1) {