evp_test.c (331638) | evp_test.c (344604) |
---|---|
1/* Written by Ben Laurie, 2001 */ 2/* | 1/* Written by Ben Laurie, 2001 */ 2/* |
3 * Copyright (c) 2001 The OpenSSL Project. All rights reserved. | 3 * Copyright (c) 2001-2019 The OpenSSL Project. All rights reserved. |
4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * --- 310 unchanged lines hidden (view full) --- 322 ERR_print_errors_fp(stderr); 323 test1_exit(12); 324 } 325 if (!EVP_DecryptUpdate(&ctx, NULL, &outl, NULL, pn)) { 326 fprintf(stderr, "Plaintext length set failed\n"); 327 ERR_print_errors_fp(stderr); 328 test1_exit(12); 329 } | 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * --- 310 unchanged lines hidden (view full) --- 322 ERR_print_errors_fp(stderr); 323 test1_exit(12); 324 } 325 if (!EVP_DecryptUpdate(&ctx, NULL, &outl, NULL, pn)) { 326 fprintf(stderr, "Plaintext length set failed\n"); 327 ERR_print_errors_fp(stderr); 328 test1_exit(12); 329 } |
330 if (an && !EVP_EncryptUpdate(&ctx, NULL, &outl, aad, an)) { | 330 if (an && !EVP_DecryptUpdate(&ctx, NULL, &outl, aad, an)) { |
331 fprintf(stderr, "AAD set failed\n"); 332 ERR_print_errors_fp(stderr); 333 test1_exit(13); 334 } 335 } else if (mode == EVP_CIPH_WRAP_MODE) { 336 if (!EVP_DecryptInit_ex(&ctx, c, NULL, key, in ? iv : NULL)) { 337 fprintf(stderr, "EncryptInit failed\n"); 338 ERR_print_errors_fp(stderr); --- 260 unchanged lines hidden --- | 331 fprintf(stderr, "AAD set failed\n"); 332 ERR_print_errors_fp(stderr); 333 test1_exit(13); 334 } 335 } else if (mode == EVP_CIPH_WRAP_MODE) { 336 if (!EVP_DecryptInit_ex(&ctx, c, NULL, key, in ? iv : NULL)) { 337 fprintf(stderr, "EncryptInit failed\n"); 338 ERR_print_errors_fp(stderr); --- 260 unchanged lines hidden --- |