Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions apps/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ typedef enum OPTION_choice {
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,
OPT_CONFIGDIR, OPT_ENGINESDIR, OPT_MODULESDIR, OPT_DSOEXT, OPT_DIRNAMESEP,
OPT_LISTSEP, OPT_SEEDS, OPT_CPUSETTINGS
#ifndef OPENSSL_NO_QUIC
, OPT_QUIC
#endif
} OPTION_CHOICE;

const OPTIONS info_options[] = {
Expand All @@ -32,6 +35,9 @@ const OPTIONS info_options[] = {
{"listsep", OPT_LISTSEP, '-', "List separator character"},
{"seeds", OPT_SEEDS, '-', "Seed sources"},
{"cpusettings", OPT_CPUSETTINGS, '-', "CPU settings info"},
#ifndef OPENSSL_NO_QUIC
{"quic", OPT_QUIC, '-', "QUIC info"},
#endif
{NULL}
};

Expand Down Expand Up @@ -84,6 +90,12 @@ int info_main(int argc, char **argv)
type = OPENSSL_INFO_CPU_SETTINGS;
dirty++;
break;
#ifndef OPENSSL_NO_QUIC
case OPT_QUIC:
type = OPENSSL_INFO_QUIC;
dirty++;
break;
#endif
}
}
if (opt_num_rest() != 0)
Expand Down
4 changes: 4 additions & 0 deletions crypto/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ const char *OPENSSL_info(int t)
if (ossl_cpu_info_str[0] != '\0')
return ossl_cpu_info_str + strlen(CPUINFO_PREFIX);
break;
#ifndef OPENSSL_NO_QUIC
case OPENSSL_INFO_QUIC:
return "QUIC";
#endif
default:
break;
}
Expand Down
8 changes: 8 additions & 0 deletions doc/man3/OpenSSL_version.pod
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ automatically configured but may be set via an environment variable.
The value has the same syntax as the environment variable.
For x86 the string looks like C<OPENSSL_ia32cap=0x123:0x456>.

=item OPENSSL_INFO_QUIC

This is only defined when compiling with a QUIC-enabled version of
OpenSSL. At run time, this will return "QUIC" if QUIC is supported.

This can be used as a build time flag to determine if OpenSSL has
QUIC enabled.

=back

For an unknown I<t>, NULL is returned.
Expand Down
4 changes: 4 additions & 0 deletions include/openssl/crypto.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ const char *OPENSSL_info(int type);
# define OPENSSL_INFO_SEED_SOURCE 1007
# define OPENSSL_INFO_CPU_SETTINGS 1008

# ifndef OPENSSL_NO_QUIC
# define OPENSSL_INFO_QUIC 2000
# endif

int OPENSSL_issetugid(void);

struct crypto_ex_data_st {
Expand Down