xref: /onnv-gate/usr/src/lib/pkcs11/pkcs11_kms/common/kmsVerify.c (revision 12720:3db6e0082404)
1*12720SWyllys.Ingersoll@Sun.COM /*
2*12720SWyllys.Ingersoll@Sun.COM  * CDDL HEADER START
3*12720SWyllys.Ingersoll@Sun.COM  *
4*12720SWyllys.Ingersoll@Sun.COM  * The contents of this file are subject to the terms of the
5*12720SWyllys.Ingersoll@Sun.COM  * Common Development and Distribution License (the "License").
6*12720SWyllys.Ingersoll@Sun.COM  * You may not use this file except in compliance with the License.
7*12720SWyllys.Ingersoll@Sun.COM  *
8*12720SWyllys.Ingersoll@Sun.COM  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*12720SWyllys.Ingersoll@Sun.COM  * or http://www.opensolaris.org/os/licensing.
10*12720SWyllys.Ingersoll@Sun.COM  * See the License for the specific language governing permissions
11*12720SWyllys.Ingersoll@Sun.COM  * and limitations under the License.
12*12720SWyllys.Ingersoll@Sun.COM  *
13*12720SWyllys.Ingersoll@Sun.COM  * When distributing Covered Code, include this CDDL HEADER in each
14*12720SWyllys.Ingersoll@Sun.COM  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*12720SWyllys.Ingersoll@Sun.COM  * If applicable, add the following below this CDDL HEADER, with the
16*12720SWyllys.Ingersoll@Sun.COM  * fields enclosed by brackets "[]" replaced with your own identifying
17*12720SWyllys.Ingersoll@Sun.COM  * information: Portions Copyright [yyyy] [name of copyright owner]
18*12720SWyllys.Ingersoll@Sun.COM  *
19*12720SWyllys.Ingersoll@Sun.COM  * CDDL HEADER END
20*12720SWyllys.Ingersoll@Sun.COM  *
21*12720SWyllys.Ingersoll@Sun.COM  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
22*12720SWyllys.Ingersoll@Sun.COM  */
23*12720SWyllys.Ingersoll@Sun.COM 
24*12720SWyllys.Ingersoll@Sun.COM #include <security/cryptoki.h>
25*12720SWyllys.Ingersoll@Sun.COM #include "kmsGlobal.h"
26*12720SWyllys.Ingersoll@Sun.COM 
27*12720SWyllys.Ingersoll@Sun.COM /*ARGSUSED*/
28*12720SWyllys.Ingersoll@Sun.COM CK_RV
C_VerifyInit(CK_SESSION_HANDLE hSession,CK_MECHANISM_PTR pMechanism,CK_OBJECT_HANDLE hKey)29*12720SWyllys.Ingersoll@Sun.COM C_VerifyInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism,
30*12720SWyllys.Ingersoll@Sun.COM     CK_OBJECT_HANDLE hKey)
31*12720SWyllys.Ingersoll@Sun.COM {
32*12720SWyllys.Ingersoll@Sun.COM 	if (!kms_initialized)
33*12720SWyllys.Ingersoll@Sun.COM 		return (CKR_CRYPTOKI_NOT_INITIALIZED);
34*12720SWyllys.Ingersoll@Sun.COM 
35*12720SWyllys.Ingersoll@Sun.COM 	return (CKR_FUNCTION_NOT_SUPPORTED);
36*12720SWyllys.Ingersoll@Sun.COM }
37*12720SWyllys.Ingersoll@Sun.COM 
38*12720SWyllys.Ingersoll@Sun.COM /*ARGSUSED*/
39*12720SWyllys.Ingersoll@Sun.COM CK_RV
C_Verify(CK_SESSION_HANDLE hSession,CK_BYTE_PTR pData,CK_ULONG ulDataLen,CK_BYTE_PTR pSignature,CK_ULONG ulSignatureLen)40*12720SWyllys.Ingersoll@Sun.COM C_Verify(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG ulDataLen,
41*12720SWyllys.Ingersoll@Sun.COM     CK_BYTE_PTR pSignature, CK_ULONG ulSignatureLen)
42*12720SWyllys.Ingersoll@Sun.COM {
43*12720SWyllys.Ingersoll@Sun.COM 	if (!kms_initialized)
44*12720SWyllys.Ingersoll@Sun.COM 		return (CKR_CRYPTOKI_NOT_INITIALIZED);
45*12720SWyllys.Ingersoll@Sun.COM 
46*12720SWyllys.Ingersoll@Sun.COM 	return (CKR_FUNCTION_NOT_SUPPORTED);
47*12720SWyllys.Ingersoll@Sun.COM }
48*12720SWyllys.Ingersoll@Sun.COM 
49*12720SWyllys.Ingersoll@Sun.COM /*ARGSUSED*/
50*12720SWyllys.Ingersoll@Sun.COM CK_RV
C_VerifyUpdate(CK_SESSION_HANDLE hSession,CK_BYTE_PTR pPart,CK_ULONG ulPartLen)51*12720SWyllys.Ingersoll@Sun.COM C_VerifyUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart,
52*12720SWyllys.Ingersoll@Sun.COM     CK_ULONG ulPartLen)
53*12720SWyllys.Ingersoll@Sun.COM {
54*12720SWyllys.Ingersoll@Sun.COM 	if (!kms_initialized)
55*12720SWyllys.Ingersoll@Sun.COM 		return (CKR_CRYPTOKI_NOT_INITIALIZED);
56*12720SWyllys.Ingersoll@Sun.COM 
57*12720SWyllys.Ingersoll@Sun.COM 	return (CKR_FUNCTION_NOT_SUPPORTED);
58*12720SWyllys.Ingersoll@Sun.COM }
59*12720SWyllys.Ingersoll@Sun.COM 
60*12720SWyllys.Ingersoll@Sun.COM /*ARGSUSED*/
61*12720SWyllys.Ingersoll@Sun.COM CK_RV
C_VerifyFinal(CK_SESSION_HANDLE hSession,CK_BYTE_PTR pSignature,CK_ULONG ulSignatureLen)62*12720SWyllys.Ingersoll@Sun.COM C_VerifyFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature,
63*12720SWyllys.Ingersoll@Sun.COM     CK_ULONG ulSignatureLen)
64*12720SWyllys.Ingersoll@Sun.COM {
65*12720SWyllys.Ingersoll@Sun.COM 	if (!kms_initialized)
66*12720SWyllys.Ingersoll@Sun.COM 		return (CKR_CRYPTOKI_NOT_INITIALIZED);
67*12720SWyllys.Ingersoll@Sun.COM 
68*12720SWyllys.Ingersoll@Sun.COM 	return (CKR_FUNCTION_NOT_SUPPORTED);
69*12720SWyllys.Ingersoll@Sun.COM }
70*12720SWyllys.Ingersoll@Sun.COM 
71*12720SWyllys.Ingersoll@Sun.COM /*ARGSUSED*/
72*12720SWyllys.Ingersoll@Sun.COM CK_RV
C_VerifyRecoverInit(CK_SESSION_HANDLE hSession,CK_MECHANISM_PTR pMechanism,CK_OBJECT_HANDLE hKey)73*12720SWyllys.Ingersoll@Sun.COM C_VerifyRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism,
74*12720SWyllys.Ingersoll@Sun.COM     CK_OBJECT_HANDLE hKey)
75*12720SWyllys.Ingersoll@Sun.COM {
76*12720SWyllys.Ingersoll@Sun.COM 	if (!kms_initialized)
77*12720SWyllys.Ingersoll@Sun.COM 		return (CKR_CRYPTOKI_NOT_INITIALIZED);
78*12720SWyllys.Ingersoll@Sun.COM 
79*12720SWyllys.Ingersoll@Sun.COM 	return (CKR_FUNCTION_NOT_SUPPORTED);
80*12720SWyllys.Ingersoll@Sun.COM }
81*12720SWyllys.Ingersoll@Sun.COM 
82*12720SWyllys.Ingersoll@Sun.COM /*ARGSUSED*/
83*12720SWyllys.Ingersoll@Sun.COM CK_RV
C_VerifyRecover(CK_SESSION_HANDLE hSession,CK_BYTE_PTR pSignature,CK_ULONG ulSignatureLen,CK_BYTE_PTR pData,CK_ULONG_PTR pulDataLen)84*12720SWyllys.Ingersoll@Sun.COM C_VerifyRecover(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature,
85*12720SWyllys.Ingersoll@Sun.COM     CK_ULONG ulSignatureLen, CK_BYTE_PTR pData, CK_ULONG_PTR pulDataLen)
86*12720SWyllys.Ingersoll@Sun.COM {
87*12720SWyllys.Ingersoll@Sun.COM 	if (!kms_initialized)
88*12720SWyllys.Ingersoll@Sun.COM 		return (CKR_CRYPTOKI_NOT_INITIALIZED);
89*12720SWyllys.Ingersoll@Sun.COM 
90*12720SWyllys.Ingersoll@Sun.COM 	return (CKR_FUNCTION_NOT_SUPPORTED);
91*12720SWyllys.Ingersoll@Sun.COM }
92