aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/block/threefish_avx2/info.txt4
-rw-r--r--src/lib/ffi/ffi.cpp2
-rw-r--r--src/lib/misc/openpgp/info.txt1
-rw-r--r--src/lib/misc/tss/info.txt2
-rw-r--r--src/lib/modes/aead/siv/info.txt5
-rw-r--r--src/lib/pk_pad/eme_oaep/oaep.h1
-rw-r--r--src/lib/pk_pad/eme_raw/eme_raw.h2
-rw-r--r--src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp1
-rw-r--r--src/lib/pk_pad/emsa_x931/emsa_x931.cpp1
-rw-r--r--src/lib/pk_pad/mgf1/mgf1.h1
-rw-r--r--src/lib/pk_pad/pad_utils.h1
-rw-r--r--src/lib/pubkey/mceies/info.txt2
-rw-r--r--src/lib/pubkey/mceies/mceies.cpp11
-rw-r--r--src/tests/test_aead.cpp2
-rw-r--r--src/tests/test_mceliece.cpp30
-rw-r--r--src/tests/test_tss.cpp1
16 files changed, 44 insertions, 23 deletions
diff --git a/src/lib/block/threefish_avx2/info.txt b/src/lib/block/threefish_avx2/info.txt
index 3f62629b9..4a3275092 100644
--- a/src/lib/block/threefish_avx2/info.txt
+++ b/src/lib/block/threefish_avx2/info.txt
@@ -1,3 +1,7 @@
define THREEFISH_512_AVX2 20131224
need_isa avx2
+
+<requires>
+threefish
+</requires>
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp
index 91acde2bc..4a5ec13c1 100644
--- a/src/lib/ffi/ffi.cpp
+++ b/src/lib/ffi/ffi.cpp
@@ -13,10 +13,12 @@
#include <botan/mac.h>
#include <botan/pbkdf.h>
#include <botan/version.h>
+#include <botan/pkcs8.h>
#include <botan/pubkey.h>
#include <botan/data_src.h>
#include <botan/hex.h>
#include <botan/mem_ops.h>
+#include <botan/x509_key.h>
#include <cstring>
#include <memory>
diff --git a/src/lib/misc/openpgp/info.txt b/src/lib/misc/openpgp/info.txt
index 72467ee72..b95c88ef7 100644
--- a/src/lib/misc/openpgp/info.txt
+++ b/src/lib/misc/openpgp/info.txt
@@ -3,6 +3,7 @@ define OPENPGP_CODEC 20131128
load_on auto
<requires>
+codec_filt
crc24
filters
</requires>
diff --git a/src/lib/misc/tss/info.txt b/src/lib/misc/tss/info.txt
index c4fed288d..5d0615170 100644
--- a/src/lib/misc/tss/info.txt
+++ b/src/lib/misc/tss/info.txt
@@ -4,4 +4,6 @@ define THRESHOLD_SECRET_SHARING 20131128
rng
filters
hex
+sha1
+sha2_32
</requires>
diff --git a/src/lib/modes/aead/siv/info.txt b/src/lib/modes/aead/siv/info.txt
index b1e38568e..b76a82422 100644
--- a/src/lib/modes/aead/siv/info.txt
+++ b/src/lib/modes/aead/siv/info.txt
@@ -1,3 +1,8 @@
define AEAD_SIV 20131202
load_on auto
+
+<requires>
+cmac
+ctr
+</requires>
diff --git a/src/lib/pk_pad/eme_oaep/oaep.h b/src/lib/pk_pad/eme_oaep/oaep.h
index 6765a67e2..74d8784eb 100644
--- a/src/lib/pk_pad/eme_oaep/oaep.h
+++ b/src/lib/pk_pad/eme_oaep/oaep.h
@@ -9,7 +9,6 @@
#define BOTAN_OAEP_H__
#include <botan/eme.h>
-#include <botan/kdf.h>
#include <botan/hash.h>
namespace Botan {
diff --git a/src/lib/pk_pad/eme_raw/eme_raw.h b/src/lib/pk_pad/eme_raw/eme_raw.h
index 903d9fc34..34743d1af 100644
--- a/src/lib/pk_pad/eme_raw/eme_raw.h
+++ b/src/lib/pk_pad/eme_raw/eme_raw.h
@@ -8,8 +8,6 @@
#define BOTAN_EME_RAW_H__
#include <botan/eme.h>
-#include <botan/kdf.h>
-#include <botan/hash.h>
namespace Botan {
diff --git a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp
index 2c2fbd2e8..e6ce5ec2f 100644
--- a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp
+++ b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp
@@ -7,6 +7,7 @@
#include <botan/internal/pad_utils.h>
#include <botan/emsa_pkcs1.h>
+#include <botan/hash_id.h>
namespace Botan {
diff --git a/src/lib/pk_pad/emsa_x931/emsa_x931.cpp b/src/lib/pk_pad/emsa_x931/emsa_x931.cpp
index 6b86a25f9..fb1e4343a 100644
--- a/src/lib/pk_pad/emsa_x931/emsa_x931.cpp
+++ b/src/lib/pk_pad/emsa_x931/emsa_x931.cpp
@@ -7,6 +7,7 @@
#include <botan/internal/pad_utils.h>
#include <botan/emsa_x931.h>
+#include <botan/hash_id.h>
namespace Botan {
diff --git a/src/lib/pk_pad/mgf1/mgf1.h b/src/lib/pk_pad/mgf1/mgf1.h
index 3fec898c2..ed2f1d023 100644
--- a/src/lib/pk_pad/mgf1/mgf1.h
+++ b/src/lib/pk_pad/mgf1/mgf1.h
@@ -8,7 +8,6 @@
#ifndef BOTAN_MGF1_H__
#define BOTAN_MGF1_H__
-#include <botan/kdf.h>
#include <botan/hash.h>
namespace Botan {
diff --git a/src/lib/pk_pad/pad_utils.h b/src/lib/pk_pad/pad_utils.h
index 2d261ffa6..3918e133a 100644
--- a/src/lib/pk_pad/pad_utils.h
+++ b/src/lib/pk_pad/pad_utils.h
@@ -9,7 +9,6 @@
#define BOTAN_PK_PAD_UTILS_H__
#include <botan/internal/algo_registry.h>
-#include <botan/hash_id.h>
#include <botan/internal/xor_buf.h>
#include <botan/loadstor.h>
#include <algorithm>
diff --git a/src/lib/pubkey/mceies/info.txt b/src/lib/pubkey/mceies/info.txt
index b4a25329e..547e4a47a 100644
--- a/src/lib/pubkey/mceies/info.txt
+++ b/src/lib/pubkey/mceies/info.txt
@@ -1,5 +1,7 @@
+define MCEIES 20150706
<requires>
+aes
mce
ocb
</requires>
diff --git a/src/lib/pubkey/mceies/mceies.cpp b/src/lib/pubkey/mceies/mceies.cpp
index 9e9ae1cb8..58dde2e27 100644
--- a/src/lib/pubkey/mceies/mceies.cpp
+++ b/src/lib/pubkey/mceies/mceies.cpp
@@ -45,9 +45,10 @@ mceies_encrypt(const McEliece_PublicKey& pubkey,
BOTAN_ASSERT(mce_ciphertext.size() == mce_code_bytes, "Unexpected size");
- std::unique_ptr<AEAD_Mode> aead(get_aead("AES-256/OCB", ENCRYPTION));
+ const std::string algo = "AES-256/OCB";
+ std::unique_ptr<AEAD_Mode> aead(get_aead(algo, ENCRYPTION));
if(!aead)
- throw std::runtime_error("mce_encrypt unable to create AEAD instance");
+ throw std::runtime_error("mce_encrypt unable to create AEAD instance '" + algo + "'");
const size_t nonce_len = aead->default_nonce_length();
@@ -77,9 +78,11 @@ mceies_decrypt(const McEliece_PrivateKey& privkey,
const size_t mce_code_bytes = (privkey.get_code_length() + 7) / 8;
- std::unique_ptr<AEAD_Mode> aead(get_aead("AES-256/OCB", DECRYPTION));
+
+ const std::string algo = "AES-256/OCB";
+ std::unique_ptr<AEAD_Mode> aead(get_aead(algo, DECRYPTION));
if(!aead)
- throw std::runtime_error("Unable to create AEAD instance");
+ throw std::runtime_error("Unable to create AEAD instance '" + algo + "'");
const size_t nonce_len = aead->default_nonce_length();
diff --git a/src/tests/test_aead.cpp b/src/tests/test_aead.cpp
index 603fdc1b0..a149493f6 100644
--- a/src/tests/test_aead.cpp
+++ b/src/tests/test_aead.cpp
@@ -33,7 +33,7 @@ size_t aead_test(const std::string& algo,
std::unique_ptr<Cipher_Mode> dec(get_aead(algo, DECRYPTION));
if(!enc || !dec)
- throw std::runtime_error("Unknown AEAD " + algo);
+ throw std::runtime_error("Unknown AEAD '" + algo + "'");
enc->set_key(key);
dec->set_key(key);
diff --git a/src/tests/test_mceliece.cpp b/src/tests/test_mceliece.cpp
index c0ff1d435..616f64be9 100644
--- a/src/tests/test_mceliece.cpp
+++ b/src/tests/test_mceliece.cpp
@@ -11,20 +11,18 @@
#if defined(BOTAN_HAS_MCELIECE)
#include <botan/pubkey.h>
-#include <botan/ecdsa.h>
-#include <botan/rsa.h>
-#include <botan/x509cert.h>
#include <botan/oids.h>
#include <botan/mceliece.h>
#include <botan/mce_kem.h>
-#include <botan/mceies.h>
#include <botan/loadstor.h>
-
#include <botan/hex.h>
-
#include <iostream>
#include <memory>
+#if defined(BOTAN_HAS_MCEIES)
+#include <botan/mceies.h>
+#endif
+
using namespace Botan;
#define CHECK_MESSAGE(expr, print) do {if(!(expr)) {std::cout << print << std::endl; return 1;} }while(0)
@@ -161,11 +159,11 @@ size_t test_mceliece_raw(const McEliece_PrivateKey& sk,
return err_cnt;
}
+#if defined(BOTAN_HAS_MCEIES)
size_t test_mceies(const McEliece_PrivateKey& sk,
const McEliece_PublicKey& pk,
RandomNumberGenerator& rng)
{
-
size_t fails = 0;
for(size_t i = 0; i != 5; ++i)
@@ -209,6 +207,7 @@ size_t test_mceies(const McEliece_PrivateKey& sk,
return fails;
}
+#endif // BOTAN_HAS_MCEIES
}
@@ -216,7 +215,7 @@ size_t test_mceliece()
{
auto& rng = test_rng();
- size_t fails = 0;
+ size_t fails = 0;
size_t params__n__t_min_max[] = {
256, 5, 15,
512, 5, 33,
@@ -241,9 +240,10 @@ size_t test_mceliece()
}
catch(std::exception& e)
{
- std::cout << e.what();
+ std::cout << e.what() << std::endl;
fails++;
}
+ tests += 1;
McEliece_PrivateKey sk1(rng, code_length, t);
const McEliece_PublicKey& pk1 = sk1;
@@ -278,9 +278,10 @@ size_t test_mceliece()
}
catch(std::exception& e)
{
- std::cout << e.what();
+ std::cout << e.what() << std::endl;
fails++;
}
+ tests += 1;
try
{
@@ -288,21 +289,24 @@ size_t test_mceliece()
}
catch(std::exception& e)
{
- std::cout << e.what();
+ std::cout << e.what() << std::endl;
fails++;
}
+ tests += 1;
+#if defined(BOTAN_HAS_MCEIES)
try
{
fails += test_mceies(sk, pk, rng);
}
catch(std::exception& e)
{
- std::cout << e.what();
+ std::cout << e.what() << std::endl;
fails++;
}
+ tests += 1;
+#endif // BOTAN_HAS_MCEIES
- tests += 4;
}
}
diff --git a/src/tests/test_tss.cpp b/src/tests/test_tss.cpp
index 561336f9d..c5440634b 100644
--- a/src/tests/test_tss.cpp
+++ b/src/tests/test_tss.cpp
@@ -51,6 +51,7 @@ size_t test_tss()
return fails;
}
+
#else
SKIP_TEST(tss);