Install various scripts to $(OPENSSLDIR)/misc instead of $(INSTALLTOP)/bin.
[oweals/openssl.git] / apps / sc.c
index 0c00c37fc6050755abfd45cc8143cce5fe93f505..d1b6af6787be5e46d6853d3bf5106fb2f15b70e3 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
@@ -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)