smime.c (160814) | smime.c (162911) |
---|---|
1/* smime.c */ 2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 3 * project. 4 */ 5/* ==================================================================== 6 * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 147 unchanged lines hidden (view full) --- 156#ifndef OPENSSL_NO_AES 157 else if (!strcmp(*args,"-aes128")) 158 cipher = EVP_aes_128_cbc(); 159 else if (!strcmp(*args,"-aes192")) 160 cipher = EVP_aes_192_cbc(); 161 else if (!strcmp(*args,"-aes256")) 162 cipher = EVP_aes_256_cbc(); 163#endif | 1/* smime.c */ 2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL 3 * project. 4 */ 5/* ==================================================================== 6 * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 147 unchanged lines hidden (view full) --- 156#ifndef OPENSSL_NO_AES 157 else if (!strcmp(*args,"-aes128")) 158 cipher = EVP_aes_128_cbc(); 159 else if (!strcmp(*args,"-aes192")) 160 cipher = EVP_aes_192_cbc(); 161 else if (!strcmp(*args,"-aes256")) 162 cipher = EVP_aes_256_cbc(); 163#endif |
164#ifndef OPENSSL_NO_CAMELLIA 165 else if (!strcmp(*args,"-camellia128")) 166 cipher = EVP_camellia_128_cbc(); 167 else if (!strcmp(*args,"-camellia192")) 168 cipher = EVP_camellia_192_cbc(); 169 else if (!strcmp(*args,"-camellia256")) 170 cipher = EVP_camellia_256_cbc(); 171#endif |
|
164 else if (!strcmp (*args, "-text")) 165 flags |= PKCS7_TEXT; 166 else if (!strcmp (*args, "-nointern")) 167 flags |= PKCS7_NOINTERN; 168 else if (!strcmp (*args, "-noverify")) 169 flags |= PKCS7_NOVERIFY; 170 else if (!strcmp (*args, "-nochain")) 171 flags |= PKCS7_NOCHAIN; --- 247 unchanged lines hidden (view full) --- 419 BIO_printf (bio_err, "-rc2-40 encrypt with RC2-40 (default)\n"); 420 BIO_printf (bio_err, "-rc2-64 encrypt with RC2-64\n"); 421 BIO_printf (bio_err, "-rc2-128 encrypt with RC2-128\n"); 422#endif 423#ifndef OPENSSL_NO_AES 424 BIO_printf (bio_err, "-aes128, -aes192, -aes256\n"); 425 BIO_printf (bio_err, " encrypt PEM output with cbc aes\n"); 426#endif | 172 else if (!strcmp (*args, "-text")) 173 flags |= PKCS7_TEXT; 174 else if (!strcmp (*args, "-nointern")) 175 flags |= PKCS7_NOINTERN; 176 else if (!strcmp (*args, "-noverify")) 177 flags |= PKCS7_NOVERIFY; 178 else if (!strcmp (*args, "-nochain")) 179 flags |= PKCS7_NOCHAIN; --- 247 unchanged lines hidden (view full) --- 427 BIO_printf (bio_err, "-rc2-40 encrypt with RC2-40 (default)\n"); 428 BIO_printf (bio_err, "-rc2-64 encrypt with RC2-64\n"); 429 BIO_printf (bio_err, "-rc2-128 encrypt with RC2-128\n"); 430#endif 431#ifndef OPENSSL_NO_AES 432 BIO_printf (bio_err, "-aes128, -aes192, -aes256\n"); 433 BIO_printf (bio_err, " encrypt PEM output with cbc aes\n"); 434#endif |
435#ifndef OPENSSL_NO_CAMELLIA 436 BIO_printf (bio_err, "-camellia128, -camellia192, -camellia256\n"); 437 BIO_printf (bio_err, " encrypt PEM output with cbc camellia\n"); 438#endif |
|
427 BIO_printf (bio_err, "-nointern don't search certificates in message for signer\n"); 428 BIO_printf (bio_err, "-nosigs don't verify message signature\n"); 429 BIO_printf (bio_err, "-noverify don't verify signers certificate\n"); 430 BIO_printf (bio_err, "-nocerts don't include signers certificate when signing\n"); 431 BIO_printf (bio_err, "-nodetach use opaque signing\n"); 432 BIO_printf (bio_err, "-noattr don't include any signed attributes\n"); 433 BIO_printf (bio_err, "-binary don't translate message to text\n"); 434 BIO_printf (bio_err, "-certfile file other certificates file\n"); --- 198 unchanged lines hidden (view full) --- 633 else if (operation == SMIME_SIGN) 634 { 635 /* If detached data and SMIME output enable partial 636 * signing. 637 */ 638 if ((flags & PKCS7_DETACHED) && (outformat == FORMAT_SMIME)) 639 flags |= PKCS7_STREAM; 640 p7 = PKCS7_sign(signer, key, other, in, flags); | 439 BIO_printf (bio_err, "-nointern don't search certificates in message for signer\n"); 440 BIO_printf (bio_err, "-nosigs don't verify message signature\n"); 441 BIO_printf (bio_err, "-noverify don't verify signers certificate\n"); 442 BIO_printf (bio_err, "-nocerts don't include signers certificate when signing\n"); 443 BIO_printf (bio_err, "-nodetach use opaque signing\n"); 444 BIO_printf (bio_err, "-noattr don't include any signed attributes\n"); 445 BIO_printf (bio_err, "-binary don't translate message to text\n"); 446 BIO_printf (bio_err, "-certfile file other certificates file\n"); --- 198 unchanged lines hidden (view full) --- 645 else if (operation == SMIME_SIGN) 646 { 647 /* If detached data and SMIME output enable partial 648 * signing. 649 */ 650 if ((flags & PKCS7_DETACHED) && (outformat == FORMAT_SMIME)) 651 flags |= PKCS7_STREAM; 652 p7 = PKCS7_sign(signer, key, other, in, flags); |
641 /* Don't need to rewind for partial signing */ 642 if (!(flags & PKCS7_STREAM) && (BIO_reset(in) != 0)) 643 { 644 BIO_printf(bio_err, "Can't rewind input file\n"); 645 goto end; 646 } | |
647 } 648 else 649 { 650 if (informat == FORMAT_SMIME) 651 p7 = SMIME_read_PKCS7(in, &indata); 652 else if (informat == FORMAT_PEM) 653 p7 = PEM_read_bio_PKCS7(in, NULL, NULL, NULL); 654 else if (informat == FORMAT_ASN1) --- 134 unchanged lines hidden --- | 653 } 654 else 655 { 656 if (informat == FORMAT_SMIME) 657 p7 = SMIME_read_PKCS7(in, &indata); 658 else if (informat == FORMAT_PEM) 659 p7 = PEM_read_bio_PKCS7(in, NULL, NULL, NULL); 660 else if (informat == FORMAT_ASN1) --- 134 unchanged lines hidden --- |