mirror of
https://github.com/GOSTSec/gostcoin
synced 2025-01-30 08:24:20 +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
|
// ssl
|
||||||
#define TLS_method TLSv1_method
|
#define TLS_method TLSv1_method
|
||||||
|
|
||||||
|
// ASN1
|
||||||
|
#define OPENSSL_EC_EXPLICIT_CURVE 0
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
#include "Crypto.h"
|
||||||
#include "Gost.h"
|
#include "Gost.h"
|
||||||
|
|
||||||
namespace i2p
|
namespace i2p
|
||||||
@ -28,6 +29,7 @@ namespace crypto
|
|||||||
EC_POINT_set_affine_coordinates_GFp (m_Group, P, x, y, ctx);
|
EC_POINT_set_affine_coordinates_GFp (m_Group, P, x, y, ctx);
|
||||||
EC_GROUP_set_generator (m_Group, P, q, nullptr);
|
EC_GROUP_set_generator (m_Group, P, q, nullptr);
|
||||||
EC_GROUP_set_curve_name (m_Group, NID_id_GostR3410_2001);
|
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);
|
EC_POINT_free(P);
|
||||||
BN_CTX_free (ctx);
|
BN_CTX_free (ctx);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user