mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 15:24:30 +01:00
Make sure the challenge token is random and handled properly
This change also fixes passworded servers not working properly, as strlen() was getting called on something that was not guaranteed to be null-terminated string when signing the token.
This commit is contained in:
@@ -38,8 +38,8 @@ public:
|
||||
std::string PublicKeyString();
|
||||
std::string PublicKeyHash();
|
||||
void Unload();
|
||||
bool Sign(const char * md, const size_t len, char ** signature, size_t * out_size);
|
||||
bool Verify(const char * md, const size_t len, const char * sig, const size_t siglen);
|
||||
bool Sign(const uint8_t * md, const size_t len, char ** signature, size_t * out_size);
|
||||
bool Verify(const uint8_t *md, const size_t len, const char * sig, const size_t siglen);
|
||||
private:
|
||||
NetworkKey ( const NetworkKey & ) = delete;
|
||||
EVP_PKEY_CTX * m_ctx = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user