Add sm2utl and sm9utl commands

This commit is contained in:
Zhi Guan
2018-12-25 14:49:12 +08:00
parent 0e38e3e7a3
commit 786d6f0205
15 changed files with 6500 additions and 5419 deletions

View File

@@ -41,9 +41,9 @@ extern "C" {
*/
# define OPENSSL_VERSION_NUMBER 0x1010004fL
# ifdef OPENSSL_FIPS
# define OPENSSL_VERSION_TEXT "GmSSL 2.4.2 - OpenSSL 1.1.0d-fips 19 Dec 2018"
# define OPENSSL_VERSION_TEXT "GmSSL 2.4.2 - OpenSSL 1.1.0d-fips 25 Dec 2018"
# else
# define OPENSSL_VERSION_TEXT "GmSSL 2.4.2 - OpenSSL 1.1.0d 19 Dec 2018"
# define OPENSSL_VERSION_TEXT "GmSSL 2.4.2 - OpenSSL 1.1.0d 25 Dec 2018"
# endif
/*-

View File

@@ -112,6 +112,8 @@ int SM2_verify(int type, const unsigned char *dgst, int dgstlen,
typedef struct SM2CiphertextValue_st SM2CiphertextValue;
DECLARE_ASN1_FUNCTIONS(SM2CiphertextValue)
int i2d_SM2CiphertextValue_bio(BIO *bp, SM2CiphertextValue *a);
SM2CiphertextValue *d2i_SM2CiphertextValue_bio(BIO *bp, SM2CiphertextValue **a);
#ifndef OPENSSL_NO_STDIO
SM2CiphertextValue *d2i_SM2CiphertextValue_fp(FILE *fp, SM2CiphertextValue **a);
int i2d_SM2CiphertextValue_fp(FILE *fp, SM2CiphertextValue *a);

View File

@@ -180,6 +180,10 @@ int SM9_compute_share_key_B(int type,
int SM9_MASTER_KEY_print(BIO *bp, const SM9_MASTER_KEY *x, int off);
int SM9_KEY_print(BIO *bp, const SM9_KEY *x, int off);
int i2d_SM9Signature_bio(BIO *bp, SM9Signature *a);
SM9Signature *d2i_SM9Signature_bio(BIO *bp, SM9Signature **a);
int i2d_SM9Ciphertext_bio(BIO *bp, SM9Ciphertext *a);
SM9Ciphertext *d2i_SM9Ciphertext_bio(BIO *bp, SM9Ciphertext **a);
#ifndef OPENSSL_NO_STDIO
SM9MasterSecret *d2i_SM9MasterSecret_fp(FILE *fp, SM9MasterSecret **pp);