#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/rand.h>
-#ifndef NO_MD5
+#ifndef OPENSSL_NO_MD5
#include <openssl/md5.h>
#endif
#include <openssl/pem.h>
unsigned char *buff=NULL,*bufsize=NULL;
int bsize=BSIZE,verbose=0;
int ret=1,inl;
+ int nopad = 0;
unsigned char key[EVP_MAX_KEY_LENGTH],iv[EVP_MAX_IV_LENGTH];
unsigned char salt[PKCS5_SALT_LEN];
char *str=NULL, *passarg = NULL, *pass = NULL;
printkey=1;
else if (strcmp(*argv,"-v") == 0)
verbose=1;
+ else if (strcmp(*argv,"-nopad") == 0)
+ nopad=1;
else if (strcmp(*argv,"-salt") == 0)
nosalt=0;
else if (strcmp(*argv,"-nosalt") == 0)
if (outf == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
if ((benc=BIO_new(BIO_f_cipher())) == NULL)
goto end;
BIO_set_cipher(benc,cipher,key,iv,enc);
+ if (nopad)
+ {
+ EVP_CIPHER_CTX *ctx;
+ BIO_get_cipher_ctx(benc, &ctx);
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
+ }
if (debug)
{
BIO_set_callback(benc,BIO_debug_callback);