[master] better error output when initializing pkcs11
3786. [func] Provide more detailed error codes when using native PKCS#11. "pkcs11-tokens" now fails robustly rather than asserting when run against an HSM with an incomplete PCKS#11 API implementation. [RT #35479]
This commit is contained in:
@@ -337,8 +337,9 @@ ATF_TC_BODY(isc_gost_private, tc) {
|
||||
|
||||
/* create the private key */
|
||||
memset(&pk11_ctx, 0, sizeof(pk11_ctx));
|
||||
ATF_REQUIRE(pk11_get_session(&pk11_ctx, OP_GOST, ISC_FALSE, ISC_FALSE,
|
||||
NULL, pk11_get_best_token(OP_GOST)) ==
|
||||
ATF_REQUIRE(pk11_get_session(&pk11_ctx, OP_GOST, ISC_TRUE,
|
||||
ISC_FALSE, ISC_FALSE, NULL,
|
||||
pk11_get_best_token(OP_GOST)) ==
|
||||
ISC_R_SUCCESS);
|
||||
pk11_ctx.object = CK_INVALID_HANDLE;
|
||||
pk11_ctx.ontoken = ISC_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user