diff options
Diffstat (limited to 'src/lib/libcrypto/ecdh/ech_ossl.c')
-rw-r--r-- | src/lib/libcrypto/ecdh/ech_ossl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_ossl.c b/src/lib/libcrypto/ecdh/ech_ossl.c index ee130edeee..4fae7cacfd 100644 --- a/src/lib/libcrypto/ecdh/ech_ossl.c +++ b/src/lib/libcrypto/ecdh/ech_ossl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ech_ossl.c,v 1.8 2014/07/12 16:03:37 miod Exp $ */ | 1 | /* $OpenBSD: ech_ossl.c,v 1.9 2015/02/09 15:49:22 jsing Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
4 | * | 4 | * |
@@ -120,8 +120,10 @@ static int ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, | |||
120 | 120 | ||
121 | if ((ctx = BN_CTX_new()) == NULL) goto err; | 121 | if ((ctx = BN_CTX_new()) == NULL) goto err; |
122 | BN_CTX_start(ctx); | 122 | BN_CTX_start(ctx); |
123 | x = BN_CTX_get(ctx); | 123 | if ((x = BN_CTX_get(ctx)) == NULL) |
124 | y = BN_CTX_get(ctx); | 124 | goto err; |
125 | if ((y = BN_CTX_get(ctx)) == NULL) | ||
126 | goto err; | ||
125 | 127 | ||
126 | priv_key = EC_KEY_get0_private_key(ecdh); | 128 | priv_key = EC_KEY_get0_private_key(ecdh); |
127 | if (priv_key == NULL) | 129 | if (priv_key == NULL) |