"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "apps/rsautl.c" between
openssl-1.1.1f.tar.gz and openssl-1.1.1g.tar.gz

About: OpenSSL is a toolkit implementing the Transport Layer Security (TLS) protocols (including SSLv3) as well as a full-strength general purpose cryptographic library. Long Term Support (LTS) version (includes support for TLSv1.3).

rsautl.c  (openssl-1.1.1f):rsautl.c  (openssl-1.1.1g)
/* /*
* Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
* *
* Licensed under the OpenSSL license (the "License"). You may not use * Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy * this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at * in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html * https://www.openssl.org/source/license.html
*/ */
#include <openssl/opensslconf.h> #include <openssl/opensslconf.h>
#ifdef OPENSSL_NO_RSA #include "apps.h"
NON_EMPTY_TRANSLATION_UNIT #include "progs.h"
#else #include <string.h>
#include <openssl/err.h>
# include "apps.h" #include <openssl/pem.h>
# include "progs.h" #include <openssl/rsa.h>
# include <string.h>
# include <openssl/err.h> #define RSA_SIGN 1
# include <openssl/pem.h> #define RSA_VERIFY 2
# include <openssl/rsa.h> #define RSA_ENCRYPT 3
#define RSA_DECRYPT 4
# define RSA_SIGN 1
# define RSA_VERIFY 2 #define KEY_PRIVKEY 1
# define RSA_ENCRYPT 3 #define KEY_PUBKEY 2
# define RSA_DECRYPT 4 #define KEY_CERT 3
# define KEY_PRIVKEY 1
# define KEY_PUBKEY 2
# define KEY_CERT 3
typedef enum OPTION_choice { typedef enum OPTION_choice {
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,
OPT_ENGINE, OPT_IN, OPT_OUT, OPT_ASN1PARSE, OPT_HEXDUMP, OPT_ENGINE, OPT_IN, OPT_OUT, OPT_ASN1PARSE, OPT_HEXDUMP,
OPT_RAW, OPT_OAEP, OPT_SSL, OPT_PKCS, OPT_X931, OPT_RAW, OPT_OAEP, OPT_SSL, OPT_PKCS, OPT_X931,
OPT_SIGN, OPT_VERIFY, OPT_REV, OPT_ENCRYPT, OPT_DECRYPT, OPT_SIGN, OPT_VERIFY, OPT_REV, OPT_ENCRYPT, OPT_DECRYPT,
OPT_PUBIN, OPT_CERTIN, OPT_INKEY, OPT_PASSIN, OPT_KEYFORM, OPT_PUBIN, OPT_CERTIN, OPT_INKEY, OPT_PASSIN, OPT_KEYFORM,
OPT_R_ENUM OPT_R_ENUM
} OPTION_CHOICE; } OPTION_CHOICE;
skipping to change at line 63 skipping to change at line 59
{"verify", OPT_VERIFY, '-', "Verify with public key"}, {"verify", OPT_VERIFY, '-', "Verify with public key"},
{"asn1parse", OPT_ASN1PARSE, '-', {"asn1parse", OPT_ASN1PARSE, '-',
"Run output through asn1parse; useful with -verify"}, "Run output through asn1parse; useful with -verify"},
{"hexdump", OPT_HEXDUMP, '-', "Hex dump output"}, {"hexdump", OPT_HEXDUMP, '-', "Hex dump output"},
{"x931", OPT_X931, '-', "Use ANSI X9.31 padding"}, {"x931", OPT_X931, '-', "Use ANSI X9.31 padding"},
{"rev", OPT_REV, '-', "Reverse the order of the input buffer"}, {"rev", OPT_REV, '-', "Reverse the order of the input buffer"},
{"encrypt", OPT_ENCRYPT, '-', "Encrypt with public key"}, {"encrypt", OPT_ENCRYPT, '-', "Encrypt with public key"},
{"decrypt", OPT_DECRYPT, '-', "Decrypt with private key"}, {"decrypt", OPT_DECRYPT, '-', "Decrypt with private key"},
{"passin", OPT_PASSIN, 's', "Input file pass phrase source"}, {"passin", OPT_PASSIN, 's', "Input file pass phrase source"},
OPT_R_OPTIONS, OPT_R_OPTIONS,
# ifndef OPENSSL_NO_ENGINE #ifndef OPENSSL_NO_ENGINE
{"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"},
# endif #endif
{NULL} {NULL}
}; };
int rsautl_main(int argc, char **argv) int rsautl_main(int argc, char **argv)
{ {
BIO *in = NULL, *out = NULL; BIO *in = NULL, *out = NULL;
ENGINE *e = NULL; ENGINE *e = NULL;
EVP_PKEY *pkey = NULL; EVP_PKEY *pkey = NULL;
RSA *rsa = NULL; RSA *rsa = NULL;
X509 *x; X509 *x;
skipping to change at line 282 skipping to change at line 278
end: end:
RSA_free(rsa); RSA_free(rsa);
release_engine(e); release_engine(e);
BIO_free(in); BIO_free(in);
BIO_free_all(out); BIO_free_all(out);
OPENSSL_free(rsa_in); OPENSSL_free(rsa_in);
OPENSSL_free(rsa_out); OPENSSL_free(rsa_out);
OPENSSL_free(passin); OPENSSL_free(passin);
return ret; return ret;
} }
#endif
 End of changes. 5 change blocks. 
22 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)