]> granicus.if.org Git - p11-kit/commitdiff
proxy: Remove assertions when module is not initialized
authorStef Walter <stef@thewalter.net>
Thu, 13 Feb 2014 08:57:53 +0000 (09:57 +0100)
committerStef Walter <stef@thewalter.net>
Thu, 13 Feb 2014 09:00:07 +0000 (10:00 +0100)
We should return CKR_CRYPTOKI_NOT_INITIALIZED rather than
assert() when proxy PKCS#11 functions are called before the
module is initialized.

https://bugs.freedesktop.org/show_bug.cgi?id=74919

p11-kit/proxy.c

index 36a43a1e1d4523850ab78aa7b5045d66c018d73f..4e599c7a6f690b60a38917c1b92410e2730a0e58 100644 (file)
@@ -132,7 +132,6 @@ map_slot_to_real (Proxy *px,
 {
        CK_RV rv;
 
-       assert (px != NULL);
        assert (mapping != NULL);
 
        p11_lock ();
@@ -158,7 +157,6 @@ map_session_to_real (Proxy *px,
        CK_RV rv = CKR_OK;
        Session *sess;
 
-       assert (px != NULL);
        assert (handle != NULL);
        assert (mapping != NULL);