diff options
author | Jason King <jason.king@joyent.com> | 2018-02-09 23:44:34 +0000 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2018-07-11 17:18:10 +0000 |
commit | 2cf2b01e17654840a521746eefea832fb41b79bd (patch) | |
tree | 7c18124ea253be25cf2a02bbd25c7ea3e676ba0f /usr | |
parent | 7e085c24801940886227c1724772c2fa5bca864e (diff) | |
download | illumos-gate-2cf2b01e17654840a521746eefea832fb41b79bd.tar.gz |
9643 PKCS#11 tests should not use CRYPTO_INVALID_SESSION
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/test/crypto-tests/tests/common/cryptotest_pkcs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/src/test/crypto-tests/tests/common/cryptotest_pkcs.c b/usr/src/test/crypto-tests/tests/common/cryptotest_pkcs.c index 4a98a2aafc..db15968b49 100644 --- a/usr/src/test/crypto-tests/tests/common/cryptotest_pkcs.c +++ b/usr/src/test/crypto-tests/tests/common/cryptotest_pkcs.c @@ -11,10 +11,12 @@ /* * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + * Copyright 2018, Joyent, Inc. */ #include <stdio.h> #include <cryptoutil.h> +#include <security/cryptoki.h> #include "cryptotest.h" @@ -64,7 +66,7 @@ cryptotest_init(cryptotest_t *arg, size_t fg) op->mechname = arg->mechname; - op->hsession = CRYPTO_INVALID_SESSION; + op->hsession = CK_INVALID_HANDLE; op->fg = fg; if (op->out == NULL) @@ -87,7 +89,7 @@ int cryptotest_close(crypto_op_t *op) { (void) C_DestroyObject(op->hsession, op->keyt); - if (op->hsession != CRYPTO_INVALID_SESSION) + if (op->hsession != CK_INVALID_HANDLE) (void) cryptotest_close_session(op->hsession); free(op); return (C_Finalize(NULL)); |