"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "apps/gendsa.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).

gendsa.c  (openssl-1.1.1f):gendsa.c  (openssl-1.1.1g)
/* /*
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright 1995-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_DSA #include <stdio.h>
NON_EMPTY_TRANSLATION_UNIT #include <string.h>
#else #include <sys/types.h>
#include <sys/stat.h>
# include <stdio.h> #include "apps.h"
# include <string.h> #include "progs.h"
# include <sys/types.h> #include <openssl/bio.h>
# include <sys/stat.h> #include <openssl/err.h>
# include "apps.h" #include <openssl/bn.h>
# include "progs.h" #include <openssl/dsa.h>
# include <openssl/bio.h> #include <openssl/x509.h>
# include <openssl/err.h> #include <openssl/pem.h>
# include <openssl/bn.h>
# include <openssl/dsa.h>
# include <openssl/x509.h>
# include <openssl/pem.h>
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_OUT, OPT_PASSOUT, OPT_ENGINE, OPT_CIPHER, OPT_OUT, OPT_PASSOUT, OPT_ENGINE, OPT_CIPHER,
OPT_R_ENUM OPT_R_ENUM
} OPTION_CHOICE; } OPTION_CHOICE;
const OPTIONS gendsa_options[] = { const OPTIONS gendsa_options[] = {
{OPT_HELP_STR, 1, '-', "Usage: %s [args] dsaparam-file\n"}, {OPT_HELP_STR, 1, '-', "Usage: %s [args] dsaparam-file\n"},
{OPT_HELP_STR, 1, '-', "Valid options are:\n"}, {OPT_HELP_STR, 1, '-', "Valid options are:\n"},
{"help", OPT_HELP, '-', "Display this summary"}, {"help", OPT_HELP, '-', "Display this summary"},
{"out", OPT_OUT, '>', "Output the key to the specified file"}, {"out", OPT_OUT, '>', "Output the key to the specified file"},
{"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"},
OPT_R_OPTIONS, OPT_R_OPTIONS,
{"", OPT_CIPHER, '-', "Encrypt the output with any supported cipher"}, {"", OPT_CIPHER, '-', "Encrypt the output with any supported cipher"},
# 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 gendsa_main(int argc, char **argv) int gendsa_main(int argc, char **argv)
{ {
ENGINE *e = NULL; ENGINE *e = NULL;
BIO *out = NULL, *in = NULL; BIO *out = NULL, *in = NULL;
DSA *dsa = NULL; DSA *dsa = NULL;
const EVP_CIPHER *enc = NULL; const EVP_CIPHER *enc = NULL;
char *dsaparams = NULL; char *dsaparams = NULL;
skipping to change at line 146 skipping to change at line 142
if (ret != 0) if (ret != 0)
ERR_print_errors(bio_err); ERR_print_errors(bio_err);
end2: end2:
BIO_free(in); BIO_free(in);
BIO_free_all(out); BIO_free_all(out);
DSA_free(dsa); DSA_free(dsa);
release_engine(e); release_engine(e);
OPENSSL_free(passout); OPENSSL_free(passout);
return ret; return ret;
} }
#endif
 End of changes. 5 change blocks. 
19 lines changed or deleted 15 lines changed or added

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