Skip to content

Commit 9079d21

Browse files
committed
fixup! app_load_certs(),cmpClient.c: allow loading empty list of certs, with warning
1 parent 2a1a6e6 commit 9079d21

3 files changed

Lines changed: 26 additions & 4 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* @file static_config.h
3+
*
4+
* @brief Static configuration of the generic CMP client
5+
*
6+
* @copyright Copyright (c) 2023 Siemens AG
7+
*
8+
* @author David von Oheimb <david.von.oheimb@siemens.com>
9+
*
10+
* This work is licensed under the terms of the Apache Software License 2.0.
11+
* See the COPYING file in the top-level directory.
12+
*
13+
* SPDX-License-Identifier: Apache-2.0
14+
*/
15+
16+
#ifndef GENCMPCLIENT_STATIC_CONFIG_H_
17+
#define GENCMPCLIENT_STATIC_CONFIG_H_
18+
19+
#undef USE_LIBCMP
20+
/* #undef USE_LIBCMP */
21+
22+
#endif /* GENCMPCLIENT_STATIC_CONFIG_H_ */

‎test/recipes/80-test_cmp_http_data/test_credentials.csv‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ NEED_CACHE_DISABLING,0,0,1,only one cert, -section,,BLANK,,BLANK,, -cert,signer_
4444
1,1,1,1,extracerts big file, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,pass:12345, -extracerts,big_issuing.crt,BLANK,,BLANK,,BLANK,
4545
0,*,*,*,extracerts missing arg, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,pass:12345, -extracerts,,BLANK,,BLANK,,BLANK,
4646
NEED_CACHE_DISABLING,0,0,1,wrong extracerts, -section,,BLANK,,BLANK,, -cert,signer_only.crt, -key,signer.p12, -keypass,pass:12345, -extracerts,server.crt,BLANK,,BLANK,,BLANK,
47-
0,0,0,0,extracerts empty file, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,pass:12345, -extracerts,empty.txt,BLANK,,BLANK,,BLANK,
48-
0,*,*,*,extracerts random content, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,pass:12345, -extracerts,random.bin,BLANK,,BLANK,,BLANK,
47+
1,1,1,1,extracerts empty file, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,pass:12345, -extracerts,empty.txt,BLANK,,BLANK,,BLANK,
48+
0,*,*,*,extracerts random content, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,pass:12345, -extracerts,random.h,BLANK,,BLANK,,BLANK,
4949
TBD,TBD,TBD,-,extracert expired, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,pass:12345, -extracerts,signer_chain_expired.crt,BLANK,,BLANK,,BLANK,
5050
0,*,*,*,extracerts file does not exist, -section,,BLANK,,BLANK,, -cert,signer.crt, -key,signer.p12, -keypass,pass:12345, -extracerts,idontexist,BLANK,,BLANK,,BLANK,
5151
1,1,1,1,extracerts wrong chain (some root CA), -section,, -ref,"""", -secret,"""", -cert,signer.crt, -key,signer.p12, -keypass,pass:12345, -extracerts,trusted.crt,BLANK,,BLANK,,BLANK,

‎test/recipes/80-test_cmp_http_data/test_verification.csv‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ TBD,TBD,TBD,TBD,root expired, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trust
7777
,,,,,,,,,,,,,,,,,,,,,,,,,,,
7878
0,*,*,*,untrusted missing arg, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,,BLANK, -unprotected_errors,BLANK,,,,,,,,
7979
1,1,1,-,untrusted not matching cert, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,root.crt,BLANK, -unprotected_errors,BLANK,,,,,,,,
80-
0,0,0,0,untrusted empty file, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,empty.txt,BLANK, -unprotected_errors,BLANK,,,,,,,,
81-
0,*,*,*,untrusted random file, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,random.bin,BLANK, -unprotected_errors,BLANK,,,,,,,,
80+
1,1,1,1,untrusted empty file, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,empty.txt,BLANK, -unprotected_errors,BLANK,,,,,,,,
81+
0,*,*,*,untrusted random file, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,random.h,BLANK, -unprotected_errors,BLANK,,,,,,,,
8282
TBD,TBD,TBD since cert file does not exist, -,untrusted expired, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,EJBCAInfrastructureIssuingCAv10_expired.crt ECCIssuingCAv10_expired.crt ExpiredIssuingCAv10.crt,BLANK, -unprotected_errors,BLANK,,,,,,,,
8383
0,*,*,*,untrusted file does not exist, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,idontexist,BLANK, -unprotected_errors,BLANK,,,,,,,,
8484
,,,,,,,,,,,,,,,,,,,,,,,,,,,

0 commit comments

Comments
 (0)