Deleting a Security Object

C++

CK_RV delete_key(CK_FUNCTION_LIST_PTR p11, CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey) {
return p11->C_DestroyObject(hSession, hKey);
}

C#

KeyObject keyObject = securityObjectsApi.DeleteSecurityObject (<Key-UUID>);

Go

keyId := "<Key-UUID>"
err := client. DeleteSobject(ctx, *keyId)

Java

KeyObject keyObject = securityObjectsApi.deleteSecurityObject(<Key-UUID>);

Python

api_instance = sdkms.v1.SecurityObjectsApi(api_client=client)
api_instance.delete_security_object_value(<Key-UUID>)

Javascript

var deleteKeyCallback = function(error, data, response) {
    if (error) {
        console.error("Error: " + JSON.stringify(response));
    } else {
        console.log('security object deleted successfully.');
    }
};

var securityObjectApi = new FortanixSdkmsRestApi.SecurityObjectsApi()
securityObjectApi.deleteSecurityObject(kid, deleteKeyCallback);

REST API using curl

curl -X DELETE <Endpoint URL>/crypto/v1/keys/<Key-UUID> -H 'Authorization: Bearer YhXwwa-6C...ig5g'
Was this article helpful?
0 out of 0 found this helpful