mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 08:56:17 +08:00
Update sdf and skf commands
This commit is contained in:
@@ -119,18 +119,8 @@ int ECDSA_SIG_set_ECCSignature(ECDSA_SIG *sig, const ECCSignature *ref);
|
||||
int ECDSA_SIG_get_ECCSignature(const ECDSA_SIG *sig, ECCSignature *ref);
|
||||
ECCCipher *d2i_ECCCipher(ECCCipher **a, const unsigned char **pp, long length);
|
||||
int i2d_ECCCipher(ECCCipher *a, unsigned char **pp);
|
||||
ECCCipher *d2i_ECCCipher_bio(BIO *bp, ECCCipher **a);
|
||||
int i2d_ECCCipher_bio(BIO *bp, ECCCipher *a);
|
||||
ECCSignature *d2i_ECCSignature(ECCSignature **a, const unsigned char **pp, long length);
|
||||
int i2d_ECCSignature(ECCSignature *a, unsigned char **pp);
|
||||
ECCSignature *d2i_ECCSignature_bio(BIO *bp, ECCSignature **a);
|
||||
int i2d_ECCSignature_bio(BIO *bp, ECCSignature *a);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
ECCCipher *d2i_ECCCipher_fp(FILE *fp, ECCCipher **a);
|
||||
int i2d_ECCCipher_fp(FILE *fp, ECCCipher *a);
|
||||
ECCSignature *d2i_ECCSignature_fp(FILE *fp, ECCSignature **a);
|
||||
int i2d_ECCSignature_fp(FILE *fp, ECCSignature *a);
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -168,18 +158,8 @@ int ECDSA_SIG_set_ECCSIGNATUREBLOB(ECDSA_SIG *sig, const ECCSIGNATUREBLOB *blob)
|
||||
int ECCPRIVATEKEYBLOB_set_private_key(ECCPRIVATEKEYBLOB *blob, const BIGNUM *priv_key);
|
||||
ECCCIPHERBLOB *d2i_ECCCIPHERBLOB(ECCCIPHERBLOB **a, const unsigned char **pp, long length);
|
||||
int i2d_ECCCIPHERBLOB(ECCCIPHERBLOB *a, unsigned char **pp);
|
||||
ECCCIPHERBLOB *d2i_ECCCIPHERBLOB_bio(BIO *bp, ECCCIPHERBLOB **a);
|
||||
int i2d_ECCCIPHERBLOB_bio(BIO *bp, ECCCIPHERBLOB *a);
|
||||
ECCSIGNATUREBLOB *d2i_ECCSIGNATUREBLOB(ECCSIGNATUREBLOB **a, const unsigned char **pp, long length);
|
||||
int i2d_ECCSIGNATUREBLOB(ECCSIGNATUREBLOB *a, unsigned char **pp);
|
||||
ECCSIGNATUREBLOB *d2i_ECCSIGNATUREBLOB_bio(BIO *bp, ECCSIGNATUREBLOB **a);
|
||||
int i2d_ECCSIGNATUREBLOB_bio(BIO *fp, ECCSIGNATUREBLOB *a);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
ECCCIPHERBLOB *d2i_ECCCIPHERBLOB_fp(FILE *fp, ECCCIPHERBLOB **a);
|
||||
int i2d_ECCCIPHERBLOB_fp(FILE *fp, ECCCIPHERBLOB *a);
|
||||
ECCSIGNATUREBLOB *d2i_ECCSIGNATUREBLOB_fp(FILE *fp, ECCSIGNATUREBLOB **a);
|
||||
int i2d_ECCSIGNATUREBLOB_fp(FILE *fp, ECCSIGNATUREBLOB *a);
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#include <stdio.h>
|
||||
#include <openssl/sgd.h>
|
||||
#include <openssl/sdf.h>
|
||||
#include <openssl/bio.h>
|
||||
|
||||
#define SDF_MIN_KEY_INDEX 1 /* defined by GM/T 0018 */
|
||||
#define SDF_MAX_KEY_INDEX 32 /* defined by GmSSL */
|
||||
@@ -72,15 +73,15 @@ int SDF_UnloadLibrary(void);
|
||||
int SDF_ImportKey(void *hSessionHandle, unsigned char *pucKey,
|
||||
unsigned int uiKeyLength, void **phKeyHandle);
|
||||
|
||||
int SDF_PrintDeviceInfo(DEVICEINFO *devInfo);
|
||||
int SDF_PrintRSAPublicKey(RSArefPublicKey *ref);
|
||||
int SDF_PrintRSAPrivateKey(RSArefPrivateKey *ref);
|
||||
int SDF_PrintECCPublicKey(ECCrefPublicKey *ref);
|
||||
int SDF_PrintECCPrivateKey(ECCrefPrivateKey *ref);
|
||||
int SDF_PrintDeviceInfo(BIO *out, DEVICEINFO *devInfo);
|
||||
int SDF_PrintRSAPublicKey(BIO *out, RSArefPublicKey *ref);
|
||||
int SDF_PrintRSAPrivateKey(BIO *out, RSArefPrivateKey *ref);
|
||||
int SDF_PrintECCPublicKey(BIO *out, ECCrefPublicKey *ref);
|
||||
int SDF_PrintECCPrivateKey(BIO *out, ECCrefPrivateKey *ref);
|
||||
int SDF_NewECCCipher(ECCCipher **cipher, size_t ulDataLen);
|
||||
int SDF_FreeECCCipher(ECCCipher *cipher);
|
||||
int SDF_PrintECCCipher(ECCCipher *cipher);
|
||||
int SDF_PrintECCSignature(ECCSignature *sig);
|
||||
int SDF_PrintECCCipher(BIO *out, ECCCipher *cipher);
|
||||
int SDF_PrintECCSignature(BIO *out, ECCSignature *sig);
|
||||
int SDF_GetErrorString(int err, char **str);
|
||||
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#ifndef OPENSSL_NO_SKF
|
||||
|
||||
#include <stdio.h>
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/sgd.h>
|
||||
#include <openssl/skf.h>
|
||||
|
||||
@@ -98,13 +99,13 @@ ULONG DEVAPI SKF_UnloadLibrary(void);
|
||||
ULONG DEVAPI SKF_GetDevStateName(ULONG ulDevState, LPSTR *szName);
|
||||
ULONG DEVAPI SKF_GetContainerTypeName(ULONG ulContainerType, LPSTR *szName);
|
||||
ULONG DEVAPI SKF_GetAlgorName(ULONG ulAlgID, LPSTR *szName);
|
||||
ULONG DEVAPI SKF_PrintDevInfo(DEVINFO *devInfo);
|
||||
ULONG DEVAPI SKF_PrintRSAPublicKey(RSAPUBLICKEYBLOB *blob);
|
||||
ULONG DEVAPI SKF_PrintRSAPrivateKey(RSAPRIVATEKEYBLOB *blob);
|
||||
ULONG DEVAPI SKF_PrintECCPublicKey(ECCPUBLICKEYBLOB *blob);
|
||||
ULONG DEVAPI SKF_PrintECCPrivateKey(ECCPRIVATEKEYBLOB *blob);
|
||||
ULONG DEVAPI SKF_PrintECCCipher(ECCCIPHERBLOB *blob);
|
||||
ULONG DEVAPI SKF_PrintECCSignature(ECCSIGNATUREBLOB *blob);
|
||||
ULONG DEVAPI SKF_PrintDevInfo(BIO *out, DEVINFO *devInfo);
|
||||
ULONG DEVAPI SKF_PrintRSAPublicKey(BIO *out, RSAPUBLICKEYBLOB *blob);
|
||||
ULONG DEVAPI SKF_PrintRSAPrivateKey(BIO *out, RSAPRIVATEKEYBLOB *blob);
|
||||
ULONG DEVAPI SKF_PrintECCPublicKey(BIO *out, ECCPUBLICKEYBLOB *blob);
|
||||
ULONG DEVAPI SKF_PrintECCPrivateKey(BIO *out, ECCPRIVATEKEYBLOB *blob);
|
||||
ULONG DEVAPI SKF_PrintECCCipher(BIO *out, ECCCIPHERBLOB *blob);
|
||||
ULONG DEVAPI SKF_PrintECCSignature(BIO *out, ECCSIGNATUREBLOB *blob);
|
||||
ULONG DEVAPI SKF_GetErrorString(ULONG ulError, LPSTR *szErrorStr);
|
||||
ULONG DEVAPI SKF_NewECCCipher(ULONG ulCipherLen, ECCCIPHERBLOB **cipherBlob);
|
||||
ULONG DEVAPI SKF_NewEnvelopedKey(ULONG ulCipherLen, ENVELOPEDKEYBLOB **envelopedKeyBlob);
|
||||
|
||||
@@ -41,9 +41,9 @@ extern "C" {
|
||||
*/
|
||||
# define OPENSSL_VERSION_NUMBER 0x1010004fL
|
||||
# ifdef OPENSSL_FIPS
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.4.3 - OpenSSL 1.1.0d-fips 2 Jan 2019"
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.4.3 - OpenSSL 1.1.0d-fips 10 Jan 2019"
|
||||
# else
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.4.3 - OpenSSL 1.1.0d 2 Jan 2019"
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.4.3 - OpenSSL 1.1.0d 10 Jan 2019"
|
||||
# endif
|
||||
|
||||
/*-
|
||||
|
||||
Reference in New Issue
Block a user