Fix ed25519Signer and ed25519Verifier

The classes don't provide a copy contructor. Derp. Also see https://github.com/noloader/cryptopp-pem/issues/12
This commit is contained in:
Jeffrey Walton 2021-09-15 04:42:31 -04:00
parent 622908742e
commit 08f3fc5676
No known key found for this signature in database
GPG Key ID: B36AB348921B1838

View File

@ -664,8 +664,11 @@ ed25519Signer::ed25519Signer(const Integer &x)
}
ed25519Signer::ed25519Signer(const PKCS8PrivateKey &key)
: m_key(dynamic_cast<const ed25519PrivateKey&>(key))
{
// Load all fields from the other key
ByteQueue queue;
key.Save(queue);
AccessPrivateKey().Load(queue);
}
ed25519Signer::ed25519Signer(RandomNumberGenerator &rng)
@ -855,8 +858,11 @@ ed25519Verifier::ed25519Verifier(const Integer &y)
}
ed25519Verifier::ed25519Verifier(const X509PublicKey &key)
: m_key(dynamic_cast<const ed25519PublicKey &>(key))
{
// Load all fields from the other key
ByteQueue queue;
key.Save(queue);
AccessPublicKey().Load(queue);
}
ed25519Verifier::ed25519Verifier(BufferedTransformation &params)