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

OPENSSL_cpuid_setup FreeBSD arm update. #13650

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions crypto/armcap.c
Expand Up @@ -71,6 +71,23 @@ void OPENSSL_cpuid_setup(void) __attribute__ ((constructor));
# define OSSL_IMPLEMENT_GETAUXVAL
# endif
# endif
# if defined(__FreeBSD__)
# include <sys/param.h>
# if __FreeBSD_version >= 1200000
# include <sys/auxv.h>
# define OSSL_IMPLEMENT_GETAUXVAL

static unsigned long getauxval(unsigned long key)
{
unsigned long val = 0ul;

if (elf_aux_info((int)key, &val, sizeof(val)) != 0)
kaduk marked this conversation as resolved.
Show resolved Hide resolved
return 0ul;

return val;
}
# endif
# endif

/*
* ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas
Expand Down