This will be needed for registering/fetching a certificate. This structure allows parameterization of multiple certificate entries.
get_cert_param_t params = { 0 }; xc_get_default_cert_param(¶ms);
params.auth_type = XPKI_AUTH_X509; params.fabric_id = 0xABCDABCDABCDABCD; params.node_id = 0x1234123412341234; params.input_p12_password = "changeit"; params.input_p12_path = "seed.p12"; params.output_p12_password = "newpass"; params.output_p12_path = "example-certificate"; params.overwrite_p12 = true; params.product_id = 0xABCD; params.profile_name = "XFN_Matter_OP_Class_3_ICA"; params.validity_days = 90; params.lite = true; params.common_name = "TEST_CERT"; params.mac_address = "00:B0:D0:63:C2:26";
params.auth_type = XPKI_AUTH_SAT; params.auth_token = token; params.fabric_id = 0xABCDABCDABCDABCD; params.node_id = 0x1234123412341234; params.output_p12_password = "newpass"; params.output_p12_path = "output-xc-auth-token-test-renewable.p12"; params.overwrite_p12 = true; params.product_id = 0xABCD; params.profile_name = "XFN_Matter_OP_Class_3_ICA"; params.validity_days = 90; params.lite = true; params.common_name = "X9c0XXBqIosRCg35keK8XsWC2PAdjQrG"; params.source_id = "libcertifier-opensource"; params.mac_address = "00:B0:D0:63:C2:26";
params
should have been properly set (as shown above) in order for the following snippet of code to work:
XPKI_CLIENT_ERROR_CODE error = xc_get_cert(¶ms);
This will be needed for getting the status of a certificate.
get_cert_status_param_t params = { 0 }; xc_get_default_cert_status_param(¶ms);
params.p12_password = "newpass"; params.p12_path = "example-certificate.p12"; params.source_id = "libcertifier-opensource" // Optional
params
should have been properly set (as shown above) in order for the following snippet of code to work:
XPKI_CLIENT_CERT_STATUS status; XPKI_CLIENT_CERT_STATUS error = xc_get_cert_status(¶ms, &status);
params.p12_password = "newpass"; params.p12_path = "example-certificate.p12"; params.source_id = "libcertifier-opensource" // Optional
params.p12_password = "newpass"; params.p12_path = "output-xc-auth-token-test-renewable.p12"; params.auth_type = XPKI_AUTH_SAT; params.auth_token = token;
params
should have been properly set (as shown above) in order for the following snippet of code to work:
XPKI_CLIENT_ERROR_CODE error; error = xc_renew_cert(¶ms);