Add support for serializing tdbPersonalOwnerInfo
[libisds.git] / test / offline / isds_pki_credentials_free.c
blobc1d88bd8a9edc4fbc2db2cac2419a9cd5b74f5cb
1 #include "../test.h"
2 #include "isds.h"
4 static int test_isds_pki_credentials_free(
5 struct isds_pki_credentials **credentials) {
6 isds_pki_credentials_free(credentials);
7 if (!credentials) PASS_TEST;
9 if (*credentials)
10 FAIL_TEST("isds_pki_credentials_free() did not null pointer");
12 PASS_TEST;
16 int main(void) {
18 INIT_TEST("isds_pki_credentials_free()");
19 if (isds_init())
20 ABORT_UNIT("isds_init() failed");
22 struct isds_pki_credentials *credentials = NULL;
23 TEST("NULL", test_isds_pki_credentials_free, NULL);
24 TEST("*NULL", test_isds_pki_credentials_free, &credentials);
26 TEST_CALLOC(credentials);
27 TEST("Empty structure", test_isds_pki_credentials_free, &credentials);
29 TEST_CALLOC(credentials);
30 TEST_FILL_STRING(credentials->engine);
31 TEST_FILL_STRING(credentials->certificate);
32 TEST_FILL_STRING(credentials->key);
33 TEST_FILL_STRING(credentials->passphrase)
34 TEST("Full structure", test_isds_pki_credentials_free, &credentials);
36 isds_cleanup();
37 SUM_TEST();