*** empty log message ***
[openssl.git] / apps / sc.c
index 0c00c37fc6050755abfd45cc8143cce5fe93f505..e6da658f06342eede973613ac138ac2a4cf0b52e 100644 (file)
--- a/apps/sc.c
+++ b/apps/sc.c
 #define APPS_WIN16
 #endif
 #include "apps.h"
-#include "x509.h"
-#include "ssl.h"
-#include "err.h"
-#include "pem.h"
+#include <openssl/x509.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+#include <openssl/pem.h>
 #include "s_apps.h"
 
 #ifdef WINDOWS
@@ -110,7 +110,7 @@ static void print_stuff();
 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 +138,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 +768,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)