mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-12 03:16:25 +08:00
Add sm2utl and sm9utl commands
This commit is contained in:
@@ -121,6 +121,16 @@ int SM2_ciphertext_size(const EC_KEY *ec_key, size_t inlen)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int i2d_SM2CiphertextValue_bio(BIO *bp, SM2CiphertextValue *a)
|
||||
{
|
||||
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(SM2CiphertextValue), bp, a);
|
||||
}
|
||||
|
||||
SM2CiphertextValue *d2i_SM2CiphertextValue_bio(BIO *bp, SM2CiphertextValue **a)
|
||||
{
|
||||
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(SM2CiphertextValue), bp, a);
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
SM2CiphertextValue *d2i_SM2CiphertextValue_fp(FILE *fp, SM2CiphertextValue **a)
|
||||
{
|
||||
|
||||
@@ -147,6 +147,27 @@ int SM9PublicKey_gmtls_encode(SM9PublicKey *pk, unsigned char key[1024])
|
||||
return 0;
|
||||
}
|
||||
|
||||
int i2d_SM9Signature_bio(BIO *bp, SM9Signature *a)
|
||||
{
|
||||
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(SM9Signature), bp, a);
|
||||
}
|
||||
|
||||
SM9Signature *d2i_SM9Signature_bio(BIO *bp, SM9Signature **a)
|
||||
{
|
||||
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(SM9Signature), bp, a);
|
||||
}
|
||||
|
||||
int i2d_SM9Ciphertext_bio(BIO *bp, SM9Ciphertext *a)
|
||||
{
|
||||
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(SM9Ciphertext), bp, a);
|
||||
}
|
||||
|
||||
SM9Ciphertext *d2i_SM9Ciphertext_bio(BIO *bp, SM9Ciphertext **a)
|
||||
{
|
||||
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(SM9Ciphertext), bp, a);
|
||||
}
|
||||
|
||||
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
SM9MasterSecret *d2i_SM9MasterSecret_fp(FILE *fp, SM9MasterSecret **msk)
|
||||
{
|
||||
|
||||
@@ -83,7 +83,8 @@
|
||||
#define SM9_PHI_D6 0x06
|
||||
|
||||
|
||||
#define SM9_MAX_PLAINTEXT_LENGTH 65535
|
||||
#define SM9_MAX_PLAINTEXT_LENGTH 12800
|
||||
#define SM9_MAX_CIPHERTEXT_LENGTH 25600
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user