diff options
| author | tb <> | 2023-07-24 16:25:02 +0000 |
|---|---|---|
| committer | tb <> | 2023-07-24 16:25:02 +0000 |
| commit | 9f7733330e5ae03e5cb940264dcc27416967ad60 (patch) | |
| tree | dd0aea1c735e875b58bd8019f135bd5acca79541 | |
| parent | 5de20ae51daf331d14b7a3a5c84bb087bfce99cf (diff) | |
| download | openbsd-9f7733330e5ae03e5cb940264dcc27416967ad60.tar.gz openbsd-9f7733330e5ae03e5cb940264dcc27416967ad60.tar.bz2 openbsd-9f7733330e5ae03e5cb940264dcc27416967ad60.zip | |
Fix a minibug in DH_check()
Or in the flag, don't overwrite the already set ones.
ok jsing
| -rw-r--r-- | src/lib/libcrypto/dh/dh_check.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/dh/dh_check.c b/src/lib/libcrypto/dh/dh_check.c index f3d89f620a..be79c2a04b 100644 --- a/src/lib/libcrypto/dh/dh_check.c +++ b/src/lib/libcrypto/dh/dh_check.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dh_check.c,v 1.27 2023/07/08 15:29:03 beck Exp $ */ | 1 | /* $OpenBSD: dh_check.c,v 1.28 2023/07/24 16:25:02 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -289,7 +289,7 @@ DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *flags) | |||
| 289 | if (!BN_mod_exp_ct(residue, pub_key, dh->q, dh->p, ctx)) | 289 | if (!BN_mod_exp_ct(residue, pub_key, dh->q, dh->p, ctx)) |
| 290 | goto err; | 290 | goto err; |
| 291 | if (!BN_is_one(residue)) | 291 | if (!BN_is_one(residue)) |
| 292 | *flags = DH_CHECK_PUBKEY_INVALID; | 292 | *flags |= DH_CHECK_PUBKEY_INVALID; |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | ok = 1; | 295 | ok = 1; |
