/****************************************************************************** ** ** $Id: p11_dual.c,v 1.2 2003/02/13 20:06:38 ghoo Exp $ ** ** Package: PKCS-11 ** Author : Chris Osgood ** License: Copyright (C) 2002 Schlumberger Network Solutions ** ** Purpose: Dual-function cryptographic operation ** ******************************************************************************/ #include "cryptoki.h" /* C_DigestEncryptUpdate continues a multiple-part digesting * and encryption operation. */ CK_DEFINE_FUNCTION(CK_RV, C_DigestEncryptUpdate) ( CK_SESSION_HANDLE hSession, /* session's handle */ CK_BYTE_PTR pPart, /* the plaintext data */ CK_ULONG ulPartLen, /* plaintext length */ CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */ CK_ULONG_PTR pulEncryptedPartLen /* gets c-text length */ ) { CK_RV rv = CKR_OK; P11_LOG_START("C_DigestEncryptUpdate"); thread_MutexLock(st.async_lock); rv = CKR_FUNCTION_NOT_SUPPORTED; log_Log(LOG_MED, "Function not supported"); thread_MutexUnlock(st.async_lock); P11_LOG_END("C_DigestEncryptUpdate"); return rv; } /* C_DecryptDigestUpdate continues a multiple-part decryption and * digesting operation. */ CK_DEFINE_FUNCTION(CK_RV, C_DecryptDigestUpdate) ( CK_SESSION_HANDLE hSession, /* session's handle */ CK_BYTE_PTR pEncryptedPart, /* ciphertext */ CK_ULONG ulEncryptedPartLen, /* ciphertext length */ CK_BYTE_PTR pPart, /* gets plaintext */ CK_ULONG_PTR pulPartLen /* gets plaintext len */ ) { CK_RV rv = CKR_OK; P11_LOG_START("C_DecryptDigestUpdate"); thread_MutexLock(st.async_lock); rv = CKR_FUNCTION_NOT_SUPPORTED; log_Log(LOG_MED, "Function not supported"); thread_MutexUnlock(st.async_lock); P11_LOG_END("C_DecryptDigestUpdate"); return rv; } /* C_SignEncryptUpdate continues a multiple-part signing and * encryption operation. */ CK_DEFINE_FUNCTION(CK_RV, C_SignEncryptUpdate) ( CK_SESSION_HANDLE hSession, /* session's handle */ CK_BYTE_PTR pPart, /* the plaintext data */ CK_ULONG ulPartLen, /* plaintext length */ CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */ CK_ULONG_PTR pulEncryptedPartLen /* gets c-text length */ ) { CK_RV rv = CKR_OK; P11_LOG_START("C_SignEncryptUpdate"); thread_MutexLock(st.async_lock); rv = CKR_FUNCTION_NOT_SUPPORTED; log_Log(LOG_MED, "Function not supported"); thread_MutexUnlock(st.async_lock); P11_LOG_END("C_SignEncryptUpdate"); return rv; } /* C_DecryptVerifyUpdate continues a multiple-part decryption and * verify operation. */ CK_DEFINE_FUNCTION(CK_RV, C_DecryptVerifyUpdate) ( CK_SESSION_HANDLE hSession, /* session's handle */ CK_BYTE_PTR pEncryptedPart, /* ciphertext */ CK_ULONG ulEncryptedPartLen, /* ciphertext length */ CK_BYTE_PTR pPart, /* gets plaintext */ CK_ULONG_PTR pulPartLen /* gets p-text length */ ) { CK_RV rv = CKR_OK; P11_LOG_START("C_DecryptVerifyUpdate"); thread_MutexLock(st.async_lock); rv = CKR_FUNCTION_NOT_SUPPORTED; log_Log(LOG_MED, "Function not supported"); thread_MutexUnlock(st.async_lock); P11_LOG_END("C_DecryptVerifyUpdate"); return rv; }