mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 04:30:49 +02:00
f15199906d
Re-implemented wc_PKCS12_PBKDF() to not use MP. Added tests to unit.test. sp_int.c: Fixes to comments. Added more define build options documentation to top of file. Fixes for builds with WOLFSSL_SP_INT_NEGATIVE defined. Fixes for when a->used is 0 and no underflow - not actually a problem but cleaner code. sp_sub has different checks on a->used when values are only positive. sp_dic_2d missing check for e less than zero. sp_to_unsigned_bin_len_ct: remove redundant check of outSz. Change i to int to handle a->used of 0 and make code tidier. Configuration testing fixes. Fix formatting in test.c. Added 128-bit types word128 and sword128 for cleaner PKCS#12 code.
55 lines
2.3 KiB
C
55 lines
2.3 KiB
C
/* test_pkcs12.h
|
|
*
|
|
* Copyright (C) 2006-2026 wolfSSL Inc.
|
|
*
|
|
* This file is part of wolfSSL.
|
|
*
|
|
* wolfSSL is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* wolfSSL is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
|
*/
|
|
|
|
#ifndef WOLFCRYPT_TEST_PKCS12_H
|
|
#define WOLFCRYPT_TEST_PKCS12_H
|
|
|
|
#include <tests/api/api_decl.h>
|
|
|
|
int test_wc_i2d_PKCS12(void);
|
|
int test_wc_PKCS12_create(void);
|
|
int test_wc_d2i_PKCS12_bad_mac_salt(void);
|
|
int test_wc_d2i_PKCS12_oid_underflow(void);
|
|
int test_wc_PKCS12_PBKDF(void);
|
|
int test_wc_PKCS12_PBKDF_ex(void);
|
|
int test_wc_PKCS12_PBKDF_ex_sha1(void);
|
|
int test_wc_PKCS12_PBKDF_ex_sha512(void);
|
|
int test_wc_PKCS12_PBKDF_ex_sha224(void);
|
|
int test_wc_PKCS12_PBKDF_ex_sha384(void);
|
|
int test_wc_PKCS12_PBKDF_ex_sha512_224(void);
|
|
int test_wc_PKCS12_PBKDF_ex_sha512_256(void);
|
|
|
|
#define TEST_PKCS12_DECLS \
|
|
TEST_DECL_GROUP("pkcs12", test_wc_i2d_PKCS12), \
|
|
TEST_DECL_GROUP("pkcs12", test_wc_PKCS12_create), \
|
|
TEST_DECL_GROUP("pkcs12", test_wc_d2i_PKCS12_bad_mac_salt), \
|
|
TEST_DECL_GROUP("pkcs12", test_wc_d2i_PKCS12_oid_underflow), \
|
|
TEST_DECL_GROUP("pkcs12", test_wc_PKCS12_PBKDF), \
|
|
TEST_DECL_GROUP("pkcs12", test_wc_PKCS12_PBKDF_ex), \
|
|
TEST_DECL_GROUP("pkcs12", test_wc_PKCS12_PBKDF_ex_sha1), \
|
|
TEST_DECL_GROUP("pkcs12", test_wc_PKCS12_PBKDF_ex_sha512), \
|
|
TEST_DECL_GROUP("pkcs12", test_wc_PKCS12_PBKDF_ex_sha224), \
|
|
TEST_DECL_GROUP("pkcs12", test_wc_PKCS12_PBKDF_ex_sha384), \
|
|
TEST_DECL_GROUP("pkcs12", test_wc_PKCS12_PBKDF_ex_sha512_224), \
|
|
TEST_DECL_GROUP("pkcs12", test_wc_PKCS12_PBKDF_ex_sha512_256)
|
|
|
|
#endif /* WOLFCRYPT_TEST_PKCS12_H */
|