]> andersk Git - openssh.git/blobdiff - openbsd-compat/openssl-compat.c
- djm@cvs.openbsd.org 2010/01/30 02:54:53
[openssh.git] / openbsd-compat / openssl-compat.c
index 89bd250cad183cde8ab4ff6e6065396e139edfb7..022a9313dd5ce46bc5eba7ea90a91687821dc8fe 100644 (file)
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define SSH_DONT_REDEF_EVP
 #include "includes.h"
 
+#ifdef USE_OPENSSL_ENGINE
+# include <openssl/engine.h>
+#endif
+
+#define SSH_DONT_OVERLOAD_OPENSSL_FUNCS
+#include "openssl-compat.h"
+
 #ifdef SSH_OLD_EVP
 int
 ssh_EVP_CipherInit(EVP_CIPHER_CTX *evp, const EVP_CIPHER *type,
@@ -42,3 +48,25 @@ ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *evp)
        return 1;
 }
 #endif
+
+#ifdef OPENSSL_EVP_DIGESTUPDATE_VOID
+int
+ssh_EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt)
+{
+       EVP_DigestUpdate(ctx, d, cnt);
+       return 1;
+}
+#endif
+
+#ifdef USE_OPENSSL_ENGINE
+void
+ssh_SSLeay_add_all_algorithms(void)
+{
+       SSLeay_add_all_algorithms();
+
+       /* Enable use of crypto hardware */
+       ENGINE_load_builtin_engines();
+       ENGINE_register_all_complete();
+       OPENSSL_config(NULL);
+}
+#endif
This page took 0.156058 seconds and 4 git commands to generate.