crypto/cast/asm/cast-586.pl: +5% on PIII and remove obsolete readme.
[openssl.git] / apps / enc.c
index aef8978a9a52c0883530cf4c07711bd13ff420e5..75d97bbc27fbc713477c5f741286cd2e0800b90a 100644 (file)
@@ -67,7 +67,9 @@
 #include <openssl/x509.h>
 #include <openssl/rand.h>
 #include <openssl/pem.h>
+#ifndef OPENSSL_NO_COMP
 #include <openssl/comp.h>
+#endif
 #include <ctype.h>
 
 int set_hex(char *in,unsigned char *out,int size);
@@ -331,6 +333,18 @@ bad:
         setup_engine(bio_err, engine, 0);
 #endif
 
+       if (cipher && EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER)
+               {
+               BIO_printf(bio_err, "AEAD ciphers not supported by the enc utility\n");
+               goto end;
+               }
+
+       if (cipher && (EVP_CIPHER_mode(cipher) == EVP_CIPH_XTS_MODE))
+               {
+               BIO_printf(bio_err, "Ciphers in XTS mode are not supported by the enc utility\n");
+               goto end;
+               }
+
        if (md && (dgst=EVP_get_digestbyname(md)) == NULL)
                {
                BIO_printf(bio_err,"%s is an unsupported message digest type\n",md);