1 /*
2 * CDDL HEADER START
3 *
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.
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 *
21 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
22 */
23
24 #include <security/cryptoki.h>
25 #include "kmsGlobal.h"
26
27 /*ARGSUSED*/
28 CK_RV
C_SignInit(CK_SESSION_HANDLE hSession,CK_MECHANISM_PTR pMechanism,CK_OBJECT_HANDLE hKey)29 C_SignInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism,
30 CK_OBJECT_HANDLE hKey)
31 {
32 if (!kms_initialized)
33 return (CKR_CRYPTOKI_NOT_INITIALIZED);
34
35 return (CKR_FUNCTION_NOT_SUPPORTED);
36 }
37
38 /*ARGSUSED*/
39 CK_RV
C_Sign(CK_SESSION_HANDLE hSession,CK_BYTE_PTR pData,CK_ULONG ulDataLen,CK_BYTE_PTR pSignature,CK_ULONG_PTR pulSignatureLen)40 C_Sign(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG ulDataLen,
41 CK_BYTE_PTR pSignature, CK_ULONG_PTR pulSignatureLen)
42 {
43 if (!kms_initialized)
44 return (CKR_CRYPTOKI_NOT_INITIALIZED);
45
46 return (CKR_FUNCTION_NOT_SUPPORTED);
47 }
48
49
50 /*ARGSUSED*/
51 CK_RV
C_SignUpdate(CK_SESSION_HANDLE hSession,CK_BYTE_PTR pPart,CK_ULONG ulPartLen)52 C_SignUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart,
53 CK_ULONG ulPartLen)
54 {
55 if (!kms_initialized)
56 return (CKR_CRYPTOKI_NOT_INITIALIZED);
57 return (CKR_FUNCTION_NOT_SUPPORTED);
58 }
59
60 /*ARGSUSED*/
61 CK_RV
C_SignFinal(CK_SESSION_HANDLE hSession,CK_BYTE_PTR pSignature,CK_ULONG_PTR pulSignatureLen)62 C_SignFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature,
63 CK_ULONG_PTR pulSignatureLen)
64 {
65 if (!kms_initialized)
66 return (CKR_CRYPTOKI_NOT_INITIALIZED);
67
68 return (CKR_FUNCTION_NOT_SUPPORTED);
69 }
70
71 /*ARGSUSED*/
72 CK_RV
C_SignRecoverInit(CK_SESSION_HANDLE hSession,CK_MECHANISM_PTR pMechanism,CK_OBJECT_HANDLE hKey)73 C_SignRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism,
74 CK_OBJECT_HANDLE hKey)
75 {
76 if (!kms_initialized)
77 return (CKR_CRYPTOKI_NOT_INITIALIZED);
78
79 return (CKR_FUNCTION_NOT_SUPPORTED);
80
81 }
82
83 /*ARGSUSED*/
84 CK_RV
C_SignRecover(CK_SESSION_HANDLE hSession,CK_BYTE_PTR pData,CK_ULONG ulDataLen,CK_BYTE_PTR pSignature,CK_ULONG_PTR pulSignatureLen)85 C_SignRecover(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData,
86 CK_ULONG ulDataLen, CK_BYTE_PTR pSignature, CK_ULONG_PTR pulSignatureLen)
87 {
88 if (!kms_initialized)
89 return (CKR_CRYPTOKI_NOT_INITIALIZED);
90
91 return (CKR_FUNCTION_NOT_SUPPORTED);
92 }
93