]> git.ipfire.org Git - thirdparty/openssl.git/blame - apps/s_apps.h
Add --with-rand-seed
[thirdparty/openssl.git] / apps / s_apps.h
CommitLineData
846e33c7 1/*
2234212c 2 * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
a661b653 3 *
846e33c7
RS
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
a661b653 8 */
846e33c7 9
bc36ee62
RL
10#include <openssl/opensslconf.h>
11
3d7c4a5a 12#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
0f113f3e 13# include <conio.h>
3d7c4a5a
RL
14#endif
15
2140659b 16#if defined(OPENSSL_SYS_MSDOS) && !defined(_WIN32)
0f113f3e 17# define _kbhit kbhit
3d7c4a5a
RL
18#endif
19
ab69ac00 20#define PORT "4433"
d02b48c6
RE
21#define PROTOCOL "tcp"
22
72d0bc84 23typedef int (*do_server_cb)(int s, int stype, int prot, unsigned char *context);
ab69ac00 24int do_server(int *accept_sock, const char *host, const char *port,
72d0bc84 25 int family, int type, int protocol,
a773b52a
RS
26 do_server_cb cb,
27 unsigned char *context, int naccept);
d02b48c6 28#ifdef HEADER_X509_H
6d23cf97 29int verify_callback(int ok, X509_STORE_CTX *ctx);
d02b48c6
RE
30#endif
31#ifdef HEADER_SSL_H
32int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file);
fc6fc7ff 33int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key,
0f113f3e 34 STACK_OF(X509) *chain, int build_chain);
9f27b1ee 35int ssl_print_sigalgs(BIO *out, SSL *s);
20b431e3 36int ssl_print_point_formats(BIO *out, SSL *s);
de4d764e 37int ssl_print_groups(BIO *out, SSL *s, int noshared);
d02b48c6 38#endif
33a8de69 39int ssl_print_tmp_key(BIO *out, SSL *s);
ab69ac00 40int init_client(int *sock, const char *host, const char *port,
8ccc2377 41 int family, int type, int protocol);
d02b48c6 42int should_retry(int i);
d02b48c6 43
6d23cf97 44long bio_dump_callback(BIO *bio, int cmd, const char *argp,
0f113f3e 45 int argi, long argl, long ret);
d02b48c6
RE
46
47#ifdef HEADER_SSL_H
6d23cf97 48void apps_ssl_info_callback(const SSL *s, int where, int ret);
0f113f3e
MC
49void msg_cb(int write_p, int version, int content_type, const void *buf,
50 size_t len, SSL *ssl, void *arg);
b6981744 51void tlsext_cb(SSL *s, int client_server, int type, const unsigned char *data,
0f113f3e 52 int len, void *arg);
d02b48c6 53#endif
07a9d1a2 54
0f113f3e
MC
55int generate_cookie_callback(SSL *ssl, unsigned char *cookie,
56 unsigned int *cookie_len);
31011544 57int verify_cookie_callback(SSL *ssl, const unsigned char *cookie,
0f113f3e 58 unsigned int cookie_len);
18d71588
DSH
59
60typedef struct ssl_excert_st SSL_EXCERT;
61
62void ssl_ctx_set_excert(SSL_CTX *ctx, SSL_EXCERT *exc);
63void ssl_excert_free(SSL_EXCERT *exc);
7e1b7485
RS
64int args_excert(int option, SSL_EXCERT **pexc);
65int load_excert(SSL_EXCERT **pexc);
c0a445a9 66void print_verify_detail(SSL *s, BIO *bio);
ecf3a1fb 67void print_ssl_summary(SSL *s);
5d2e07f1 68#ifdef HEADER_SSL_H
dba31777 69int config_ctx(SSL_CONF_CTX *cctx, STACK_OF(OPENSSL_STRING) *str, SSL_CTX *ctx);
0f113f3e
MC
70int ssl_ctx_add_crls(SSL_CTX *ctx, STACK_OF(X509_CRL) *crls,
71 int crl_download);
72int ssl_load_stores(SSL_CTX *ctx, const char *vfyCApath,
73 const char *vfyCAfile, const char *chCApath,
74 const char *chCAfile, STACK_OF(X509_CRL) *crls,
75 int crl_download);
ecf3a1fb 76void ssl_ctx_security_debug(SSL_CTX *ctx, int verbose);
4bf73e9f 77int set_keylog_file(SSL_CTX *ctx, const char *keylog_file);
5969a2dd 78void print_ca_names(BIO *bio, SSL *s);
5d2e07f1 79#endif