summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/botan/files/botan-1.9.11-openssl_compile.patch')
-rw-r--r--dev-libs/botan/files/botan-1.9.11-openssl_compile.patch116
1 files changed, 116 insertions, 0 deletions
diff --git a/dev-libs/botan/files/botan-1.9.11-openssl_compile.patch b/dev-libs/botan/files/botan-1.9.11-openssl_compile.patch
new file mode 100644
index 0000000..d03c24e
--- /dev/null
+++ b/dev-libs/botan/files/botan-1.9.11-openssl_compile.patch
@@ -0,0 +1,116 @@
+#
+# old_revision [52e500a0ac32174fdce00c589290e69186b99bdd]
+#
+# patch "src/engine/openssl/ossl_arc4.cpp"
+# from [4aed07563d8f2b1ada6a76cbe55b4e76e8877403]
+# to [d8ca80a67a27f9b2a1bcfb1e1e1efb4122ea28aa]
+#
+# patch "src/engine/openssl/ossl_bc.cpp"
+# from [9efd108ef8aebb28f4c0507bfcd3a08baf813531]
+# to [947792c43bcccd42b8667a6d59e5bc477e374d0c]
+#
+# patch "src/engine/openssl/ossl_md.cpp"
+# from [c8fe0b67a8f0797fa8be764e9aeb78d5960d9bd9]
+# to [29482b218897968d26787b4f4e517c11f511767d]
+#
+============================================================
+--- src/engine/openssl/ossl_bc.cpp 9efd108ef8aebb28f4c0507bfcd3a08baf813531
++++ src/engine/openssl/ossl_bc.cpp 947792c43bcccd42b8667a6d59e5bc477e374d0c
+@@ -29,6 +29,8 @@ class EVP_BlockCipher : public BlockCiph
+ EVP_BlockCipher(const EVP_CIPHER*, const std::string&,
+ size_t, size_t, size_t);
+
++ Key_Length_Specification key_spec() const { return cipher_key_spec; }
++
+ ~EVP_BlockCipher();
+ private:
+ void encrypt_n(const byte in[], byte out[], size_t blocks) const;
+@@ -36,6 +38,7 @@ class EVP_BlockCipher : public BlockCiph
+ void key_schedule(const byte[], size_t);
+
+ size_t block_sz;
++ Key_Length_Specification cipher_key_spec;
+ std::string cipher_name;
+ mutable EVP_CIPHER_CTX encrypt, decrypt;
+ };
+@@ -45,8 +48,8 @@ EVP_BlockCipher::EVP_BlockCipher(const E
+ */
+ EVP_BlockCipher::EVP_BlockCipher(const EVP_CIPHER* algo,
+ const std::string& algo_name) :
+- BlockCipher(EVP_CIPHER_key_length(algo)),
+ block_sz(EVP_CIPHER_block_size(algo)),
++ cipher_key_spec(EVP_CIPHER_key_length(algo)),
+ cipher_name(algo_name)
+ {
+ if(EVP_CIPHER_mode(algo) != EVP_CIPH_ECB_MODE)
+@@ -69,8 +72,8 @@ EVP_BlockCipher::EVP_BlockCipher(const E
+ const std::string& algo_name,
+ size_t key_min, size_t key_max,
+ size_t key_mod) :
+- BlockCipher(key_min, key_max, key_mod),
+ block_sz(EVP_CIPHER_block_size(algo)),
++ cipher_key_spec(key_min, key_max, key_mod),
+ cipher_name(algo_name)
+ {
+ if(EVP_CIPHER_mode(algo) != EVP_CIPH_ECB_MODE)
+@@ -148,8 +151,10 @@ BlockCipher* EVP_BlockCipher::clone() co
+ BlockCipher* EVP_BlockCipher::clone() const
+ {
+ return new EVP_BlockCipher(EVP_CIPHER_CTX_cipher(&encrypt),
+- cipher_name, MINIMUM_KEYLENGTH,
+- MAXIMUM_KEYLENGTH, KEYLENGTH_MULTIPLE);
++ cipher_name,
++ cipher_key_spec.minimum_keylength(),
++ cipher_key_spec.maximum_keylength(),
++ cipher_key_spec.keylength_multiple());
+ }
+
+ /*
+============================================================
+--- src/engine/openssl/ossl_md.cpp c8fe0b67a8f0797fa8be764e9aeb78d5960d9bd9
++++ src/engine/openssl/ossl_md.cpp 29482b218897968d26787b4f4e517c11f511767d
+@@ -22,8 +22,16 @@ class EVP_HashFunction : public HashFunc
+ std::string name() const { return algo_name; }
+ HashFunction* clone() const;
+
+- size_t hash_block_size() const { return block_size; }
++ size_t output_length() const
++ {
++ return EVP_MD_size(EVP_MD_CTX_md(&md));
++ }
+
++ size_t hash_block_size() const
++ {
++ return EVP_MD_block_size(EVP_MD_CTX_md(&md));
++ }
++
+ EVP_HashFunction(const EVP_MD*, const std::string&);
+ ~EVP_HashFunction();
+ private:
+@@ -76,8 +84,6 @@ EVP_HashFunction::EVP_HashFunction(const
+ */
+ EVP_HashFunction::EVP_HashFunction(const EVP_MD* algo,
+ const std::string& name) :
+- HashFunction(EVP_MD_size(algo)),
+- block_size(EVP_MD_block_size(algo)),
+ algo_name(name)
+ {
+ EVP_MD_CTX_init(&md);
+============================================================
+--- src/engine/openssl/ossl_arc4.cpp 4aed07563d8f2b1ada6a76cbe55b4e76e8877403
++++ src/engine/openssl/ossl_arc4.cpp d8ca80a67a27f9b2a1bcfb1e1e1efb4122ea28aa
+@@ -23,7 +23,13 @@ class ARC4_OpenSSL : public StreamCipher
+ std::string name() const;
+ StreamCipher* clone() const { return new ARC4_OpenSSL(SKIP); }
+
+- ARC4_OpenSSL(size_t s = 0) : StreamCipher(1, 32), SKIP(s) { clear(); }
++ Key_Length_Specification key_spec() const
++ {
++ return Key_Length_Specification(1, 32);
++ }
++
++
++ ARC4_OpenSSL(size_t s = 0) : SKIP(s) { clear(); }
+ ~ARC4_OpenSSL() { clear(); }
+ private:
+ void cipher(const byte[], byte[], size_t);