Reorder the setter arguments to more consistently match that of other APIs,
authorTJ Saunders <tj@castaglia.org>
Thu, 9 Jun 2016 21:52:04 +0000 (14:52 -0700)
committerRich Salz <rsalz@openssl.org>
Mon, 13 Jun 2016 19:44:49 +0000 (15:44 -0400)
per review comments.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1193)

crypto/dsa/dsa_asn1.c
crypto/ec/ec_asn1.c
doc/crypto/DSA_SIG_new.pod
doc/crypto/ECDSA_SIG_new.pod

index b19bfaff509a2690d72144a7e0e550ce1671c323..f2818f3ab6c36b7318d6bfc9607beaf5cc4e672f 100644 (file)
@@ -32,7 +32,7 @@ void DSA_SIG_get0(BIGNUM **pr, BIGNUM **ps, const DSA_SIG *sig)
     *ps = sig->s;
 }
 
-int DSA_SIG_set0(BIGNUM *r, BIGNUM *s, DSA_SIG *sig)
+int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
 {
     BN_clear_free(sig->r);
     BN_clear_free(sig->s);
index 89cc67d8aa596a7f91b1f94c14c6a4408168c149..9bc4ca7b27125a804f4edde545e189e940e2682b 100644 (file)
@@ -1180,7 +1180,7 @@ void ECDSA_SIG_get0(BIGNUM **pr, BIGNUM **ps, const ECDSA_SIG *sig)
         *ps = sig->s;
 }
 
-int ECDSA_SIG_set0(BIGNUM *r, BIGNUM *s, ECDSA_SIG *sig)
+int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
 {
     BN_clear_free(sig->r);
     BN_clear_free(sig->s);
index 68694f078a25c3bc7c5ea2b763d46f407af63691..345c02c56d94bc8261d9348bfbbeb73cc0429634 100644 (file)
@@ -11,7 +11,7 @@ DSA_SIG_new, DSA_SIG_free - allocate and free DSA signature objects
  DSA_SIG *DSA_SIG_new(void);
  void DSA_SIG_free(DSA_SIG *a);
  void DSA_SIG_get0(BIGNUM **pr, BIGNUM **ps, const DSA_SIG *sig);
- int DSA_SIG_set0(BIGNUM *r, BIGNUM *s, DSA_SIG *sig);
+ int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
 
 =head1 DESCRIPTION
 
index fbcf6ee2351f19ab513170f989e8e4b725375434..d3e181dbc4f91d6cf6c998654e6b86625aea9622 100644 (file)
@@ -14,7 +14,7 @@ algorithm (ECDSA) functions
  ECDSA_SIG *ECDSA_SIG_new(void);
  void ECDSA_SIG_free(ECDSA_SIG *sig);
  void ECDSA_SIG_get0(BIGNUM **pr, BIGNUM **ps, const ECDSA_SIG *sig);
- int ECDSA_SIG_set0(BIGNUM *r, BIGNUM *s, ECDSA_SIG *sig);
+ int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
  int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
  ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);
  int ECDSA_size(const EC_KEY *eckey);