"Fossies" - the Fresh Open Source Software Archive  

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

srp.c  (openssl-1.1.1f):srp.c  (openssl-1.1.1g)
/* /*
* Copyright 2004-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2004-2020 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2004, EdelKey Project. All Rights Reserved. * Copyright (c) 2004, EdelKey Project. 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
* *
* Originally written by Christophe Renou and Peter Sylvester, * Originally written by Christophe Renou and Peter Sylvester,
* for the EdelKey project. * for the EdelKey project.
*/ */
#include <openssl/opensslconf.h> #include <openssl/opensslconf.h>
#ifdef OPENSSL_NO_SRP #include <stdio.h>
NON_EMPTY_TRANSLATION_UNIT #include <stdlib.h>
#else #include <string.h>
#include <openssl/conf.h>
# include <stdio.h> #include <openssl/bio.h>
# include <stdlib.h> #include <openssl/err.h>
# include <string.h> #include <openssl/txt_db.h>
# include <openssl/conf.h> #include <openssl/buffer.h>
# include <openssl/bio.h> #include <openssl/srp.h>
# include <openssl/err.h> #include "apps.h"
# include <openssl/txt_db.h> #include "progs.h"
# include <openssl/buffer.h>
# include <openssl/srp.h>
# include "apps.h"
# include "progs.h"
# define BASE_SECTION "srp" #define BASE_SECTION "srp"
# define CONFIG_FILE "openssl.cnf" #define CONFIG_FILE "openssl.cnf"
# define ENV_DATABASE "srpvfile" #define ENV_DATABASE "srpvfile"
# define ENV_DEFAULT_SRP "default_srp" #define ENV_DEFAULT_SRP "default_srp"
static int get_index(CA_DB *db, char *id, char type) static int get_index(CA_DB *db, char *id, char type)
{ {
char **pp; char **pp;
int i; int i;
if (id == NULL) if (id == NULL)
return -1; return -1;
if (type == DB_SRP_INDEX) { if (type == DB_SRP_INDEX) {
for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) {
pp = sk_OPENSSL_PSTRING_value(db->db->data, i); pp = sk_OPENSSL_PSTRING_value(db->db->data, i);
skipping to change at line 214 skipping to change at line 210
{"add", OPT_ADD, '-', "Add a user and srp verifier"}, {"add", OPT_ADD, '-', "Add a user and srp verifier"},
{"modify", OPT_MODIFY, '-', {"modify", OPT_MODIFY, '-',
"Modify the srp verifier of an existing user"}, "Modify the srp verifier of an existing user"},
{"delete", OPT_DELETE, '-', "Delete user from verifier file"}, {"delete", OPT_DELETE, '-', "Delete user from verifier file"},
{"list", OPT_LIST, '-', "List users"}, {"list", OPT_LIST, '-', "List users"},
{"gn", OPT_GN, 's', "Set g and N values to be used for new verifier"}, {"gn", OPT_GN, 's', "Set g and N values to be used for new verifier"},
{"userinfo", OPT_USERINFO, 's', "Additional info to be set for user"}, {"userinfo", OPT_USERINFO, 's', "Additional info to be set for user"},
{"passin", OPT_PASSIN, 's', "Input file pass phrase source"}, {"passin", OPT_PASSIN, 's', "Input file pass phrase source"},
{"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, {"passout", OPT_PASSOUT, 's', "Output 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 srp_main(int argc, char **argv) int srp_main(int argc, char **argv)
{ {
ENGINE *e = NULL; ENGINE *e = NULL;
CA_DB *db = NULL; CA_DB *db = NULL;
CONF *conf = NULL; CONF *conf = NULL;
int gNindex = -1, maxgN = -1, ret = 1, errors = 0, verbose = 0, i; int gNindex = -1, maxgN = -1, ret = 1, errors = 0, verbose = 0, i;
int doupdatedb = 0, mode = OPT_ERR; int doupdatedb = 0, mode = OPT_ERR;
skipping to change at line 612 skipping to change at line 608
OPENSSL_free(passin); OPENSSL_free(passin);
OPENSSL_free(passout); OPENSSL_free(passout);
if (ret) if (ret)
ERR_print_errors(bio_err); ERR_print_errors(bio_err);
NCONF_free(conf); NCONF_free(conf);
free_index(db); free_index(db);
release_engine(e); release_engine(e);
return ret; return ret;
} }
#endif
 End of changes. 7 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)