From: IBM Rajiv <[email protected]>

Signed-off-by: Rajiv Andrade <[email protected]>
---
 usr/lib/pkcs11/cca_stdll/mech_sha.c |  104 +++++++++++++++++++++++++++++++++++
 1 files changed, 104 insertions(+), 0 deletions(-)

diff --git a/usr/lib/pkcs11/cca_stdll/mech_sha.c 
b/usr/lib/pkcs11/cca_stdll/mech_sha.c
index 9278993..8a6e69d 100644
--- a/usr/lib/pkcs11/cca_stdll/mech_sha.c
+++ b/usr/lib/pkcs11/cca_stdll/mech_sha.c
@@ -172,6 +172,30 @@ sha2_hash( SESSION         *sess,
    return ckm_sha2_final(  ctx, out_data, out_data_len );
 }
 
+CK_RV
+sha3_hash( SESSION         *sess,
+           CK_BBOOL         length_only,
+           DIGEST_CONTEXT  *ctx,
+           CK_BYTE         *in_data,
+           CK_ULONG         in_data_len,
+           CK_BYTE         *out_data,
+           CK_ULONG        *out_data_len )
+{
+       DBG("Unsupported function reached.");
+       return CKR_FUNCTION_NOT_SUPPORTED;
+}
+CK_RV
+sha5_hash( SESSION         *sess,
+           CK_BBOOL         length_only,
+           DIGEST_CONTEXT  *ctx,
+           CK_BYTE         *in_data,
+           CK_ULONG         in_data_len,
+           CK_BYTE         *out_data,
+           CK_ULONG        *out_data_len )
+{
+       DBG("Unsupported function reached.");
+       return CKR_FUNCTION_NOT_SUPPORTED;
+}
 //
 //
 CK_RV
@@ -200,6 +224,24 @@ sha2_hash_update( SESSION        * sess,
    return ckm_sha2_update( ctx, in_data, in_data_len );
 }
 
+CK_RV
+sha3_hash_update( SESSION        * sess,
+                  DIGEST_CONTEXT * ctx,
+                  CK_BYTE        * in_data,
+                  CK_ULONG         in_data_len )
+{
+       DBG("Unsupported function reached.");
+       return CKR_FUNCTION_NOT_SUPPORTED;
+}
+CK_RV
+sha5_hash_update( SESSION        * sess,
+                  DIGEST_CONTEXT * ctx,
+                  CK_BYTE        * in_data,
+                  CK_ULONG         in_data_len )
+{
+       DBG("Unsupported function reached.");
+       return CKR_FUNCTION_NOT_SUPPORTED;
+}
 //
 //
 CK_RV
@@ -240,6 +282,26 @@ sha2_hash_final( SESSION         * sess,
    return ckm_sha2_final( ctx, out_data, out_data_len );
 }
 
+CK_RV
+sha3_hash_final( SESSION         * sess,
+                 CK_BYTE           length_only,
+                 DIGEST_CONTEXT  * ctx,
+                 CK_BYTE         * out_data,
+                 CK_ULONG        * out_data_len )
+{
+       DBG("Unsupported function reached.");
+       return CKR_FUNCTION_NOT_SUPPORTED;
+}
+CK_RV
+sha5_hash_final( SESSION         * sess,
+                 CK_BYTE           length_only,
+                 DIGEST_CONTEXT  * ctx,
+                 CK_BYTE         * out_data,
+                 CK_ULONG        * out_data_len )
+{
+       DBG("Unsupported function reached.");
+       return CKR_FUNCTION_NOT_SUPPORTED;
+}
 // this routine gets called for two mechanisms actually:
 //    CKM_SHA_1_HMAC
 //    CKM_SHA_1_HMAC_GENERAL
@@ -760,6 +822,38 @@ ckm_sha2_update( DIGEST_CONTEXT * ctx,
     return token_specific.t_sha2_update(ctx, in_data, in_data_len);
 }
 
+CK_RV
+ckm_sha3_update( DIGEST_CONTEXT * ctx,
+                 CK_BYTE        * in_data,
+                 CK_ULONG         in_data_len )
+{
+       DBG("Unsupported function reached.");
+       return CKR_FUNCTION_NOT_SUPPORTED;
+}
+CK_RV
+ckm_sha5_update( DIGEST_CONTEXT * ctx,
+                 CK_BYTE        * in_data,
+                 CK_ULONG         in_data_len )
+{
+       DBG("Unsupported function reached.");
+       return CKR_FUNCTION_NOT_SUPPORTED;
+}
+CK_RV
+ckm_sha3_final( DIGEST_CONTEXT * ctx,
+                CK_BYTE        * out_data,
+                CK_ULONG       * out_data_len )
+{
+       DBG("Unsupported function reached.");
+       return CKR_FUNCTION_NOT_SUPPORTED;
+}
+CK_RV
+ckm_sha5_final( DIGEST_CONTEXT * ctx,
+                CK_BYTE        * out_data,
+                CK_ULONG       * out_data_len )
+{
+       DBG("Unsupported function reached.");
+       return CKR_FUNCTION_NOT_SUPPORTED;
+}
 //
 //
 CK_RV
@@ -840,6 +934,16 @@ ckm_sha2_init( DIGEST_CONTEXT * ctx)
     }
 }
 
+void
+ckm_sha5_init( DIGEST_CONTEXT * ctx)
+{
+       ctx = NULL;
+}
+void
+ckm_sha3_init( DIGEST_CONTEXT * ctx)
+{
+       ctx = NULL;
+}
 // Perform the SHA transformation.  Note that this code, like MD5, seems to
 // break some optimizing compilers due to the complexity of the expressions
 // and the size of the basic block.  It may be necessary to split it into
-- 
1.6.6


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to