mirror of
https://github.com/GOSTSec/gostcoin
synced 2025-01-29 16:04:32 +00:00
correct key encoding for openssl 1.1
This commit is contained in:
parent
0c9123ca5b
commit
01e853f233
@ -27,6 +27,9 @@ inline int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx)
|
||||
// ssl
|
||||
#define TLS_method TLSv1_method
|
||||
|
||||
// ASN1
|
||||
#define OPENSSL_EC_EXPLICIT_CURVE 0
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <array>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/evp.h>
|
||||
#include "Crypto.h"
|
||||
#include "Gost.h"
|
||||
|
||||
namespace i2p
|
||||
@ -28,6 +29,7 @@ namespace crypto
|
||||
EC_POINT_set_affine_coordinates_GFp (m_Group, P, x, y, ctx);
|
||||
EC_GROUP_set_generator (m_Group, P, q, nullptr);
|
||||
EC_GROUP_set_curve_name (m_Group, NID_id_GostR3410_2001);
|
||||
EC_GROUP_set_asn1_flag (m_Group, OPENSSL_EC_EXPLICIT_CURVE); // encode parameters explicitly
|
||||
EC_POINT_free(P);
|
||||
BN_CTX_free (ctx);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user