diff -urN openssh-4.7p1.orig/ssh-add.c openssh-4.7p1/ssh-add.c
--- openssh-4.7p1.orig/ssh-add.c	2007-09-06 15:16:42.472974134 +0200
+++ openssh-4.7p1/ssh-add.c	2007-09-06 15:21:26.489159294 +0200
@@ -42,6 +42,7 @@
 #include <sys/param.h>

 #include <openssl/evp.h>
+#include <openssl/engine.h>

 #include <fcntl.h>
 #include <pwd.h>
@@ -343,7 +344,11 @@

 	SSLeay_add_all_algorithms();

-	/* At first, get a connection to the authentication agent. */
+      	/* Init available hardware crypto engines. */
+	ENGINE_load_builtin_engines();
+	ENGINE_register_all_complete();
+	ENGINE_set_default_ciphers(ENGINE_by_id("padlock"));
+
 	ac = ssh_get_authentication_connection();
 	if (ac == NULL) {
 		fprintf(stderr,
diff -urN openssh-4.7p1.orig/ssh-agent.c openssh-4.7p1/ssh-agent.c
--- openssh-4.7p1.orig/ssh-agent.c	2007-09-06 15:16:42.472974134 +0200
+++ openssh-4.7p1/ssh-agent.c	2007-09-06 15:23:21.495713144 +0200
@@ -51,6 +51,7 @@

 #include <openssl/evp.h>
 #include <openssl/md5.h>
+#include <openssl/engine.h>

 #include <errno.h>
 #include <fcntl.h>
@@ -1061,6 +1062,11 @@

 	SSLeay_add_all_algorithms();

+      	/* Init available hardware crypto engines. */
+	ENGINE_load_builtin_engines();
+	ENGINE_register_all_complete();
+	ENGINE_set_default_ciphers(ENGINE_by_id("padlock"));
+
 	__progname = ssh_get_progname(av[0]);
 	init_rng();
 	seed_rng();
diff -urN openssh-4.7p1.orig/ssh.c openssh-4.7p1/ssh.c
--- openssh-4.7p1.orig/ssh.c	2007-09-06 15:16:42.472974134 +0200
+++ openssh-4.7p1/ssh.c	2007-09-06 15:24:18.498961574 +0200
@@ -72,6 +72,7 @@

 #include <openssl/evp.h>
 #include <openssl/err.h>
+#include <openssl/engine.h>

 #include "xmalloc.h"
 #include "ssh.h"
@@ -560,6 +561,11 @@
 	SSLeay_add_all_algorithms();
 	ERR_load_crypto_strings();

+      	/* Init available hardware crypto engines. */
+	ENGINE_load_builtin_engines();
+	ENGINE_register_all_complete();
+	ENGINE_set_default_ciphers(ENGINE_by_id("padlock"));
+
 	/* Initialize the command to execute on remote host. */
 	buffer_init(&command);

diff -urN openssh-4.7p1.orig/sshd.c openssh-4.7p1/sshd.c
--- openssh-4.7p1.orig/sshd.c	2007-09-06 15:16:42.472974134 +0200
+++ openssh-4.7p1/sshd.c	2007-09-06 15:25:03.001497629 +0200
@@ -75,6 +75,7 @@
 #include <openssl/bn.h>
 #include <openssl/md5.h>
 #include <openssl/rand.h>
+#include <openssl/engine.h>
 #ifdef HAVE_SECUREWARE
 #include <sys/security.h>
 #include <prot.h>
@@ -1376,6 +1377,11 @@

 	SSLeay_add_all_algorithms();

+      	/* Init available hardware crypto engines. */
+	ENGINE_load_builtin_engines();
+	ENGINE_register_all_complete();
+	ENGINE_set_default_ciphers(ENGINE_by_id("padlock"));
+
 	/*
 	 * Force logging to stderr until we have loaded the private host
 	 * key (unless started from inetd)
diff -urN openssh-4.7p1.orig/ssh-keygen.c openssh-4.7p1/ssh-keygen.c
--- openssh-4.7p1.orig/ssh-keygen.c	2007-09-06 15:16:42.472974134 +0200
+++ openssh-4.7p1/ssh-keygen.c	2007-09-06 15:25:52.982847129 +0200
@@ -21,6 +21,7 @@

 #include <openssl/evp.h>
 #include <openssl/pem.h>
+#include <openssl/engine.h>

 #include <errno.h>
 #include <fcntl.h>
@@ -1073,6 +1074,12 @@
 	__progname = ssh_get_progname(argv[0]);

 	SSLeay_add_all_algorithms();
+
+      	/* Init available hardware crypto engines. */
+	ENGINE_load_builtin_engines();
+	ENGINE_register_all_complete();
+	ENGINE_set_default_ciphers(ENGINE_by_id("padlock"));
+
 	log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);

 	init_rng();
diff -urN openssh-4.7p1.orig/ssh-keysign.c openssh-4.7p1/ssh-keysign.c
--- openssh-4.7p1.orig/ssh-keysign.c	2007-09-06 15:16:42.472974134 +0200
+++ openssh-4.7p1/ssh-keysign.c	2007-09-06 15:26:18.971328869 +0200
@@ -38,6 +38,7 @@
 #include <openssl/evp.h>
 #include <openssl/rand.h>
 #include <openssl/rsa.h>
+#include <openssl/engine.h>

 #include "xmalloc.h"
 #include "log.h"
@@ -195,6 +196,12 @@
 		fatal("could not open any host key");

 	SSLeay_add_all_algorithms();
+
+      	/* Init available hardware crypto engines. */
+	ENGINE_load_builtin_engines();
+	ENGINE_register_all_complete();
+	ENGINE_set_default_ciphers(ENGINE_by_id("padlock"));
+
 	for (i = 0; i < 256; i++)
 		rnd[i] = arc4random();
 	RAND_seed(rnd, sizeof(rnd));
