summaryrefslogtreecommitdiffstats
path: root/lib/libssl
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-07-11 13:26:31 +0000
committermiod <miod@openbsd.org>2014-07-11 13:26:31 +0000
commit92c594c9b88b43546e7d10ffb4c9e33b465df16f (patch)
tree28b0aa6f1951930835fd6e43d7d7016b3e9a4d68 /lib/libssl
parentAccept CCS again after `finished' has been sent by the client; at this point (diff)
downloadwireguard-openbsd-92c594c9b88b43546e7d10ffb4c9e33b465df16f.tar.xz
wireguard-openbsd-92c594c9b88b43546e7d10ffb4c9e33b465df16f.zip
Make sure BN_sqr never returns negative numbers.
OpenSSL PR #3400 via OpenSSL trunk.
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/src/crypto/bn/bn_sqr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libssl/src/crypto/bn/bn_sqr.c b/lib/libssl/src/crypto/bn/bn_sqr.c
index d4a9f460403..5ea9fb083d6 100644
--- a/lib/libssl/src/crypto/bn/bn_sqr.c
+++ b/lib/libssl/src/crypto/bn/bn_sqr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bn_sqr.c,v 1.10 2014/07/11 08:44:48 jsing Exp $ */
+/* $OpenBSD: bn_sqr.c,v 1.11 2014/07/11 13:26:31 miod Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -78,6 +78,7 @@ BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
al = a->top;
if (al <= 0) {
r->top = 0;
+ r->neg = 0;
return 1;
}