998 obsolete DMA driver interfaces should be removed
[illumos-gate.git] / usr / src / lib / pkcs11 / pkcs11_kms / common / kmsVerify.c
blob64db49c9a3997a9664e326b20b5c2ae46ee77d87
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
21 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24 #include <security/cryptoki.h>
25 #include "kmsGlobal.h"
27 /*ARGSUSED*/
28 CK_RV
29 C_VerifyInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism,
30 CK_OBJECT_HANDLE hKey)
32 if (!kms_initialized)
33 return (CKR_CRYPTOKI_NOT_INITIALIZED);
35 return (CKR_FUNCTION_NOT_SUPPORTED);
38 /*ARGSUSED*/
39 CK_RV
40 C_Verify(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG ulDataLen,
41 CK_BYTE_PTR pSignature, CK_ULONG ulSignatureLen)
43 if (!kms_initialized)
44 return (CKR_CRYPTOKI_NOT_INITIALIZED);
46 return (CKR_FUNCTION_NOT_SUPPORTED);
49 /*ARGSUSED*/
50 CK_RV
51 C_VerifyUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart,
52 CK_ULONG ulPartLen)
54 if (!kms_initialized)
55 return (CKR_CRYPTOKI_NOT_INITIALIZED);
57 return (CKR_FUNCTION_NOT_SUPPORTED);
60 /*ARGSUSED*/
61 CK_RV
62 C_VerifyFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature,
63 CK_ULONG ulSignatureLen)
65 if (!kms_initialized)
66 return (CKR_CRYPTOKI_NOT_INITIALIZED);
68 return (CKR_FUNCTION_NOT_SUPPORTED);
71 /*ARGSUSED*/
72 CK_RV
73 C_VerifyRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism,
74 CK_OBJECT_HANDLE hKey)
76 if (!kms_initialized)
77 return (CKR_CRYPTOKI_NOT_INITIALIZED);
79 return (CKR_FUNCTION_NOT_SUPPORTED);
82 /*ARGSUSED*/
83 CK_RV
84 C_VerifyRecover(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature,
85 CK_ULONG ulSignatureLen, CK_BYTE_PTR pData, CK_ULONG_PTR pulDataLen)
87 if (!kms_initialized)
88 return (CKR_CRYPTOKI_NOT_INITIALIZED);
90 return (CKR_FUNCTION_NOT_SUPPORTED);