998 obsolete DMA driver interfaces should be removed
[illumos-gate.git] / usr / src / lib / pkcs11 / pkcs11_kms / common / kmsDigest.c
blob5472ccb15b7d4b6d2782caa840bb1609d6588e22
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) 2003, 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_DigestInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism)
31 if (!kms_initialized)
32 return (CKR_CRYPTOKI_NOT_INITIALIZED);
34 return (CKR_FUNCTION_NOT_SUPPORTED);
37 /*ARGSUSED*/
38 CK_RV
39 C_Digest(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG ulDataLen,
40 CK_BYTE_PTR pDigest, CK_ULONG_PTR pulDigestLen)
42 if (!kms_initialized)
43 return (CKR_CRYPTOKI_NOT_INITIALIZED);
45 return (CKR_FUNCTION_NOT_SUPPORTED);
48 /*ARGSUSED*/
49 CK_RV
50 C_DigestUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart,
51 CK_ULONG ulPartLen)
53 if (!kms_initialized)
54 return (CKR_CRYPTOKI_NOT_INITIALIZED);
56 return (CKR_FUNCTION_NOT_SUPPORTED);
59 /*ARGSUSED*/
60 CK_RV
61 C_DigestKey(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey)
63 if (!kms_initialized)
64 return (CKR_CRYPTOKI_NOT_INITIALIZED);
66 return (CKR_FUNCTION_NOT_SUPPORTED);
69 /*ARGSUSED*/
70 CK_RV
71 C_DigestFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pDigest,
72 CK_ULONG_PTR pulDigestLen)
74 if (!kms_initialized)
75 return (CKR_CRYPTOKI_NOT_INITIALIZED);
77 return (CKR_FUNCTION_NOT_SUPPORTED);