Make it possible to get ENGINESDIR info from OpenSSL_versions
Have apps/openssl display the result along with OPENSSLDIR As part of this, add ENGINESDIR in util/mk1mf.pl Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
@@ -141,6 +141,7 @@ OPTIONS version_options[] = {
|
|||||||
{"a", OPT_A, '-', "Show all data"},
|
{"a", OPT_A, '-', "Show all data"},
|
||||||
{"b", OPT_B, '-', "Show build date"},
|
{"b", OPT_B, '-', "Show build date"},
|
||||||
{"d", OPT_D, '-', "Show configuration directory"},
|
{"d", OPT_D, '-', "Show configuration directory"},
|
||||||
|
{"e", OPT_D, '-', "Show engines directory"},
|
||||||
{"f", OPT_F, '-', "Show compiler flags used"},
|
{"f", OPT_F, '-', "Show compiler flags used"},
|
||||||
{"o", OPT_O, '-', "Show some internal datatype options"},
|
{"o", OPT_O, '-', "Show some internal datatype options"},
|
||||||
{"p", OPT_P, '-', "Show target build platform"},
|
{"p", OPT_P, '-', "Show target build platform"},
|
||||||
@@ -152,6 +153,7 @@ int version_main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
int ret = 1, dirty = 0;
|
int ret = 1, dirty = 0;
|
||||||
int cflags = 0, version = 0, date = 0, options = 0, platform = 0, dir = 0;
|
int cflags = 0, version = 0, date = 0, options = 0, platform = 0, dir = 0;
|
||||||
|
int engdir = 0;
|
||||||
char *prog;
|
char *prog;
|
||||||
OPTION_CHOICE o;
|
OPTION_CHOICE o;
|
||||||
|
|
||||||
@@ -172,6 +174,9 @@ int version_main(int argc, char **argv)
|
|||||||
case OPT_D:
|
case OPT_D:
|
||||||
dirty = dir = 1;
|
dirty = dir = 1;
|
||||||
break;
|
break;
|
||||||
|
case OPT_E:
|
||||||
|
dirty = engdir = 1;
|
||||||
|
break;
|
||||||
case OPT_F:
|
case OPT_F:
|
||||||
dirty = cflags = 1;
|
dirty = cflags = 1;
|
||||||
break;
|
break;
|
||||||
@@ -228,6 +233,8 @@ int version_main(int argc, char **argv)
|
|||||||
printf("%s\n", OpenSSL_version(OPENSSL_CFLAGS));
|
printf("%s\n", OpenSSL_version(OPENSSL_CFLAGS));
|
||||||
if (dir)
|
if (dir)
|
||||||
printf("%s\n", OpenSSL_version(OPENSSL_DIR));
|
printf("%s\n", OpenSSL_version(OPENSSL_DIR));
|
||||||
|
if (engdir)
|
||||||
|
printf("%s\n", OpenSSL_version(OPENSSL_ENGINES_DIR));
|
||||||
ret = 0;
|
ret = 0;
|
||||||
end:
|
end:
|
||||||
return (ret);
|
return (ret);
|
||||||
|
|||||||
@@ -100,6 +100,13 @@ const char *OpenSSL_version(int t)
|
|||||||
return "OPENSSLDIR: \"" OPENSSLDIR "\"";
|
return "OPENSSLDIR: \"" OPENSSLDIR "\"";
|
||||||
#else
|
#else
|
||||||
return "OPENSSLDIR: N/A";
|
return "OPENSSLDIR: N/A";
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
if (t == OPENSSL_ENGINES_DIR) {
|
||||||
|
#ifdef ENGINESDIR
|
||||||
|
return "ENGINESDIR: \"" ENGINESDIR "\"";
|
||||||
|
#else
|
||||||
|
return "ENGINESDIR: N/A";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return ("not available");
|
return ("not available");
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ B<openssl version>
|
|||||||
[B<-f>]
|
[B<-f>]
|
||||||
[B<-p>]
|
[B<-p>]
|
||||||
[B<-d>]
|
[B<-d>]
|
||||||
|
[B<-e>]
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
@@ -56,6 +57,10 @@ platform setting.
|
|||||||
|
|
||||||
OPENSSLDIR setting.
|
OPENSSLDIR setting.
|
||||||
|
|
||||||
|
=item B<-e>
|
||||||
|
|
||||||
|
ENGINESDIR setting.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head1 NOTES
|
=head1 NOTES
|
||||||
|
|||||||
@@ -77,6 +77,11 @@ if available or "platform: information not available" otherwise.
|
|||||||
The "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR: "...""
|
The "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR: "...""
|
||||||
if available or "OPENSSLDIR: N/A" otherwise.
|
if available or "OPENSSLDIR: N/A" otherwise.
|
||||||
|
|
||||||
|
=item OPENSSL_ENGINES_DIR
|
||||||
|
|
||||||
|
The "ENGINESDIR" setting of the library build in the form "ENGINESDIR: "...""
|
||||||
|
if available or "ENGINESDIR: N/A" otherwise.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
For an unknown B<t>, the text "not available" is returned.
|
For an unknown B<t>, the text "not available" is returned.
|
||||||
|
|||||||
@@ -362,6 +362,7 @@ const char *OpenSSL_version(int type);
|
|||||||
# define OPENSSL_BUILT_ON 2
|
# define OPENSSL_BUILT_ON 2
|
||||||
# define OPENSSL_PLATFORM 3
|
# define OPENSSL_PLATFORM 3
|
||||||
# define OPENSSL_DIR 4
|
# define OPENSSL_DIR 4
|
||||||
|
# define OPENSSL_ENGINES_DIR 5
|
||||||
|
|
||||||
int OPENSSL_issetugid(void);
|
int OPENSSL_issetugid(void);
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ use Cwd;
|
|||||||
|
|
||||||
$INSTALLTOP="/usr/local";
|
$INSTALLTOP="/usr/local";
|
||||||
$OPENSSLDIR="/usr/local/ssl";
|
$OPENSSLDIR="/usr/local/ssl";
|
||||||
|
$ENGINESDIR="/usr/local/lib/engines";
|
||||||
$OPTIONS="";
|
$OPTIONS="";
|
||||||
$ssl_version="";
|
$ssl_version="";
|
||||||
$banner="\t\@echo Building OpenSSL";
|
$banner="\t\@echo Building OpenSSL";
|
||||||
@@ -47,6 +48,7 @@ my %mf_import = (
|
|||||||
OPTIONS => \$OPTIONS,
|
OPTIONS => \$OPTIONS,
|
||||||
INSTALLTOP => \$INSTALLTOP,
|
INSTALLTOP => \$INSTALLTOP,
|
||||||
OPENSSLDIR => \$OPENSSLDIR,
|
OPENSSLDIR => \$OPENSSLDIR,
|
||||||
|
ENGINESDIR => \$ENGINESDIR,
|
||||||
PLATFORM => \$mf_platform,
|
PLATFORM => \$mf_platform,
|
||||||
CC => \$mf_cc,
|
CC => \$mf_cc,
|
||||||
CFLAG => \$mf_cflag,
|
CFLAG => \$mf_cflag,
|
||||||
@@ -636,6 +638,7 @@ $defs .= $preamble if defined $preamble;
|
|||||||
$defs.= <<"EOF";
|
$defs.= <<"EOF";
|
||||||
INSTALLTOP=$INSTALLTOP
|
INSTALLTOP=$INSTALLTOP
|
||||||
OPENSSLDIR=$OPENSSLDIR
|
OPENSSLDIR=$OPENSSLDIR
|
||||||
|
ENGINESDIR=$ENGINESDIR
|
||||||
|
|
||||||
# Set your compiler options
|
# Set your compiler options
|
||||||
PLATFORM=$platform
|
PLATFORM=$platform
|
||||||
@@ -770,6 +773,7 @@ install: all
|
|||||||
\$(MKDIR) \"\$(INSTALLTOP)${o}include\"
|
\$(MKDIR) \"\$(INSTALLTOP)${o}include\"
|
||||||
\$(MKDIR) \"\$(INSTALLTOP)${o}include${o}openssl\"
|
\$(MKDIR) \"\$(INSTALLTOP)${o}include${o}openssl\"
|
||||||
\$(MKDIR) \"\$(INSTALLTOP)${o}lib\"
|
\$(MKDIR) \"\$(INSTALLTOP)${o}lib\"
|
||||||
|
\$(MKDIR) \"\$(INSTALLTOP)${o}lib${o}engines\"
|
||||||
$extra_install
|
$extra_install
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
Reference in New Issue
Block a user