Changeset 95219 in vbox for trunk/src/libs/openssl-3.0.3/test/cmsapitest.c
- Timestamp:
- Jun 8, 2022 7:43:44 AM (3 years ago)
- Location:
- trunk/src/libs/openssl-3.0.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/openssl-3.0.3
- Property svn:mergeinfo
-
old new 14 14 /vendor/openssl/3.0.1:150323-150324 15 15 /vendor/openssl/3.0.2:150728-150729 16 /vendor/openssl/current:147554-150727 16 /vendor/openssl/3.0.3:151497-151729 17 /vendor/openssl/current:147554-151496
-
- Property svn:mergeinfo
-
trunk/src/libs/openssl-3.0.3/test/cmsapitest.c
r94320 r95219 1 1 /* 2 * Copyright 2018-202 1The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2018-2022 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 4 * Licensed under the Apache License 2.0 (the "License"). You may not use … … 19 19 static X509 *cert = NULL; 20 20 static EVP_PKEY *privkey = NULL; 21 static char *derin = NULL; 21 22 22 23 static int test_encrypt_decrypt(const EVP_CIPHER *cipher) … … 289 290 } 290 291 291 OPT_TEST_DECLARE_USAGE("certfile privkeyfile\n") 292 static int test_d2i_CMS_bio_file_encrypted_data(void) 293 { 294 BIO *bio = NULL; 295 CMS_ContentInfo *cms = NULL; 296 int ret = 0; 297 298 ERR_clear_error(); 299 300 if (!TEST_ptr(bio = BIO_new_file(derin, "r")) 301 || !TEST_ptr(cms = d2i_CMS_bio(bio, NULL))) 302 goto end; 303 304 if (!TEST_int_eq(ERR_peek_error(), 0)) 305 goto end; 306 307 ret = 1; 308 end: 309 CMS_ContentInfo_free(cms); 310 BIO_free(bio); 311 312 return ret; 313 } 314 315 OPT_TEST_DECLARE_USAGE("certfile privkeyfile derfile\n") 292 316 293 317 int setup_tests(void) … … 302 326 303 327 if (!TEST_ptr(certin = test_get_argument(0)) 304 || !TEST_ptr(privkeyin = test_get_argument(1))) 328 || !TEST_ptr(privkeyin = test_get_argument(1)) 329 || !TEST_ptr(derin = test_get_argument(2))) 305 330 return 0; 306 331 … … 333 358 ADD_TEST(test_encrypt_decrypt_aes_256_gcm); 334 359 ADD_TEST(test_d2i_CMS_bio_NULL); 360 ADD_TEST(test_d2i_CMS_bio_file_encrypted_data); 335 361 return 1; 336 362 }
Note:
See TracChangeset
for help on using the changeset viewer.