external/boringssl: Sync to aa2485.
This includes the following changes:
https://boringssl.googlesource.com/boringssl/+log/171b5403ee767fa0f3aecd377867db6533c3eb8f..aa24851515d6280aa1d6a8b1548fe74691df3136
Bug: 29744850
Change-Id: Id4e4a9e7a19c2f0badbaead2c39a51037ba182ed
diff --git a/src/include/openssl/dsa.h b/src/include/openssl/dsa.h
index 0077a72..1e1ff65 100644
--- a/src/include/openssl/dsa.h
+++ b/src/include/openssl/dsa.h
@@ -84,10 +84,24 @@
* reference count drops to zero. */
OPENSSL_EXPORT void DSA_free(DSA *dsa);
-/* DSA_up_ref increments the reference count of |dsa|. */
+/* DSA_up_ref increments the reference count of |dsa| and returns one. */
OPENSSL_EXPORT int DSA_up_ref(DSA *dsa);
+/* Properties. */
+
+/* DSA_get0_key sets |*out_pub_key| and |*out_priv_key|, if non-NULL, to |dsa|'s
+ * public and private key, respectively. If |dsa| is a public key, the private
+ * key will be set to NULL. */
+OPENSSL_EXPORT void DSA_get0_key(const DSA *dsa, const BIGNUM **out_pub_key,
+ const BIGNUM **out_priv_key);
+
+/* DSA_get0_pqg sets |*out_p|, |*out_q|, and |*out_g|, if non-NULL, to |dsa|'s
+ * p, q, and g parameters, respectively. */
+OPENSSL_EXPORT void DSA_get0_pqg(const DSA *dsa, const BIGNUM **out_p,
+ const BIGNUM **out_q, const BIGNUM **out_g);
+
+
/* Parameter generation. */
/* DSA_generate_parameters_ex generates a set of DSA parameters by following
@@ -129,9 +143,9 @@
/* Signatures. */
/* DSA_SIG_st (aka |DSA_SIG|) contains a DSA signature as a pair of integers. */
-typedef struct DSA_SIG_st {
+struct DSA_SIG_st {
BIGNUM *r, *s;
-} DSA_SIG;
+};
/* DSA_SIG_new returns a freshly allocated, DIG_SIG structure or NULL on error.
* Both |r| and |s| in the signature will be NULL. */
@@ -387,8 +401,9 @@
int flags;
/* Normally used to cache montgomery values */
- CRYPTO_MUTEX method_mont_p_lock;
+ CRYPTO_MUTEX method_mont_lock;
BN_MONT_CTX *method_mont_p;
+ BN_MONT_CTX *method_mont_q;
CRYPTO_refcount_t references;
CRYPTO_EX_DATA ex_data;
};