]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix some warnings.
authorDr. Stephen Henson <steve@openssl.org>
Sun, 16 Mar 2008 20:59:10 +0000 (20:59 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 16 Mar 2008 20:59:10 +0000 (20:59 +0000)
apps/ca.c
apps/cms.c
crypto/asn1/a_type.c
crypto/cms/cms_asn1.c
crypto/hmac/hm_pmeth.c

index 291f16487a0f40e0d6e56e5aefd7e402d9a25a6a..b6d871dcb9bb4b2a32226f105793148fdfe04e5b 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -226,7 +226,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
 static int do_revoke(X509 *x509, CA_DB *db, int ext, char *extval);
 static int get_certificate_status(const char *ser_status, CA_DB *db);
 static int do_updatedb(CA_DB *db);
-static int check_time_format(char *str);
+static int check_time_format(const char *str);
 char *make_revocation_str(int rev_type, char *rev_arg);
 int make_revoked(X509_REVOKED *rev, const char *str);
 int old_entry_print(BIO *bp, ASN1_OBJECT *obj, ASN1_STRING *str);
@@ -2384,7 +2384,7 @@ static int fix_data(int nid, int *type)
        return(1);
        }
 
-static int check_time_format(char *str)
+static int check_time_format(const char *str)
        {
        ASN1_UTCTIME tm;
 
index b757908070851d197fe90735525c9b8f7bb45f06..eb54a0d6237c2a639e29c0fe762eb7e9fc035242 100644 (file)
@@ -124,7 +124,7 @@ int MAIN(int argc, char **argv)
        char *engine=NULL;
 #endif
        unsigned char *secret_key = NULL;
-       size_t secret_keylen;
+       size_t secret_keylen = 0;
 
        X509_VERIFY_PARAM *vpm = NULL;
 
index 90f14241e757f9ff52f12c2f66ed065c753039a5..a45d2f9d12ddbc52088b2c3fa2ab260695417965 100644 (file)
@@ -87,7 +87,8 @@ int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value)
        {
        if (!value || (type == V_ASN1_BOOLEAN))
                {
-               ASN1_TYPE_set(a, type, (void *)value);
+               void *p = (void *)value;
+               ASN1_TYPE_set(a, type, p);
                }
        else if (type == V_ASN1_OBJECT)
                {
index b9521c9a5af44cd487fa0833932454a6684828a1..d6363deb377e55bfeb6ca6335d1dc5f1b85067a1 100644 (file)
@@ -309,6 +309,8 @@ static int cms_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
        CMS_ContentInfo *cms;
        if (pval)
                cms = (CMS_ContentInfo *)*pval;
+       else
+               return 1;
        switch(operation)
                {
 
index 6355a44413e6eaf9c23bc6777631e622f1de352c..b5e455733bf02b82dcc8413564ed5c5caaba8c46 100644 (file)
@@ -206,8 +206,9 @@ static int pkey_hmac_ctrl_str(EVP_PKEY_CTX *ctx,
                }
        if (!strcmp(type, "key"))
                {
+               void *p = (void *)value;
                return pkey_hmac_ctrl(ctx, EVP_PKEY_CTRL_SET_MAC_KEY,
-                               -1, (void *)value);
+                               -1, p);
                }
        if (!strcmp(type, "hexkey"))
                {