mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-27 15:43:42 +08:00
Add ECDHE cipher suites to TLCP
This commit is contained in:
@@ -254,6 +254,22 @@ int sm2_encrypt_fixlen(const SM2_KEY *key, const uint8_t *in, size_t inlen, int
|
||||
int sm2_do_ecdh(const SM2_KEY *key, const SM2_KEY *peer_key, uint8_t out[32]);
|
||||
int sm2_ecdh(const SM2_KEY *key, const uint8_t uncompressed_point[65], uint8_t out[32]);
|
||||
|
||||
int sm2_key_exchange(int is_initiator,
|
||||
const SM2_KEY *key, const char *id, size_t idlen,
|
||||
const SM2_KEY *peer_public_key, const char *peer_id, size_t peer_idlen,
|
||||
const SM2_KEY *key_exchange, const uint8_t peer_key_exchange[65],
|
||||
uint8_t optional_shared_point[65], size_t shared_key_len, uint8_t *shared_key);
|
||||
int sm2_key_exchange_compute_confirm(int is_initiator,
|
||||
const SM2_KEY *key, const char *id, size_t idlen,
|
||||
const SM2_KEY *peer_public_key, const char *peer_id, size_t peer_idlen,
|
||||
const SM2_KEY *key_exchange, const uint8_t peer_key_exchange[65],
|
||||
const uint8_t shared_point[65], uint8_t confirm[32]);
|
||||
int sm2_key_exchange_verify_confirm(int is_initiator,
|
||||
const SM2_KEY *key, const char *id, size_t idlen,
|
||||
const SM2_KEY *peer_public_key, const char *peer_id, size_t peer_idlen,
|
||||
const SM2_KEY *key_exchange, const uint8_t peer_key_exchange[65],
|
||||
const uint8_t shared_point[65], const uint8_t confirm[32]);
|
||||
|
||||
|
||||
typedef struct {
|
||||
sm2_z256_t k;
|
||||
|
||||
@@ -1008,8 +1008,12 @@ int tls_ctx_set_certificate_and_key(TLS_CTX *ctx, const char *chainfile,
|
||||
const char *keyfile, const char *keypass);
|
||||
int tlcp_ctx_add_server_certificate_and_keys(TLS_CTX *ctx, const char *chainfile,
|
||||
const char *keyfile, const char *keypass);
|
||||
int tlcp_ctx_add_client_certificate_and_keys(TLS_CTX *ctx, const char *chainfile,
|
||||
const char *keyfile, const char *keypass);
|
||||
int tls_ctx_set_tlcp_server_certificate_and_keys(TLS_CTX *ctx, const char *chainfile,
|
||||
const char *keyfile, const char *keypass);
|
||||
int tls_ctx_set_tlcp_client_certificate_and_keys(TLS_CTX *ctx, const char *chainfile,
|
||||
const char *keyfile, const char *keypass);
|
||||
void tls_ctx_cleanup(TLS_CTX *ctx);
|
||||
|
||||
int tls_ctx_add_certificate_chain_and_key(TLS_CTX *ctx, const char *chainfile,
|
||||
|
||||
@@ -18,7 +18,7 @@ extern "C" {
|
||||
|
||||
|
||||
#define GMSSL_VERSION_NUM 30300
|
||||
#define GMSSL_VERSION_STR "GmSSL 3.3.0-dev.1162"
|
||||
#define GMSSL_VERSION_STR "GmSSL 3.3.0-dev.1163"
|
||||
|
||||
int gmssl_version_num(void);
|
||||
const char *gmssl_version_str(void);
|
||||
|
||||
Reference in New Issue
Block a user