Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for compile issues on Mac OS 14 (ARM) #231

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gsi_openssh/source/channels.c
Original file line number Diff line number Diff line change
Expand Up @@ -5024,7 +5024,7 @@ x11_create_display_inet(struct ssh *ssh, int x11_display_offset,
if ((errno != EINVAL) && (errno != EAFNOSUPPORT)
#ifdef EPFNOSUPPORT
&& (errno != EPFNOSUPPORT)
#endif
#endif
) {
error("socket: %.100s", strerror(errno));
freeaddrinfo(aitop);
Expand Down Expand Up @@ -5196,7 +5196,7 @@ x11_connect_display(struct ssh *ssh)
debug("x11_connect_display: $DISPLAY is launchd");

/* Create a socket. */
sock = connect_local_xsocket_path(path);
sock = connect_local_xsocket_path(path, sizeof(path));
if (sock < 0)
return -1;

Expand Down
1 change: 0 additions & 1 deletion gsi_openssh/source/dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

#include <openssl/bn.h>
#include <openssl/dh.h>
#include <openssl/fips.h>
#include <openssl/evp.h>
# if OPENSSL_VERSION_NUMBER >= 0x30000000L
#include <openssl/core_names.h>
Expand Down
9 changes: 6 additions & 3 deletions gsi_openssh/source/fips_mode_replacement.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* Copyright 2021- Grid Community Forum
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -17,6 +17,7 @@
#ifndef FIPS_MODE_REPLACEMENT_H
#define FIPS_MODE_REPLACEMENT_H


#if OPENSSL_VERSION_NUMBER >= 0x30000000L
/*
* OpenSSL versions 3.0 and up no longer have FIPS_mode(). To support both
Expand All @@ -26,6 +27,8 @@
# ifndef FIPS_mode
# define FIPS_mode() EVP_default_properties_is_fips_enabled(NULL)
# endif /* FIPS_mode */
#elif /* openssl */
#include <openssl/fips.h>
#endif /* openssl */

#endif /* FIPS_MODE_REPLACEMENT_H */
3 changes: 1 addition & 2 deletions gsi_openssh/source/kex.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

#ifdef WITH_OPENSSL
#include <openssl/crypto.h>
#include <openssl/fips.h>
#include <openssl/dh.h>
# ifdef HAVE_EVP_KDF_CTX_NEW_ID
# include <openssl/kdf.h>
Expand Down Expand Up @@ -1724,7 +1723,7 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms,

#ifdef WITH_OPENSSL
# if OPENSSL_VERSION_NUMBER >= 0x30000000L
/*
/*
* Creates an EVP_PKEY from the given parameters and keys.
* The private key can be omitted.
*/
Expand Down
1 change: 0 additions & 1 deletion gsi_openssh/source/kexgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <openssl/fips.h>

#include "fips_mode_replacement.h"

Expand Down
1 change: 0 additions & 1 deletion gsi_openssh/source/kexgexc.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#ifdef WITH_OPENSSL

#include <openssl/fips.h>
#include <sys/types.h>

#include <openssl/dh.h>
Expand Down
1 change: 0 additions & 1 deletion gsi_openssh/source/readconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <string.h>
#include <stdarg.h>
#include <unistd.h>
#include <openssl/fips.h>
#ifdef USE_SYSTEM_GLOB
# include <glob.h>
#else
Expand Down
1 change: 0 additions & 1 deletion gsi_openssh/source/servconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <limits.h>
#include <stdarg.h>
#include <errno.h>
#include <openssl/fips.h>
#ifdef HAVE_UTIL_H
#include <util.h>
#endif
Expand Down
6 changes: 5 additions & 1 deletion gsi_openssh/source/ssh-ecdsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@

#include "openbsd-compat/openssl-compat.h"

#ifdef ENABLE_PKCS11
#include "ssh-pkcs11.h"
#endif

static u_int
ssh_ecdsa_size(const struct sshkey *key)
{
Expand Down Expand Up @@ -597,7 +601,7 @@ ssh_create_evp_ec(EC_KEY *k, int ecdsa_nid, EVP_PKEY **pkey)
OSSL_PARAM_BLD *param_bld = NULL;
EVP_PKEY_CTX *ctx = NULL;
BN_CTX *bn_ctx = NULL;
uint8_t *pub_ser = NULL;
uint8_t *pub_ser = NULL;
const char *group_name;
const EC_POINT *pub = NULL;
const BIGNUM *priv = NULL;
Expand Down
1 change: 0 additions & 1 deletion gsi_openssh/source/ssh-ed25519.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include <string.h>
#include <stdarg.h>
#include <openssl/fips.h>

#include "fips_mode_replacement.h"

Expand Down
1 change: 0 additions & 1 deletion gsi_openssh/source/ssh-keygen.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#ifdef WITH_OPENSSL
#include <openssl/evp.h>
#include <openssl/fips.h>
#include <openssl/pem.h>
#include "openbsd-compat/openssl-compat.h"
#endif
Expand Down
5 changes: 4 additions & 1 deletion gsi_openssh/source/ssh-rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <openssl/core_names.h>
#include <openssl/param_build.h>
# endif
#include <openssl/fips.h>

#include "fips_mode_replacement.h"

Expand All @@ -43,6 +42,10 @@

#include "openbsd-compat/openssl-compat.h"

#ifdef ENABLE_PKCS11
#include "ssh-pkcs11.h"
#endif

# if OPENSSL_VERSION_NUMBER >= 0x30000000L
static int openssh_RSA_verify(int, const u_char *, size_t, u_char *, size_t, EVP_PKEY *);
# else
Expand Down
1 change: 0 additions & 1 deletion gsi_openssh/source/ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
#include <openssl/evp.h>
#include <openssl/err.h>
#endif
#include <openssl/fips.h>
#include "openbsd-compat/openssl-compat.h"
#include "openbsd-compat/sys-queue.h"
#include "fips_mode_replacement.h"
Expand Down
1 change: 0 additions & 1 deletion gsi_openssh/source/sshconnect2.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <vis.h>
#endif

#include <openssl/fips.h>
#include "fips_mode_replacement.h"

#include "openbsd-compat/sys-queue.h"
Expand Down
1 change: 0 additions & 1 deletion gsi_openssh/source/sshd.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
#include <openssl/dh.h>
#include <openssl/bn.h>
#include <openssl/rand.h>
#include <openssl/fips.h>
#include "openbsd-compat/openssl-compat.h"
#endif
#include "fips_mode_replacement.h"
Expand Down
1 change: 0 additions & 1 deletion gsi_openssh/source/sshkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <openssl/core_names.h>
#include <openssl/param_build.h>
# endif
#include <openssl/fips.h>
#endif
#include "fips_mode_replacement.h"

Expand Down