mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-10 16:03:48 +08:00
remove warnings
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -42,8 +42,6 @@ static ERR_STRING_DATA SDF_str_functs[] = {
|
||||
{ERR_FUNC(SDF_F_SDF_EXPORTSIGNPUBLICKEY_RSA),
|
||||
"SDF_ExportSignPublicKey_RSA"},
|
||||
{ERR_FUNC(SDF_F_SDF_EXTERNALENCRYPT_ECC), "SDF_ExternalEncrypt_ECC"},
|
||||
{ERR_FUNC(SDF_F_SDF_EXTERNALPRIVATEKEYOPERATION_RSA),
|
||||
"SDF_EXTERNALPRIVATEKEYOPERATION_RSA"},
|
||||
{ERR_FUNC(SDF_F_SDF_EXTERNALPUBLICKEYOPERATION_RSA),
|
||||
"SDF_ExternalPublicKeyOperation_RSA"},
|
||||
{ERR_FUNC(SDF_F_SDF_EXTERNALVERIFY_ECC), "SDF_ExternalVerify_ECC"},
|
||||
@@ -106,29 +104,23 @@ static ERR_STRING_DATA SDF_str_reasons[] = {
|
||||
{ERR_REASON(SDF_R_FILE_ALREADY_EXIST), "file already exist"},
|
||||
{ERR_REASON(SDF_R_FILE_NOT_EXIST), "file not exist"},
|
||||
{ERR_REASON(SDF_R_HARDWARE_ERROR), "hardware error"},
|
||||
{ERR_REASON(SDF_R_INVALID_CIPHER_ALGOR), "invalid cipher algor"},
|
||||
{ERR_REASON(SDF_R_INVALID_DIGEST_ALGOR), "invalid digest algor"},
|
||||
{ERR_REASON(SDF_R_INVALID_FILE_OFFSET), "invalid file offset"},
|
||||
{ERR_REASON(SDF_R_INVALID_FILE_SIZE), "invalid file size"},
|
||||
{ERR_REASON(SDF_R_INVALID_INPUT_ARGUMENT), "invalid input argument"},
|
||||
{ERR_REASON(SDF_R_INVALID_KEY), "invalid key"},
|
||||
{ERR_REASON(SDF_R_INVALID_KEY_LENGTH), "invalid key length"},
|
||||
{ERR_REASON(SDF_R_INVALID_KEY_TYPE), "invalid key type"},
|
||||
{ERR_REASON(SDF_R_INVALID_OUTPUT_ARGUMENT), "invalid output argument"},
|
||||
{ERR_REASON(SDF_R_INVALID_SANSEC_ECCCIPHER_LENGTH),
|
||||
"invalid sansec ecccipher length"},
|
||||
{ERR_REASON(SDF_R_INVALID_SDF_LIBRARY), "invalid sdf library"},
|
||||
{ERR_REASON(SDF_R_INVALID_SESSION_HANDLE), "invalid session handle"},
|
||||
{ERR_REASON(SDF_R_INVALID_SM2_CIPHERTEXT_LENGTH),
|
||||
"invalid sm2 ciphertext length"},
|
||||
{ERR_REASON(SDF_R_KEY_NOT_EXIST), "key not exist"},
|
||||
{ERR_REASON(SDF_R_LOAD_LIBRARY_FAILURE), "load library failure"},
|
||||
{ERR_REASON(SDF_R_MAC_ERROR), "mac error"},
|
||||
{ERR_REASON(SDF_R_METHOD_OPERATION_FAILURE), "method operation failure"},
|
||||
{ERR_REASON(SDF_R_MULTI_STEP_OPERATION_ERROR),
|
||||
"multi step operation error"},
|
||||
{ERR_REASON(SDF_R_NOT_IMPLEMENTED), "not implemented"},
|
||||
{ERR_REASON(SDF_R_NOT_INITIALIZED), "not initialized"},
|
||||
{ERR_REASON(SDF_R_NOT_SUPPORTED), "not supported"},
|
||||
{ERR_REASON(SDF_R_NOT_SUPPORTED_CIPHER_ALGOR),
|
||||
"not supported cipher algor"},
|
||||
{ERR_REASON(SDF_R_NOT_SUPPORTED_DIGEST_ALGOR),
|
||||
@@ -139,7 +131,6 @@ static ERR_STRING_DATA SDF_str_reasons[] = {
|
||||
"no private key access right"},
|
||||
{ERR_REASON(SDF_R_OPEN_DEVICE_FAILURE), "open device failure"},
|
||||
{ERR_REASON(SDF_R_OPEN_SESSION_FAILURE), "open session failure"},
|
||||
{ERR_REASON(SDF_R_OPERATION_FAILED), "operation failed"},
|
||||
{ERR_REASON(SDF_R_OPERATION_NOT_SUPPORTED), "operation not supported"},
|
||||
{ERR_REASON(SDF_R_PRIVATE_KEY_OPERATION_FAILURE),
|
||||
"private key operation failure"},
|
||||
@@ -247,9 +238,6 @@ static ERR_STRING_DATA SDF_str_reasons[] = {
|
||||
{ERR_REASON(SDF_R_SANSEC_SOCKET_TIMEOUT), "sansec socket timeout"},
|
||||
{ERR_REASON(SDF_R_SANSEC_SYNC_ERROR), "sansec sync error"},
|
||||
{ERR_REASON(SDF_R_SANSEC_SYNC_LOGIN_ERROR), "sansec sync login error"},
|
||||
{ERR_REASON(SDF_R_SDF_METHOD_RETURN_FAILURE),
|
||||
"sdf method return failure"},
|
||||
{ERR_REASON(SDF_R_SDF_OPERATION_FAILED), "sdf operation failed"},
|
||||
{ERR_REASON(SDF_R_SIGNING_FAILURE), "signing failure"},
|
||||
{ERR_REASON(SDF_R_SUCCESS), "success"},
|
||||
{ERR_REASON(SDF_R_SYMMETRIC_OPERATION_FAILURE),
|
||||
|
||||
@@ -235,7 +235,12 @@ int SDF_ImportKey(
|
||||
unsigned int uiKeyLength,
|
||||
void **phKeyHandle)
|
||||
{
|
||||
return 0;
|
||||
(void)hSessionHandle;
|
||||
(void)pucKey;
|
||||
(void)uiKeyLength;
|
||||
(void)phKeyHandle;
|
||||
SDFerr(SDF_F_SDF_IMPORTKEY, SDF_R_NOT_IMPLEMENTED);
|
||||
return SDR_NOTSUPPORT;
|
||||
}
|
||||
|
||||
int SDF_NewECCCipher(ECCCipher **cipher, size_t ulDataLen)
|
||||
|
||||
@@ -124,7 +124,7 @@ static SDF_ERR_REASON sdf_errors[] = {
|
||||
|
||||
static unsigned long sdf_get_error_reason(int err)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < OSSL_NELEM(sdf_errors); i++) {
|
||||
if (err == sdf_errors[i].err) {
|
||||
return sdf_errors[i].reason;
|
||||
|
||||
@@ -100,7 +100,7 @@ static SDF_ALGOR_PAIR sansec_ciphers[] = {
|
||||
|
||||
static unsigned int sansec_cipher_vendor2std(unsigned int vendor_id)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < OSSL_NELEM(sansec_ciphers); i++) {
|
||||
if (vendor_id == sansec_ciphers[i].vendor_id) {
|
||||
return sansec_ciphers[i].std_id;
|
||||
@@ -111,7 +111,7 @@ static unsigned int sansec_cipher_vendor2std(unsigned int vendor_id)
|
||||
|
||||
static unsigned int sansec_cipher_std2vendor(unsigned int std_id)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < OSSL_NELEM(sansec_ciphers); i++) {
|
||||
if (std_id == sansec_ciphers[i].std_id) {
|
||||
return sansec_ciphers[i].vendor_id;
|
||||
@@ -123,7 +123,7 @@ static unsigned int sansec_cipher_std2vendor(unsigned int std_id)
|
||||
static unsigned int sansec_cipher_cap(unsigned int vendor_cap)
|
||||
{
|
||||
unsigned int std_cap = 0;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < OSSL_NELEM(sansec_ciphers); i++) {
|
||||
if (vendor_cap & sansec_ciphers[i].vendor_id) {
|
||||
@@ -146,7 +146,7 @@ static SDF_ALGOR_PAIR sansec_digests[] = {
|
||||
|
||||
static unsigned int sansec_digest_vendor2std(unsigned int vendor_id)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < OSSL_NELEM(sansec_digests); i++) {
|
||||
if (vendor_id == sansec_digests[i].vendor_id) {
|
||||
return sansec_digests[i].std_id;
|
||||
@@ -157,7 +157,7 @@ static unsigned int sansec_digest_vendor2std(unsigned int vendor_id)
|
||||
|
||||
static unsigned int sansec_digest_std2vendor(unsigned int std_id)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < OSSL_NELEM(sansec_digests); i++) {
|
||||
if (std_id == sansec_digests[i].std_id) {
|
||||
return sansec_digests[i].vendor_id;
|
||||
@@ -169,7 +169,7 @@ static unsigned int sansec_digest_std2vendor(unsigned int std_id)
|
||||
static unsigned int sansec_digest_cap(unsigned int vendor_cap)
|
||||
{
|
||||
unsigned int std_cap = 0;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < OSSL_NELEM(sansec_digests); i++) {
|
||||
if (vendor_cap & sansec_digests[i].vendor_id) {
|
||||
@@ -192,7 +192,7 @@ static SDF_ALGOR_PAIR sansec_pkeys[] = {
|
||||
|
||||
static unsigned int sansec_pkey_vendor2std(unsigned int vendor_id)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < OSSL_NELEM(sansec_pkeys); i++) {
|
||||
if (vendor_id == sansec_pkeys[i].vendor_id) {
|
||||
return sansec_pkeys[i].std_id;
|
||||
@@ -203,7 +203,7 @@ static unsigned int sansec_pkey_vendor2std(unsigned int vendor_id)
|
||||
|
||||
static unsigned int sansec_pkey_std2vendor(unsigned int std_id)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < OSSL_NELEM(sansec_pkeys); i++) {
|
||||
if (std_id == sansec_pkeys[i].std_id) {
|
||||
return sansec_pkeys[i].vendor_id;
|
||||
@@ -215,7 +215,7 @@ static unsigned int sansec_pkey_std2vendor(unsigned int std_id)
|
||||
static unsigned int sansec_pkey_cap(unsigned int vendor_cap)
|
||||
{
|
||||
unsigned int std_cap = 0;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < OSSL_NELEM(sansec_pkeys); i++) {
|
||||
if (vendor_cap & sansec_pkeys[i].vendor_id) {
|
||||
@@ -341,7 +341,7 @@ static SDF_ERR_REASON sansec_errors[] = {
|
||||
|
||||
static unsigned long sansec_get_error_reason(int err)
|
||||
{
|
||||
int i = 0;
|
||||
size_t i = 0;
|
||||
for (i = 0; i < OSSL_NELEM(sansec_errors); i++) {
|
||||
if (err == sansec_errors[i].err) {
|
||||
return sansec_errors[i].reason;
|
||||
|
||||
Reference in New Issue
Block a user