Fix warnings.
authorBen Laurie <ben@openssl.org>
Thu, 9 Jun 2011 16:03:18 +0000 (16:03 +0000)
committerBen Laurie <ben@openssl.org>
Thu, 9 Jun 2011 16:03:18 +0000 (16:03 +0000)
apps/srp.c
crypto/evp/p_sign.c
crypto/evp/p_verify.c
crypto/x509/x509_vfy.c

index 4b969ec6dd4ba931ad40355ca2d7461907f09e78..80e1b8a6607e6f92d44a76c379276ea31709884b 100644 (file)
@@ -267,9 +267,6 @@ static char *srp_create_user(char *user, char **srp_verifier,
 
 int MAIN(int argc, char **argv)
        {
 
 int MAIN(int argc, char **argv)
        {
-#ifndef OPENSSL_NO_ENGINE
-       ENGINE *e = NULL;
-#endif
        int add_user = 0;
        int list_user= 0;
        int delete_user= 0;
        int add_user = 0;
        int list_user= 0;
        int delete_user= 0;
@@ -424,7 +421,7 @@ bad:
        ERR_load_crypto_strings();
 
 #ifndef OPENSSL_NO_ENGINE
        ERR_load_crypto_strings();
 
 #ifndef OPENSSL_NO_ENGINE
-       e = setup_engine(bio_err, engine, 0);
+       setup_engine(bio_err, engine, 0);
 #endif
 
        if(!app_passwd(bio_err, passargin, passargout, &passin, &passout))
 #endif
 
        if(!app_passwd(bio_err, passargin, passargout, &passin, &passout))
index ba3596bc091183053197ccf86a3cb0855f681554..dfa48c157cf5b6db223cfdc0e4c5abb42d208c4e 100644 (file)
@@ -80,8 +80,9 @@ int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen,
        {
        unsigned char m[EVP_MAX_MD_SIZE];
        unsigned int m_len;
        {
        unsigned char m[EVP_MAX_MD_SIZE];
        unsigned int m_len;
-       int i,ok=0,v;
+       int i=0,ok=0,v;
        EVP_MD_CTX tmp_ctx;
        EVP_MD_CTX tmp_ctx;
+       EVP_PKEY_CTX *pkctx = NULL;
 
        *siglen=0;
        EVP_MD_CTX_init(&tmp_ctx);
 
        *siglen=0;
        EVP_MD_CTX_init(&tmp_ctx);
@@ -93,7 +94,6 @@ int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen,
 
        if (ctx->digest->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE)
                {
 
        if (ctx->digest->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE)
                {
-               EVP_PKEY_CTX *pkctx = NULL;
                size_t sltmp = (size_t)EVP_PKEY_size(pkey);
                i = 0;
                pkctx = EVP_PKEY_CTX_new(pkey, NULL);
                size_t sltmp = (size_t)EVP_PKEY_size(pkey);
                i = 0;
                pkctx = EVP_PKEY_CTX_new(pkey, NULL);
index d43f86e8235d8b6bfe9a6e285a6c2d8fef90fab6..5f5c409f45fca40c4eead26101ec2dcff473172a 100644 (file)
@@ -67,8 +67,9 @@ int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
        {
        unsigned char m[EVP_MAX_MD_SIZE];
        unsigned int m_len;
        {
        unsigned char m[EVP_MAX_MD_SIZE];
        unsigned int m_len;
-       int i,ok=0,v;
+       int i=-1,ok=0,v;
        EVP_MD_CTX tmp_ctx;
        EVP_MD_CTX tmp_ctx;
+       EVP_PKEY_CTX *pkctx = NULL;
 
        EVP_MD_CTX_init(&tmp_ctx);
        if (!EVP_MD_CTX_copy_ex(&tmp_ctx,ctx))
 
        EVP_MD_CTX_init(&tmp_ctx);
        if (!EVP_MD_CTX_copy_ex(&tmp_ctx,ctx))
@@ -79,7 +80,6 @@ int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
 
        if (ctx->digest->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE)
                {
 
        if (ctx->digest->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE)
                {
-               EVP_PKEY_CTX *pkctx = NULL;
                i = -1;
                pkctx = EVP_PKEY_CTX_new(pkey, NULL);
                if (!pkctx)
                i = -1;
                pkctx = EVP_PKEY_CTX_new(pkey, NULL);
                if (!pkctx)
index bd6695d0c137a4773d191783b5ff7ad18cb70389..ec9f6259feaebd21e27b51782f50c69c61a52777 100644 (file)
@@ -153,7 +153,6 @@ static int x509_subject_cmp(X509 **a, X509 **b)
 int X509_verify_cert(X509_STORE_CTX *ctx)
        {
        X509 *x,*xtmp,*chain_ss=NULL;
 int X509_verify_cert(X509_STORE_CTX *ctx)
        {
        X509 *x,*xtmp,*chain_ss=NULL;
-       X509_NAME *xn;
        int bad_chain = 0;
        X509_VERIFY_PARAM *param = ctx->param;
        int depth,i,ok=0;
        int bad_chain = 0;
        X509_VERIFY_PARAM *param = ctx->param;
        int depth,i,ok=0;
@@ -205,7 +204,6 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
                                         */
 
                /* If we are self signed, we break */
                                         */
 
                /* If we are self signed, we break */
-               xn=X509_get_issuer_name(x);
                if (ctx->check_issued(ctx, x,x)) break;
 
                /* If we were passed a cert chain, use it first */
                if (ctx->check_issued(ctx, x,x)) break;
 
                /* If we were passed a cert chain, use it first */
@@ -242,7 +240,6 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
 
        i=sk_X509_num(ctx->chain);
        x=sk_X509_value(ctx->chain,i-1);
 
        i=sk_X509_num(ctx->chain);
        x=sk_X509_value(ctx->chain,i-1);
-       xn = X509_get_subject_name(x);
        if (ctx->check_issued(ctx, x, x))
                {
                /* we have a self signed certificate */
        if (ctx->check_issued(ctx, x, x))
                {
                /* we have a self signed certificate */
@@ -291,7 +288,6 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
                if (depth < num) break;
 
                /* If we are self signed, we break */
                if (depth < num) break;
 
                /* If we are self signed, we break */
-               xn=X509_get_issuer_name(x);
                if (ctx->check_issued(ctx,x,x)) break;
 
                ok = ctx->get_issuer(&xtmp, ctx, x);
                if (ctx->check_issued(ctx,x,x)) break;
 
                ok = ctx->get_issuer(&xtmp, ctx, x);
@@ -310,7 +306,6 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
                }
 
        /* we now have our chain, lets check it... */
                }
 
        /* we now have our chain, lets check it... */
-       xn=X509_get_issuer_name(x);
 
        /* Is last certificate looked up self signed? */
        if (!ctx->check_issued(ctx,x,x))
 
        /* Is last certificate looked up self signed? */
        if (!ctx->check_issued(ctx,x,x))