mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-20 12:17:13 +08:00
Remove warnings
This commit is contained in:
@@ -536,8 +536,8 @@ int skf_import_object(SKF_DEVICE *dev, const char *appname, const char *pin,
|
||||
error_print();
|
||||
return -1;
|
||||
}
|
||||
if (SKF_CreateFile(hApp, (LPSTR)objname, datalen, ulReadRights, ulWriteRights) != SAR_OK
|
||||
|| SKF_WriteFile(hApp, (LPSTR)objname, 0, (BYTE *)data, datalen) != SAR_OK) {
|
||||
if (SKF_CreateFile(hApp, (LPSTR)objname, (ULONG)datalen, ulReadRights, ulWriteRights) != SAR_OK
|
||||
|| SKF_WriteFile(hApp, (LPSTR)objname, 0, (BYTE *)data, (ULONG)datalen) != SAR_OK) {
|
||||
error_print();
|
||||
goto end;
|
||||
}
|
||||
@@ -554,7 +554,6 @@ int skf_export_object(SKF_DEVICE *dev, const char *appname, const char *pin,
|
||||
HAPPLICATION hApp = NULL;
|
||||
FILEATTRIBUTE fileInfo;
|
||||
ULONG ulen;
|
||||
int len;
|
||||
|
||||
if (!dev || !appname || !pin || !objname || !outlen) {
|
||||
error_print();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2014-2022 The GmSSL Project. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2014-2022 The GmSSL Project. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -434,7 +434,7 @@ ULONG DEVAPI SKF_ExportCertificate(
|
||||
BYTE *pbCert,
|
||||
ULONG *pulCertLen)
|
||||
{
|
||||
*pulCertLen = strlen(sm2cert_pemstr);
|
||||
*pulCertLen = (ULONG)strlen(sm2cert_pemstr);
|
||||
memcpy(pbCert, sm2cert_pemstr, *pulCertLen);
|
||||
|
||||
return SAR_OK;
|
||||
|
||||
Reference in New Issue
Block a user