Loading src/common/crypto.c +2 −1 Original line number Diff line number Diff line Loading @@ -413,7 +413,8 @@ crypto_pk_generate_key(crypto_pk_env_t *env) /** Read a PEM-encoded private key from the string <b>s</b> into <b>env</b>. * Return 0 on success, -1 on failure. */ static int /* Used here, and used for testing. */ int crypto_pk_read_private_key_from_string(crypto_pk_env_t *env, const char *s) { Loading src/common/crypto.h +6 −0 Original line number Diff line number Diff line Loading @@ -176,9 +176,15 @@ void secret_to_key(char *key_out, size_t key_out_len, const char *secret, #ifdef CRYPTO_PRIVATE /* Prototypes for private functions only used by tortls.c and crypto.c */ typedef struct rsa_st RSA; typedef struct evp_pkey_st EVP_PKEY; typedef struct dh_st DH; crypto_pk_env_t *_crypto_new_pk_env_rsa(RSA *rsa); EVP_PKEY *_crypto_pk_env_get_evp_pkey(crypto_pk_env_t *env, int private); DH *_crypto_dh_env_get_dh(crypto_dh_env_t *dh); /* Prototypes for private functions only used by crypto.c and test.c*/ int crypto_pk_read_private_key_from_string(crypto_pk_env_t *env, const char *s); #endif #endif Loading Loading
src/common/crypto.c +2 −1 Original line number Diff line number Diff line Loading @@ -413,7 +413,8 @@ crypto_pk_generate_key(crypto_pk_env_t *env) /** Read a PEM-encoded private key from the string <b>s</b> into <b>env</b>. * Return 0 on success, -1 on failure. */ static int /* Used here, and used for testing. */ int crypto_pk_read_private_key_from_string(crypto_pk_env_t *env, const char *s) { Loading
src/common/crypto.h +6 −0 Original line number Diff line number Diff line Loading @@ -176,9 +176,15 @@ void secret_to_key(char *key_out, size_t key_out_len, const char *secret, #ifdef CRYPTO_PRIVATE /* Prototypes for private functions only used by tortls.c and crypto.c */ typedef struct rsa_st RSA; typedef struct evp_pkey_st EVP_PKEY; typedef struct dh_st DH; crypto_pk_env_t *_crypto_new_pk_env_rsa(RSA *rsa); EVP_PKEY *_crypto_pk_env_get_evp_pkey(crypto_pk_env_t *env, int private); DH *_crypto_dh_env_get_dh(crypto_dh_env_t *dh); /* Prototypes for private functions only used by crypto.c and test.c*/ int crypto_pk_read_private_key_from_string(crypto_pk_env_t *env, const char *s); #endif #endif Loading