Skip to content

Commit

Permalink
Add AES support in the applications that support -des and -des3.
Browse files Browse the repository at this point in the history
  • Loading branch information
levitte committed Feb 20, 2002
1 parent b070170 commit 9f0a373
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 4 deletions.
5 changes: 1 addition & 4 deletions STATUS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

OpenSSL STATUS Last modified at
______________ $Date: 2002/02/20 17:40:33 $
______________ $Date: 2002/02/20 18:03:54 $

DEVELOPMENT STATE

Expand Down Expand Up @@ -61,9 +61,6 @@
weakness in SSL/TLS should be added; see
http://www.openssl.org/~bodo/tls-cbc.txt

o All 'openssl' subprograms taking '-des' and '-des3' options should
include AES support (0.9.7-dev)

o 'openssl speed' should include AES support (0.9.7-dev)

o apps/ca.c: "Sign the certificate?" - "n" creates empty certificate file
Expand Down
7 changes: 7 additions & 0 deletions apps/dsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
* -des - encrypt output if PEM format with DES in cbc mode
* -des3 - encrypt output if PEM format
* -idea - encrypt output if PEM format
* -aes128 - encrypt output if PEM format
* -aes192 - encrypt output if PEM format
* -aes256 - encrypt output if PEM format
* -text - print a text version
* -modulus - print the DSA public key
*/
Expand Down Expand Up @@ -188,6 +191,10 @@ int MAIN(int argc, char **argv)
BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n");
#ifndef OPENSSL_NO_IDEA
BIO_printf(bio_err," -idea encrypt PEM output with cbc idea\n");
#endif
#ifndef OPENSSL_NO_AES
BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
BIO_printf(bio_err," encrypt PEM output with cbc aes\n");
#endif
BIO_printf(bio_err," -text print the key in text\n");
BIO_printf(bio_err," -noout don't print key out\n");
Expand Down
12 changes: 12 additions & 0 deletions apps/gendsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ int MAIN(int argc, char **argv)
#ifndef OPENSSL_NO_IDEA
else if (strcmp(*argv,"-idea") == 0)
enc=EVP_idea_cbc();
#endif
#ifndef OPENSSL_NO_AES
else if (strcmp(*argv,"-aes128") == 0)
enc=EVP_aes_128_cbc();
else if (strcmp(*argv,"-aes192") == 0)
enc=EVP_aes_192_cbc();
else if (strcmp(*argv,"-aes256") == 0)
enc=EVP_aes_256_cbc();
#endif
else if (**argv != '-' && dsaparams == NULL)
{
Expand All @@ -151,6 +159,10 @@ int MAIN(int argc, char **argv)
#endif
#ifndef OPENSSL_NO_IDEA
BIO_printf(bio_err," -idea - encrypt the generated key with IDEA in cbc mode\n");
#endif
#ifndef OPENSSL_NO_AES
BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
BIO_printf(bio_err," encrypt PEM output with cbc aes\n");
#endif
BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
Expand Down
12 changes: 12 additions & 0 deletions apps/genrsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ int MAIN(int argc, char **argv)
#ifndef OPENSSL_NO_IDEA
else if (strcmp(*argv,"-idea") == 0)
enc=EVP_idea_cbc();
#endif
#ifndef OPENSSL_NO_AES
else if (strcmp(*argv,"-aes128") == 0)
enc=EVP_aes_128_cbc();
else if (strcmp(*argv,"-aes192") == 0)
enc=EVP_aes_192_cbc();
else if (strcmp(*argv,"-aes256") == 0)
enc=EVP_aes_256_cbc();
#endif
else if (strcmp(*argv,"-passout") == 0)
{
Expand All @@ -157,6 +165,10 @@ int MAIN(int argc, char **argv)
BIO_printf(bio_err," -des3 encrypt the generated key with DES in ede cbc mode (168 bit key)\n");
#ifndef OPENSSL_NO_IDEA
BIO_printf(bio_err," -idea encrypt the generated key with IDEA in cbc mode\n");
#endif
#ifndef OPENSSL_NO_AES
BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
BIO_printf(bio_err," encrypt PEM output with cbc aes\n");
#endif
BIO_printf(bio_err," -out file output the key to 'file\n");
BIO_printf(bio_err," -passout arg output file pass phrase source\n");
Expand Down
9 changes: 9 additions & 0 deletions apps/pkcs12.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ int MAIN(int argc, char **argv)
else if (!strcmp (*args, "-idea")) enc=EVP_idea_cbc();
#endif
else if (!strcmp (*args, "-des3")) enc = EVP_des_ede3_cbc();
#ifndef OPENSSL_NO_AES
else if (!strcmp(*argv,"-aes128")) enc=EVP_aes_128_cbc();
else if (!strcmp(*argv,"-aes192")) enc=EVP_aes_192_cbc();
else if (!strcmp(*argv,"-aes256")) enc=EVP_aes_256_cbc();
#endif
else if (!strcmp (*args, "-noiter")) iter = 1;
else if (!strcmp (*args, "-maciter"))
maciter = PKCS12_DEFAULT_ITER;
Expand Down Expand Up @@ -279,6 +284,10 @@ int MAIN(int argc, char **argv)
BIO_printf (bio_err, "-des3 encrypt private keys with triple DES (default)\n");
#ifndef OPENSSL_NO_IDEA
BIO_printf (bio_err, "-idea encrypt private keys with idea\n");
#endif
#ifndef OPENSSL_NO_AES
BIO_printf (bio_err, "-aes128, -aes192, -aes256\n");
BIO_printf (bio_err, " encrypt PEM output with cbc aes\n");
#endif
BIO_printf (bio_err, "-nodes don't encrypt private keys\n");
BIO_printf (bio_err, "-noiter don't use encryption iteration\n");
Expand Down
7 changes: 7 additions & 0 deletions apps/rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
* -des - encrypt output if PEM format with DES in cbc mode
* -des3 - encrypt output if PEM format
* -idea - encrypt output if PEM format
* -aes128 - encrypt output if PEM format
* -aes192 - encrypt output if PEM format
* -aes256 - encrypt output if PEM format
* -text - print a text version
* -modulus - print the RSA key modulus
* -check - verify key consistency
Expand Down Expand Up @@ -195,6 +198,10 @@ int MAIN(int argc, char **argv)
BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n");
#ifndef OPENSSL_NO_IDEA
BIO_printf(bio_err," -idea encrypt PEM output with cbc idea\n");
#endif
#ifndef OPENSSL_NO_AES
BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
BIO_printf(bio_err," encrypt PEM output with cbc aes\n");
#endif
BIO_printf(bio_err," -text print the key in text\n");
BIO_printf(bio_err," -noout don't print key out\n");
Expand Down
12 changes: 12 additions & 0 deletions apps/smime.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ int MAIN(int argc, char **argv)
cipher = EVP_rc2_cbc();
else if (!strcmp (*args, "-rc2-64"))
cipher = EVP_rc2_64_cbc();
#endif
#ifndef OPENSSL_NO_AES
else if (!strcmp(*argv,"-aes128") == 0)
cipher = EVP_aes_128_cbc();
else if (!strcmp(*argv,"-aes192") == 0)
cipher = EVP_aes_192_cbc();
else if (!strcmp(*argv,"-aes256") == 0)
cipher = EVP_aes_256_cbc();
#endif
else if (!strcmp (*args, "-text"))
flags |= PKCS7_TEXT;
Expand Down Expand Up @@ -283,6 +291,10 @@ int MAIN(int argc, char **argv)
BIO_printf (bio_err, "-rc2-40 encrypt with RC2-40 (default)\n");
BIO_printf (bio_err, "-rc2-64 encrypt with RC2-64\n");
BIO_printf (bio_err, "-rc2-128 encrypt with RC2-128\n");
#endif
#ifndef OPENSSL_NO_AES
BIO_printf (bio_err, "-aes128, -aes192, -aes256\n");
BIO_printf (bio_err, " encrypt PEM output with cbc aes\n");
#endif
BIO_printf (bio_err, "-nointern don't search certificates in message for signer\n");
BIO_printf (bio_err, "-nosigs don't verify message signature\n");
Expand Down

0 comments on commit 9f0a373

Please sign in to comment.