Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compilation errors on Windows for the PQC and Crypto Refresh code #2135

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/lib/crypto/dilithium_exdsa_composite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ pgp_dilithium_exdsa_composite_private_key_t::operator=(
return *this;
}

/* also offer copy constructor */
pgp_dilithium_exdsa_composite_private_key_t::pgp_dilithium_exdsa_composite_private_key_t(const pgp_dilithium_exdsa_composite_private_key_t &other)
{
*this = other;
}

pgp_dilithium_exdsa_composite_private_key_t::pgp_dilithium_exdsa_composite_private_key_t(
std::vector<uint8_t> const &exdsa_key_encoded,
std::vector<uint8_t> const &dilithium_key_encoded,
Expand Down
1 change: 1 addition & 0 deletions src/lib/crypto/dilithium_exdsa_composite.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class pgp_dilithium_exdsa_composite_private_key_t
pgp_pubkey_alg_t pk_alg);
pgp_dilithium_exdsa_composite_private_key_t &operator=(
const pgp_dilithium_exdsa_composite_private_key_t &other);
pgp_dilithium_exdsa_composite_private_key_t(const pgp_dilithium_exdsa_composite_private_key_t &other);
pgp_dilithium_exdsa_composite_private_key_t() = default;

rnp_result_t sign(rnp::RNG * rng,
Expand Down
6 changes: 6 additions & 0 deletions src/lib/crypto/kyber_ecdh_composite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ pgp_kyber_ecdh_composite_private_key_t::operator=(
return *this;
}

/* also offer copy constructor */
pgp_kyber_ecdh_composite_private_key_t::pgp_kyber_ecdh_composite_private_key_t(const pgp_kyber_ecdh_composite_private_key_t &other)
{
*this = other;
}

size_t
pgp_kyber_ecdh_composite_private_key_t::encoded_size(pgp_pubkey_alg_t pk_alg)
{
Expand Down
1 change: 1 addition & 0 deletions src/lib/crypto/kyber_ecdh_composite.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class pgp_kyber_ecdh_composite_private_key_t : public pgp_kyber_ecdh_composite_k
pgp_pubkey_alg_t pk_alg);
pgp_kyber_ecdh_composite_private_key_t &operator=(
const pgp_kyber_ecdh_composite_private_key_t &other);
pgp_kyber_ecdh_composite_private_key_t(const pgp_kyber_ecdh_composite_private_key_t &other);
pgp_kyber_ecdh_composite_private_key_t() = default;

rnp_result_t decrypt(rnp::RNG * rng,
Expand Down
2 changes: 1 addition & 1 deletion src/tests/hkdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ TEST_F(rnp_tests, hkdf_test_case_1)
0x3c, 0xb2, 0x5f, 0x25, 0xfa, 0xac, 0xd5, 0x7a, 0x90, 0x43, 0x4f, 0x64, 0xd0, 0x36,
0x2f, 0x2a, 0x2d, 0x2d, 0x0a, 0x90, 0xcf, 0x1a, 0x5a, 0x4c, 0x5d, 0xb0, 0x2d, 0x56,
0xec, 0xc4, 0xc5, 0xbf, 0x34, 0x00, 0x72, 0x08, 0xd5, 0xb8, 0x87, 0x18, 0x58, 0x65};
size_t L = 42;
const size_t L = 42;

std::unique_ptr<rnp::Hkdf> hkdf = rnp::Hkdf::create(PGP_HASH_SHA256);

Expand Down