--- openssl-orig/crypto/engine/eng_cryptodev.c	2013-10-30 10:10:34.000000000 -0600
+++ openssl/crypto/engine/eng_cryptodev.c	2013-10-30 10:49:13.000000000 -0600
@@ -51,8 +51,8 @@
 	return;
 }
 
-#else 
- 
+#else
+
 #include <sys/types.h>
 #include <crypto/cryptodev.h>
 #include <openssl/dh.h>
@@ -147,6 +147,7 @@
 	{ CRYPTO_AES_CBC,		NID_aes_128_cbc,	16,	16, },
 	{ CRYPTO_AES_CBC,		NID_aes_192_cbc,	16,	24, },
 	{ CRYPTO_AES_CBC,		NID_aes_256_cbc,	16,	32, },
+	{ CRYPTO_AES_ECB,		NID_aes_128_ecb,	0,	16, },
 	{ CRYPTO_BLF_CBC,		NID_bf_cbc,		8,	16, },
 	{ CRYPTO_CAST_CBC,		NID_cast5_cbc,		8,	16, },
 	{ CRYPTO_SKIPJACK_CBC,		NID_undef,		0,	 0, },
@@ -600,6 +601,19 @@
 	NULL
 };
 
+const EVP_CIPHER cryptodev_aes_128_eccb = {
+	NID_aes_128_ecb,
+	16, 16, 0,
+	EVP_CIPH_ECB_MODE,
+	cryptodev_init_key,
+	cryptodev_cipher,
+	cryptodev_cleanup,
+	sizeof(struct dev_crypto_state),
+	EVP_CIPHER_set_asn1_iv,
+	EVP_CIPHER_get_asn1_iv,
+	NULL
+};
+
 /*
  * Registered by the ENGINE when used to find out how to deal with
  * a particular NID in the ENGINE. this says what we'll do at the
@@ -637,6 +651,9 @@
 	case NID_aes_256_cbc:
 		*cipher = &cryptodev_aes_256_cbc;
 		break;
+	case NID_aes_128_ecb:
+		*cipher = &cryptodev_aes_128_ecb;
+                break;
 	default:
 		*cipher = NULL;
 		break;
@@ -731,7 +748,7 @@
 
 		memcpy(state->mac_data + state->mac_len, data, count);
    		state->mac_len += count;
-	
+
 		return (1);
 	}
 
@@ -813,7 +830,7 @@
 	} else {
 		ret = 1;
 	}
-	put_dev_crypto(state->d_fd);	
+	put_dev_crypto(state->d_fd);
 	state->d_fd = -1;
 
 	return (ret);
@@ -863,8 +880,8 @@
 
 const EVP_MD cryptodev_sha1 = {
 	NID_sha1,
-	NID_undef, 
-	SHA_DIGEST_LENGTH, 
+	NID_undef,
+	SHA_DIGEST_LENGTH,
 	EVP_MD_FLAG_ONESHOT,
 	cryptodev_digest_init,
 	cryptodev_digest_update,
@@ -878,8 +895,8 @@
 
 const EVP_MD cryptodev_md5 = {
 	NID_md5,
-	NID_undef, 
-	16 /* MD5_DIGEST_LENGTH */, 
+	NID_undef,
+	16 /* MD5_DIGEST_LENGTH */,
 	EVP_MD_FLAG_ONESHOT,
 	cryptodev_digest_init,
 	cryptodev_digest_update,
@@ -904,7 +921,7 @@
 	switch (nid) {
 #ifdef USE_CRYPTODEV_DIGESTS
 	case NID_md5:
-		*digest = &cryptodev_md5; 
+		*digest = &cryptodev_md5;
 		break;
 	case NID_sha1:
 		*digest = &cryptodev_sha1;
