Fix export symbol bug in MSVC

This commit is contained in:
Zhi Guan
2022-12-24 10:50:44 +08:00
parent fac880d47d
commit 0eb4bd9c1d
7 changed files with 53 additions and 32 deletions

View File

@@ -157,28 +157,6 @@ int sm2_jacobian_point_print(FILE *fp, int fmt, int ind, const char *label, cons
#define sm2_jacobian_point_copy(R, P) memcpy((R), (P), sizeof(SM2_JACOBIAN_POINT))
/*
SM2 Public API
SM2接口有两个层次基本的和ASN.1/PKI的
基本的接口不依赖ASN.1编码,可以直接将结构体的内存输出(endian一致即可)
基本的接口也不进行输入的格式检查,调用方应保证输入不为空
*/
// 这里应该用#define 给出常量的值
extern const SM2_BN SM2_P;
//extern const SM2_BN SM2_A;
extern const SM2_BN SM2_B;
extern const SM2_BN SM2_N;
extern const SM2_BN SM2_ONE;
extern const SM2_BN SM2_TWO;
extern const SM2_BN SM2_THREE;
extern const SM2_BN SM2_U_PLUS_ONE;
extern const SM2_JACOBIAN_POINT *SM2_G; // 应该同时给出Affine的
typedef struct {
uint8_t x[32];
uint8_t y[32];

View File

@@ -297,7 +297,6 @@ typedef struct {
sm9_fp_t Y;
sm9_fp_t Z;
} SM9_POINT;
extern const SM9_POINT *SM9_P1;
#define sm9_point_init(R) sm9_point_set_infinity(R)
#define sm9_point_clean(R) sm9_point_set_infinity(R)
@@ -326,9 +325,6 @@ typedef struct {
sm9_fp2_t Z;
} SM9_TWIST_POINT;
extern const SM9_TWIST_POINT *SM9_P2;
extern const SM9_TWIST_POINT *SM9_Ppubs;
#define sm9_twist_point_copy(R, P) memcpy((R), (P), sizeof(SM9_TWIST_POINT))
int sm9_twist_point_to_uncompressed_octets(const SM9_TWIST_POINT *P, uint8_t octets[129]);