Skip to content

Commit a9cbe10

Browse files
committed
upstream: include openssl/bn.h explicitly in files where we use BN_*
makes things simpler for portable; from Mike Frysinger OpenBSD-Commit-ID: 717e93403fd1108e175afd7451b5a4ab46a598fe
1 parent 3957cc2 commit a9cbe10

File tree

9 files changed

+22
-15
lines changed

9 files changed

+22
-15
lines changed

kexdh.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: kexdh.c,v 1.34 2020/12/04 02:29:25 djm Exp $ */
1+
/* $OpenBSD: kexdh.c,v 1.35 2025/10/03 00:08:02 djm Exp $ */
22
/*
33
* Copyright (c) 2019 Markus Friedl. All rights reserved.
44
*
@@ -34,6 +34,7 @@
3434
#include <signal.h>
3535

3636
#include "openbsd-compat/openssl-compat.h"
37+
#include <openssl/bn.h>
3738
#include <openssl/dh.h>
3839

3940
#include "sshkey.h"

kexecdh.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: kexecdh.c,v 1.10 2019/01/21 10:40:11 djm Exp $ */
1+
/* $OpenBSD: kexecdh.c,v 1.11 2025/10/03 00:08:02 djm Exp $ */
22
/*
33
* Copyright (c) 2010 Damien Miller. All rights reserved.
44
* Copyright (c) 2019 Markus Friedl. All rights reserved.
@@ -34,6 +34,7 @@
3434
#include <string.h>
3535
#include <signal.h>
3636

37+
#include <openssl/bn.h>
3738
#include <openssl/ecdh.h>
3839

3940
#include "sshkey.h"

kexgexc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: kexgexc.c,v 1.38 2021/12/19 22:08:06 djm Exp $ */
1+
/* $OpenBSD: kexgexc.c,v 1.39 2025/10/03 00:08:02 djm Exp $ */
22
/*
33
* Copyright (c) 2000 Niels Provos. All rights reserved.
44
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -30,15 +30,15 @@
3030

3131
#include <sys/types.h>
3232

33+
#include "openbsd-compat/openssl-compat.h"
34+
#include <openssl/bn.h>
3335
#include <openssl/dh.h>
3436

3537
#include <stdarg.h>
3638
#include <stdio.h>
3739
#include <string.h>
3840
#include <signal.h>
3941

40-
#include "openbsd-compat/openssl-compat.h"
41-
4242
#include "sshkey.h"
4343
#include "cipher.h"
4444
#include "digest.h"

kexgexs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: kexgexs.c,v 1.47 2024/05/17 00:30:23 djm Exp $ */
1+
/* $OpenBSD: kexgexs.c,v 1.48 2025/10/03 00:08:02 djm Exp $ */
22
/*
33
* Copyright (c) 2000 Niels Provos. All rights reserved.
44
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -34,9 +34,9 @@
3434
#include <string.h>
3535
#include <signal.h>
3636

37-
#include <openssl/dh.h>
38-
3937
#include "openbsd-compat/openssl-compat.h"
38+
#include <openssl/bn.h>
39+
#include <openssl/dh.h>
4040

4141
#include "sshkey.h"
4242
#include "cipher.h"

openbsd-compat/openssl-compat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <openssl/opensslv.h>
2424
#include <openssl/crypto.h>
2525
#include <openssl/evp.h>
26+
#include <openssl/bn.h>
2627
#include <openssl/rsa.h>
2728
#ifdef OPENSSL_HAS_ECC
2829
#include <openssl/ecdsa.h>

ssh-keygen.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: ssh-keygen.c,v 1.484 2025/09/25 12:52:21 jsg Exp $ */
1+
/* $OpenBSD: ssh-keygen.c,v 1.485 2025/10/03 00:08:02 djm Exp $ */
22
/*
33
* Author: Tatu Ylonen <[email protected]>
44
* Copyright (c) 1994 Tatu Ylonen <[email protected]>, Espoo, Finland
@@ -19,9 +19,10 @@
1919
#include <sys/stat.h>
2020

2121
#ifdef WITH_OPENSSL
22+
#include "openbsd-compat/openssl-compat.h"
23+
#include <openssl/bn.h>
2224
#include <openssl/evp.h>
2325
#include <openssl/pem.h>
24-
#include "openbsd-compat/openssl-compat.h"
2526
#endif
2627

2728
#include <stdint.h>

ssh-pkcs11.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: ssh-pkcs11.c,v 1.71 2025/09/25 06:23:19 jsg Exp $ */
1+
/* $OpenBSD: ssh-pkcs11.c,v 1.72 2025/10/03 00:08:02 djm Exp $ */
22
/*
33
* Copyright (c) 2010 Markus Friedl. All rights reserved.
44
* Copyright (c) 2014 Pedro Martelletto. All rights reserved.
@@ -34,6 +34,8 @@
3434
#include "openbsd-compat/openssl-compat.h"
3535

3636
#ifdef WITH_OPENSSL
37+
#include "openbsd-compat/openssl-compat.h"
38+
#include <openssl/bn.h>
3739
#include <openssl/ecdsa.h>
3840
#include <openssl/x509.h>
3941
#include <openssl/err.h>

ssh-rsa.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: ssh-rsa.c,v 1.81 2025/07/24 05:44:55 djm Exp $ */
1+
/* $OpenBSD: ssh-rsa.c,v 1.82 2025/10/03 00:08:02 djm Exp $ */
22
/*
33
* Copyright (c) 2000, 2003 Markus Friedl <[email protected]>
44
*
@@ -21,6 +21,8 @@
2121

2222
#include <sys/types.h>
2323

24+
#include "openbsd-compat/openssl-compat.h"
25+
#include <openssl/bn.h>
2426
#include <openssl/evp.h>
2527
#include <openssl/err.h>
2628

@@ -34,8 +36,6 @@
3436
#include "digest.h"
3537
#include "log.h"
3638

37-
#include "openbsd-compat/openssl-compat.h"
38-
3939
static u_int
4040
ssh_rsa_size(const struct sshkey *k)
4141
{

sshkey.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: sshkey.c,v 1.154 2025/09/05 10:23:55 dtucker Exp $ */
1+
/* $OpenBSD: sshkey.c,v 1.155 2025/10/03 00:08:02 djm Exp $ */
22
/*
33
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
44
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
@@ -32,6 +32,7 @@
3232
#include <netinet/in.h>
3333

3434
#ifdef WITH_OPENSSL
35+
#include <openssl/bn.h>
3536
#include <openssl/evp.h>
3637
#include <openssl/err.h>
3738
#include <openssl/pem.h>

0 commit comments

Comments
 (0)