mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 08:56:17 +08:00
[crypto] fix no-base58
This commit is contained in:
@@ -12,9 +12,12 @@
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/base58.h>
|
||||
|
||||
#ifndef OPENSSL_NO_BASE58
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
|
||||
|
||||
# define ERR_FUNC(func) ERR_PACK(ERR_LIB_BASE58,func,0)
|
||||
# define ERR_REASON(reason) ERR_PACK(ERR_LIB_BASE58,0,reason)
|
||||
|
||||
@@ -42,3 +45,5 @@ int ERR_load_BASE58_strings(void)
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -73,7 +73,9 @@ static ERR_STRING_DATA ERR_str_libraries[] = {
|
||||
{ERR_PACK(ERR_LIB_SDF, 0, 0), "SDF routines"},
|
||||
{ERR_PACK(ERR_LIB_SKF, 0, 0), "SKF routines"},
|
||||
{ERR_PACK(ERR_LIB_SOF, 0, 0), "SOF routines"},
|
||||
#ifndef OPENSSL_NO_BASE58
|
||||
{ERR_PACK(ERR_LIB_BASE58, 0, 0), "BASE58 routines"},
|
||||
#endif
|
||||
{0, NULL},
|
||||
};
|
||||
|
||||
@@ -132,8 +134,9 @@ static ERR_STRING_DATA ERR_str_reasons[] = {
|
||||
{ERR_R_SDF_LIB, "SDF lib"},
|
||||
{ERR_R_SKF_LIB, "SKF lib"},
|
||||
{ERR_R_SOF_LIB, "SOF lib"},
|
||||
#ifndef OPENSSL_NO_BASE58
|
||||
{ERR_R_BASE58_LIB, "BASE58 lib"},
|
||||
|
||||
#endif
|
||||
{ERR_R_NESTED_ASN1_ERROR, "nested asn1 error"},
|
||||
{ERR_R_MISSING_ASN1_EOS, "missing asn1 eos"},
|
||||
|
||||
|
||||
@@ -53,7 +53,9 @@
|
||||
#include <openssl/gmsdf.h>
|
||||
#include <openssl/gmskf.h>
|
||||
#include <openssl/gmsof.h>
|
||||
#ifndef OPENSSL_NO_BASE58
|
||||
#include <openssl/base58.h>
|
||||
#endif
|
||||
|
||||
|
||||
int err_load_crypto_strings_int(void)
|
||||
|
||||
@@ -107,7 +107,9 @@ typedef struct err_state_st {
|
||||
# define ERR_LIB_SDF 63
|
||||
# define ERR_LIB_SKF 64
|
||||
# define ERR_LIB_SOF 65
|
||||
#ifndef OPENSSL_NO_BASE58
|
||||
# define ERR_LIB_BASE58 66
|
||||
#endif
|
||||
|
||||
# define ERR_LIB_USER 128
|
||||
|
||||
@@ -160,8 +162,9 @@ typedef struct err_state_st {
|
||||
# define SDFerr(f,r) ERR_PUT_error(ERR_LIB_SDF,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
|
||||
# define SKFerr(f,r) ERR_PUT_error(ERR_LIB_SKF,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
|
||||
# define SOFerr(f,r) ERR_PUT_error(ERR_LIB_SOF,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
|
||||
#ifndef OPENSSL_NO_BASE58
|
||||
# define BASE58err(f,r) ERR_PUT_error(ERR_LIB_BASE58,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
|
||||
|
||||
#endif
|
||||
# define ERR_PACK(l,f,r) ( \
|
||||
(((unsigned int)(l) & 0x0FF) << 24L) | \
|
||||
(((unsigned int)(f) & 0xFFF) << 12L) | \
|
||||
@@ -222,8 +225,9 @@ typedef struct err_state_st {
|
||||
# define ERR_R_SDF_LIB ERR_LIB_SDF/* 63 */
|
||||
# define ERR_R_SKF_LIB ERR_LIB_SKF/* 64 */
|
||||
# define ERR_R_SOF_LIB ERR_LIB_SOF/* 65 */
|
||||
#ifndef OPENSSL_NO_BASE58
|
||||
# define ERR_R_BASE58_LIB ERR_LIB_BASE58/* 66 */
|
||||
|
||||
#endif
|
||||
# define ERR_R_NESTED_ASN1_ERROR 58
|
||||
|
||||
# define ERR_R_NESTED_ASN1_ERROR 58
|
||||
|
||||
Reference in New Issue
Block a user