X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fsc.c;h=d1b6af6787be5e46d6853d3bf5106fb2f15b70e3;hb=ddeee82c6333f27cb85940b271c3cc4d2e940717;hp=0c00c37fc6050755abfd45cc8143cce5fe93f505;hpb=31b8d8684441e6cd5138832bb1b2ddb10acd6ba6;p=oweals%2Fopenssl.git diff --git a/apps/sc.c b/apps/sc.c index 0c00c37fc6..d1b6af6787 100644 --- a/apps/sc.c +++ b/apps/sc.c @@ -64,10 +64,10 @@ #define APPS_WIN16 #endif #include "apps.h" -#include "x509.h" -#include "ssl.h" -#include "err.h" -#include "pem.h" +#include +#include +#include +#include #include "s_apps.h" #ifdef WINDOWS @@ -99,18 +99,12 @@ static int c_nbio=0; static int c_Pause=0; static int c_debug=0; -#ifndef NOPROTO static void sc_usage(void); static void print_stuff(BIO *berr,SSL *con,int full); -#else -static void sc_usage(); -static void print_stuff(); -#endif - static BIO *bio_c_out=NULL; static int c_quiet=0; -static void sc_usage() +static void sc_usage(void) { BIO_printf(bio_err,"usage: client args\n"); BIO_printf(bio_err,"\n"); @@ -138,14 +132,12 @@ static void sc_usage() BIO_printf(bio_err," -tls1 - just use TLSv1\n"); BIO_printf(bio_err," -no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol\n"); BIO_printf(bio_err," -bugs - Switch on all SSL implementation bug workarounds\n"); - BIO_printf(bio_err," -cipher - prefered cipher to use, use the 'ssleay ciphers'\n"); + BIO_printf(bio_err," -cipher - prefered cipher to use, use the 'openssl ciphers'\n"); BIO_printf(bio_err," command to see what is available\n"); } -int MAIN(argc, argv) -int argc; -char **argv; +int MAIN(int argc, char **argv) { int off=0; SSL *con=NULL,*con2=NULL; @@ -770,8 +762,12 @@ int full; SSL_CIPHER_get_version(c), SSL_CIPHER_get_name(c)); if (peer != NULL) + { + EVP_PKEY *pktmp; BIO_printf(bio,"Server public key is %d bit\n", - EVP_PKEY_bits(X509_get_pubkey(peer))); + EVP_PKEY_bits(pktmp)); + EVP_PKEY_free(pktmp); + } SSL_SESSION_print(bio,SSL_get_session(s)); BIO_printf(bio,"---\n"); if (peer != NULL)