mirror of
https://github.com/openssl/openssl.git
synced 2025-01-24 13:55:42 +08:00
test: remove TODOs
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15539)
This commit is contained in:
parent
fb6ad22e36
commit
fd009d763a
@ -107,16 +107,6 @@ static int test_x509_spki_aid(X509 *cert, const char *filename)
|
||||
return test_spki_aid(pubkey, filename);
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO
|
||||
* When we gain the ability to get an EVP_SIGNATURE with a complete signature
|
||||
* algorithm name (like "sha1WithRSAEncryption" or its corresponding OID in
|
||||
* text form, "1.2.840.113549.1.1.2"), we won't have to limit this test to
|
||||
* what we have in libcrypto's cross-reference db, i.e. won't have to call
|
||||
* OBJ_find_sigid_algs() to find out the EVP_PKEY_METHOD NID any more.
|
||||
* All we'd have to do is used OBJ_obj2txt() on an ASN1_OBJECT and pass the
|
||||
* result.
|
||||
*/
|
||||
static int test_x509_sig_aid(X509 *eecert, const char *ee_filename,
|
||||
X509 *cacert, const char *ca_filename)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Things in boring, not in openssl. TODO we should add them.
|
||||
* Things in boring, not in openssl.
|
||||
*/
|
||||
#define HAVE_BN_PADDED 0
|
||||
#define HAVE_BN_SQRT 0
|
||||
@ -1100,7 +1100,7 @@ static int file_sum(STANZA *s)
|
||||
/*
|
||||
* Test that the functions work when |r| and |a| point to the same BIGNUM,
|
||||
* or when |r| and |b| point to the same BIGNUM.
|
||||
* TODO: Test where all of |r|, |a|, and |b| point to the same BIGNUM.
|
||||
* There is no test for all of |r|, |a|, and |b| pointint to the same BIGNUM.
|
||||
*/
|
||||
if (!TEST_true(BN_copy(ret, a))
|
||||
|| !TEST_true(BN_add(ret, ret, b))
|
||||
@ -1127,7 +1127,6 @@ static int file_sum(STANZA *s)
|
||||
* documented as having. Note that these functions are frequently used
|
||||
* when the prerequisites don't hold. In those cases, they are supposed
|
||||
* to work as if the prerequisite hold, but we don't test that yet.
|
||||
* TODO: test that.
|
||||
*/
|
||||
if (!BN_is_negative(a) && !BN_is_negative(b) && BN_cmp(a, b) >= 0) {
|
||||
if (!TEST_true(BN_uadd(ret, a, b))
|
||||
@ -1140,7 +1139,8 @@ static int file_sum(STANZA *s)
|
||||
/*
|
||||
* Test that the functions work when |r| and |a| point to the same
|
||||
* BIGNUM, or when |r| and |b| point to the same BIGNUM.
|
||||
* TODO: Test where all of |r|, |a|, and |b| point to the same BIGNUM.
|
||||
* There is no test for all of |r|, |a|, and |b| pointint to the same
|
||||
* BIGNUM.
|
||||
*/
|
||||
if (!TEST_true(BN_copy(ret, a))
|
||||
|| !TEST_true(BN_uadd(ret, ret, b))
|
||||
|
@ -117,10 +117,5 @@ int setup_tests(void)
|
||||
ADD_TEST(test_cmp_asn1_get_int);
|
||||
ADD_TEST(test_ASN1_OCTET_STRING_set);
|
||||
ADD_TEST(test_ASN1_OCTET_STRING_set_tgt_is_src);
|
||||
/*
|
||||
* TODO make sure that total number of tests (here currently 24) is shown,
|
||||
* also for other cmp_*text.c. Currently the test drivers always show 1.
|
||||
*/
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -101,7 +101,6 @@ static int execute_exec_GENM_ses_test(CMP_SES_TEST_FIXTURE *fixture)
|
||||
if (!TEST_ptr(itavs = OSSL_CMP_exec_GENM_ses(fixture->cmp_ctx)))
|
||||
return 0;
|
||||
sk_OSSL_CMP_ITAV_pop_free(itavs, OSSL_CMP_ITAV_free);
|
||||
/* TODO: check if the returned value is the expected one (same as sent) */
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -115,7 +114,6 @@ static int execute_exec_certrequest_ses_test(CMP_SES_TEST_FIXTURE *fixture)
|
||||
|
||||
if (!TEST_ptr(res) || !TEST_int_eq(X509_cmp(res, client_cert), 0))
|
||||
return 0;
|
||||
/* TODO: check that cerfConf has been exchanged unless implicitConfirm */
|
||||
if (fixture->caPubs != NULL) {
|
||||
STACK_OF(X509) *caPubs = OSSL_CMP_CTX_get1_caPubs(fixture->cmp_ctx);
|
||||
int ret = TEST_int_eq(STACK_OF_X509_cmp(fixture->caPubs, caPubs), 0);
|
||||
@ -169,7 +167,6 @@ static int test_exec_IR_ses_poll(void)
|
||||
ossl_cmp_mock_srv_set_pollCount(fixture->srv_ctx, 2);
|
||||
ossl_cmp_mock_srv_set_checkAfterTime(fixture->srv_ctx, checkAfter);
|
||||
EXECUTE_TEST(execute_exec_certrequest_ses_test, tear_down);
|
||||
/* TODO: check that 2 rounds are done or session takes 2..3 seconds */
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -480,10 +480,5 @@ int setup_tests(void)
|
||||
/* also tests internal function ossl_cmp_hdr_get_pvno(): */
|
||||
ADD_TEST(test_HDR_init_with_ref);
|
||||
ADD_TEST(test_HDR_init_with_subject);
|
||||
/*
|
||||
* TODO make sure that total number of tests (here currently 24) is shown,
|
||||
* also for other cmp_*text.c. Currently the test drivers always show 1.
|
||||
*/
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -1196,13 +1196,7 @@ static handshake_status_t handshake_status(peer_status_t last_status,
|
||||
/* The client failed immediately before sending the ClientHello */
|
||||
return client_spoke_last ? CLIENT_ERROR : INTERNAL_ERROR;
|
||||
case PEER_SUCCESS:
|
||||
/*
|
||||
* First peer succeeded but second peer errored.
|
||||
* TODO(emilia): we should be able to continue here (with some
|
||||
* application data?) to ensure the first peer receives the
|
||||
* alert / close_notify.
|
||||
* (No tests currently exercise this branch.)
|
||||
*/
|
||||
/* First peer succeeded but second peer errored. */
|
||||
return client_spoke_last ? CLIENT_ERROR : SERVER_ERROR;
|
||||
case PEER_RETRY:
|
||||
/* We errored; let the peer finish. */
|
||||
|
@ -319,7 +319,6 @@ static STACK_OF(PKCS12_SAFEBAG) *decode_contentinfo(STACK_OF(PKCS7) *safes, int
|
||||
if (enc) {
|
||||
if (!TEST_int_eq(bagnid, NID_pkcs7_encrypted))
|
||||
goto err;
|
||||
/* TODO: Check algorithm (iterations?) against what we originally set */
|
||||
bags = PKCS12_unpack_p7encdata(p7, enc->pass, strlen(enc->pass));
|
||||
} else {
|
||||
if (!TEST_int_eq(bagnid, NID_pkcs7_data))
|
||||
@ -518,8 +517,6 @@ static int check_attrs(const STACK_OF(X509_ATTRIBUTE) *bag_attrs, const PKCS12_A
|
||||
while(p_attr->oid != NULL) {
|
||||
/* Find a matching attribute type */
|
||||
if (strcmp(p_attr->oid, attr_txt) == 0) {
|
||||
|
||||
/* TODO: Handle multi-value attributes */
|
||||
if (!TEST_int_eq(X509_ATTRIBUTE_count(attr), 1))
|
||||
goto err;
|
||||
|
||||
@ -603,8 +600,6 @@ void check_keybag(PKCS12_BUILDER *pb, const unsigned char *bytes, int len,
|
||||
pb->success = 0;
|
||||
goto err;
|
||||
}
|
||||
/* TODO: handle key attributes */
|
||||
/* PKCS8_pkey_get0_attrs(p8c); */
|
||||
break;
|
||||
|
||||
case NID_pkcs8ShroudedKeyBag:
|
||||
@ -621,8 +616,6 @@ void check_keybag(PKCS12_BUILDER *pb, const unsigned char *bytes, int len,
|
||||
pb->success = 0;
|
||||
goto err;
|
||||
}
|
||||
/* TODO: handle key attributes */
|
||||
/* PKCS8_pkey_get0_attrs(p8); */
|
||||
PKCS8_PRIV_KEY_INFO_free(p8);
|
||||
break;
|
||||
|
||||
|
@ -636,7 +636,7 @@ static void sv_usage(void)
|
||||
#endif
|
||||
fprintf(stderr, " -no_dhe - disable DHE\n");
|
||||
#ifndef OPENSSL_NO_EC
|
||||
fprintf(stderr, " -no_ecdhe - disable ECDHE\nTODO(openssl-team): no_ecdhe was broken by auto ecdh. Make this work again.\n");
|
||||
fprintf(stderr, " -no_ecdhe - disable ECDHE\n");
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_PSK
|
||||
fprintf(stderr, " -psk arg - PSK in hex (without 0x)\n");
|
||||
|
@ -326,10 +326,6 @@ static int test_keylog_output(char *buffer, const SSL *ssl,
|
||||
|
||||
if (!TEST_ptr(token = strtok(NULL, " \n")))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* TODO(TLS1.3): test that application traffic secrets are what
|
||||
* we expect */
|
||||
} else {
|
||||
TEST_info("Unexpected token %s\n", token);
|
||||
return 0;
|
||||
@ -2907,10 +2903,6 @@ static int test_set_sigalgs(int idx)
|
||||
&sctx, &cctx, cert, privkey)))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* TODO(TLS1.3): These APIs cannot set TLSv1.3 sig algs so we just test it
|
||||
* for TLSv1.2 for now until we add a new API.
|
||||
*/
|
||||
SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION);
|
||||
|
||||
if (testctx) {
|
||||
|
Loading…
Reference in New Issue
Block a user