aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cert/cvc/cvc_self.h1
-rw-r--r--src/lib/cert/x509/pkcs10.h1
-rw-r--r--src/lib/cert/x509/x509_ca.h1
-rw-r--r--src/lib/cert/x509/x509self.h1
-rw-r--r--src/lib/modes/cbc/cbc.cpp6
-rw-r--r--src/lib/modes/ecb/ecb.cpp6
-rw-r--r--src/lib/modes/xts/xts.cpp4
-rw-r--r--src/lib/pubkey/dl_algo/dl_algo.h1
-rw-r--r--src/lib/pubkey/ecc_key/ecc_key.h1
-rw-r--r--src/lib/pubkey/if_algo/if_algo.h1
-rw-r--r--src/lib/tls/tls_messages.h1
-rw-r--r--src/lib/utils/cpuid.cpp2
12 files changed, 10 insertions, 16 deletions
diff --git a/src/lib/cert/cvc/cvc_self.h b/src/lib/cert/cvc/cvc_self.h
index b29164a7f..005703636 100644
--- a/src/lib/cert/cvc/cvc_self.h
+++ b/src/lib/cert/cvc/cvc_self.h
@@ -9,7 +9,6 @@
#ifndef BOTAN_CVC_EAC_SELF_H__
#define BOTAN_CVC_EAC_SELF_H__
-#include <botan/pkcs8.h>
#include <botan/cvc_cert.h>
#include <botan/ecdsa.h>
#include <botan/asn1_obj.h>
diff --git a/src/lib/cert/x509/pkcs10.h b/src/lib/cert/x509/pkcs10.h
index 5751e674d..6aa66fbfd 100644
--- a/src/lib/cert/x509/pkcs10.h
+++ b/src/lib/cert/x509/pkcs10.h
@@ -10,7 +10,6 @@
#include <botan/x509_obj.h>
#include <botan/x509_dn.h>
-#include <botan/pkcs8.h>
#include <botan/datastor.h>
#include <botan/key_constraint.h>
#include <botan/asn1_attribute.h>
diff --git a/src/lib/cert/x509/x509_ca.h b/src/lib/cert/x509/x509_ca.h
index 6dc65493e..2e05258e3 100644
--- a/src/lib/cert/x509/x509_ca.h
+++ b/src/lib/cert/x509/x509_ca.h
@@ -11,7 +11,6 @@
#include <botan/x509cert.h>
#include <botan/x509_crl.h>
#include <botan/x509_ext.h>
-#include <botan/pkcs8.h>
#include <botan/pkcs10.h>
#include <botan/pubkey.h>
diff --git a/src/lib/cert/x509/x509self.h b/src/lib/cert/x509/x509self.h
index d15aabc59..a4bbad214 100644
--- a/src/lib/cert/x509/x509self.h
+++ b/src/lib/cert/x509/x509self.h
@@ -9,7 +9,6 @@
#define BOTAN_X509_SELF_H__
#include <botan/x509cert.h>
-#include <botan/pkcs8.h>
#include <botan/pkcs10.h>
#include <botan/asn1_time.h>
diff --git a/src/lib/modes/cbc/cbc.cpp b/src/lib/modes/cbc/cbc.cpp
index dd6550fce..85241cf53 100644
--- a/src/lib/modes/cbc/cbc.cpp
+++ b/src/lib/modes/cbc/cbc.cpp
@@ -105,8 +105,10 @@ size_t CBC_Encryption::minimum_final_size() const
size_t CBC_Encryption::output_length(size_t input_length) const
{
- BOTAN_ASSERT(input_length != 0, "CBC_Encryption::output_length() call");
- return round_up(input_length, cipher().block_size());
+ if(input_length == 0)
+ return cipher().block_size();
+ else
+ return round_up(input_length, cipher().block_size());
}
void CBC_Encryption::update(secure_vector<byte>& buffer, size_t offset)
diff --git a/src/lib/modes/ecb/ecb.cpp b/src/lib/modes/ecb/ecb.cpp
index 6de00f18a..e5794d8e1 100644
--- a/src/lib/modes/ecb/ecb.cpp
+++ b/src/lib/modes/ecb/ecb.cpp
@@ -83,8 +83,10 @@ size_t ECB_Encryption::minimum_final_size() const
size_t ECB_Encryption::output_length(size_t input_length) const
{
- BOTAN_ASSERT(input_length != 0, "ECB_Encryption::output_length() call");
- return round_up(input_length, cipher().block_size());
+ if(input_length == 0)
+ return cipher().block_size();
+ else
+ return round_up(input_length, cipher().block_size());
}
void ECB_Encryption::update(secure_vector<byte>& buffer, size_t offset)
diff --git a/src/lib/modes/xts/xts.cpp b/src/lib/modes/xts/xts.cpp
index 4eaf03fe5..046de216f 100644
--- a/src/lib/modes/xts/xts.cpp
+++ b/src/lib/modes/xts/xts.cpp
@@ -135,8 +135,7 @@ void XTS_Mode::update_tweak(size_t which)
size_t XTS_Encryption::output_length(size_t input_length) const
{
- BOTAN_ASSERT(input_length != 0, "XTS_Encryption::output_length() call");
- return round_up(input_length, cipher().block_size());
+ return input_length;
}
void XTS_Encryption::update(secure_vector<byte>& buffer, size_t offset)
@@ -214,7 +213,6 @@ void XTS_Encryption::finish(secure_vector<byte>& buffer, size_t offset)
size_t XTS_Decryption::output_length(size_t input_length) const
{
- // might be less
return input_length;
}
diff --git a/src/lib/pubkey/dl_algo/dl_algo.h b/src/lib/pubkey/dl_algo/dl_algo.h
index 73cf23eec..18886e5dc 100644
--- a/src/lib/pubkey/dl_algo/dl_algo.h
+++ b/src/lib/pubkey/dl_algo/dl_algo.h
@@ -10,7 +10,6 @@
#include <botan/dl_group.h>
#include <botan/x509_key.h>
-#include <botan/pkcs8.h>
namespace Botan {
diff --git a/src/lib/pubkey/ecc_key/ecc_key.h b/src/lib/pubkey/ecc_key/ecc_key.h
index dcf5b84ff..6764df0f0 100644
--- a/src/lib/pubkey/ecc_key/ecc_key.h
+++ b/src/lib/pubkey/ecc_key/ecc_key.h
@@ -13,7 +13,6 @@
#include <botan/ec_group.h>
#include <botan/pk_keys.h>
#include <botan/x509_key.h>
-#include <botan/pkcs8.h>
namespace Botan {
diff --git a/src/lib/pubkey/if_algo/if_algo.h b/src/lib/pubkey/if_algo/if_algo.h
index 73050ad41..dec731af3 100644
--- a/src/lib/pubkey/if_algo/if_algo.h
+++ b/src/lib/pubkey/if_algo/if_algo.h
@@ -10,7 +10,6 @@
#include <botan/bigint.h>
#include <botan/x509_key.h>
-#include <botan/pkcs8.h>
namespace Botan {
diff --git a/src/lib/tls/tls_messages.h b/src/lib/tls/tls_messages.h
index befbdb932..7a556a61c 100644
--- a/src/lib/tls/tls_messages.h
+++ b/src/lib/tls/tls_messages.h
@@ -15,7 +15,6 @@
#include <botan/tls_policy.h>
#include <botan/tls_ciphersuite.h>
#include <botan/bigint.h>
-#include <botan/pkcs8.h>
#include <botan/x509cert.h>
#include <vector>
#include <string>
diff --git a/src/lib/utils/cpuid.cpp b/src/lib/utils/cpuid.cpp
index cdb986396..817bf4f52 100644
--- a/src/lib/utils/cpuid.cpp
+++ b/src/lib/utils/cpuid.cpp
@@ -51,7 +51,7 @@
asm("cpuid\n\t" : "=a" (out[0]), "=b" (out[1]), "=c" (out[2]), "=d" (out[3]) \
: "0" (type), "2" (level))
-#elif defined(BOTAN_BUILD_COMPILER_IS_GCC)
+#elif defined(BOTAN_BUILD_COMPILER_IS_GCC) || defined(BOTAN_BUILD_COMPILER_IS_CLANG)
#include <cpuid.h>