fix warning
authorDr. Stephen Henson <steve@openssl.org>
Tue, 10 Jan 2012 14:37:00 +0000 (14:37 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 10 Jan 2012 14:37:00 +0000 (14:37 +0000)
crypto/ecdsa/ecdsatest.c

index 54d775ad45e8391ab02738bc16be0733cb719578..1ad507d471726dc055525aea430684919f6cf38c 100644 (file)
@@ -289,7 +289,8 @@ int test_builtin(BIO *out)
        ECDSA_SIG       *ecdsa_sig = NULL;
        unsigned char   digest[20], wrong_digest[20];
        unsigned char   *signature = NULL;
-       unsigned char   *sig_ptr;
+       const unsigned char     *sig_ptr;
+       unsigned char   *sig_ptr2;
        unsigned char   *raw_buf = NULL;
        unsigned int    sig_len, degree, r_len, s_len, bn_len, buf_len;
        int             nid, ret =  0;
@@ -464,8 +465,8 @@ int test_builtin(BIO *out)
                        (BN_bin2bn(raw_buf + bn_len, bn_len, ecdsa_sig->s) == NULL))
                        goto builtin_err;
 
-               sig_ptr = signature;
-               sig_len = i2d_ECDSA_SIG(ecdsa_sig, &sig_ptr);
+               sig_ptr2 = signature;
+               sig_len = i2d_ECDSA_SIG(ecdsa_sig, &sig_ptr2);
                if (ECDSA_verify(0, digest, 20, signature, sig_len, eckey) == 1)
                        {
                        BIO_printf(out, " failed\n");
@@ -477,8 +478,8 @@ int test_builtin(BIO *out)
                        (BN_bin2bn(raw_buf + bn_len, bn_len, ecdsa_sig->s) == NULL))
                        goto builtin_err;
 
-               sig_ptr = signature;
-               sig_len = i2d_ECDSA_SIG(ecdsa_sig, &sig_ptr);
+               sig_ptr2 = signature;
+               sig_len = i2d_ECDSA_SIG(ecdsa_sig, &sig_ptr2);
                if (ECDSA_verify(0, digest, 20, signature, sig_len, eckey) != 1)
                        {
                        BIO_printf(out, " failed\n");