@@ -731,7 +731,7 @@ static int wolfPKCS11_Store_GetMaxSize(int type, int variableSz)
731731 * @return NOT_AVAILABLE_E when data not available.
732732 * @return Other value to indicate failure.
733733 */
734- int wolfPKCS11_Store_Open (int type , CK_ULONG id1 , CK_ULONG id2 , int read ,
734+ int wolfPKCS11_Store_OpenSz (int type , CK_ULONG id1 , CK_ULONG id2 , int read ,
735735 int variableSz , void * * store )
736736{
737737 int ret = 0 ;
@@ -908,6 +908,24 @@ int wolfPKCS11_Store_Open(int type, CK_ULONG id1, CK_ULONG id2, int read,
908908 return ret ;
909909}
910910
911+ /**
912+ * Opens access to location to read/write token data.
913+ *
914+ * @param [in] type Type of data to be stored. See WOLFPKCS11_STORE_*.
915+ * @param [in] id1 Numeric identifier 1.
916+ * @param [in] id2 Numeric identifier 2.
917+ * @param [in] read 1 when opening for read and 0 for write.
918+ * @param [out] store Returns file pointer.
919+ * @return 0 on success.
920+ * @return NOT_AVAILABLE_E when data not available.
921+ * @return Other value to indicate failure.
922+ */
923+ int wolfPKCS11_Store_Open (int type , CK_ULONG id1 , CK_ULONG id2 , int read ,
924+ void * * store )
925+ {
926+ return wolfPKCS11_Store_OpenSz (type , id1 , id2 , read , 0 , store );
927+ }
928+
911929/**
912930 * Closes access to location being read or written.
913931 * Any dynamic memory associated with the store is freed here.
@@ -1037,7 +1055,7 @@ int wolfPKCS11_Store_Write(void* store, unsigned char* buffer, int len)
10371055static int wp11_storage_open_readonly (int type , CK_ULONG id1 , CK_ULONG id2 ,
10381056 void * * storage )
10391057{
1040- return wolfPKCS11_Store_Open (type , id1 , id2 , 1 , 0 , storage );
1058+ return wolfPKCS11_Store_OpenSz (type , id1 , id2 , 1 , 0 , storage );
10411059}
10421060
10431061/*
@@ -1055,7 +1073,7 @@ static int wp11_storage_open_readonly(int type, CK_ULONG id1, CK_ULONG id2,
10551073static int wp11_storage_open (int type , CK_ULONG id1 , CK_ULONG id2 ,
10561074 int variableSz , void * * storage )
10571075{
1058- return wolfPKCS11_Store_Open (type , id1 , id2 , 0 , variableSz , storage );
1076+ return wolfPKCS11_Store_OpenSz (type , id1 , id2 , 0 , variableSz , storage );
10591077}
10601078
10611079/*
0 commit comments