aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssl/freebsd
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/freebsd')
-rw-r--r--crypto/openssl/freebsd/dump_version_from_configdata.pl21
-rw-r--r--crypto/openssl/freebsd/include/crypto/bn_conf.h27
-rw-r--r--crypto/openssl/freebsd/include/openssl/configuration.h38
3 files changed, 86 insertions, 0 deletions
diff --git a/crypto/openssl/freebsd/dump_version_from_configdata.pl b/crypto/openssl/freebsd/dump_version_from_configdata.pl
new file mode 100644
index 000000000000..b6137718ba54
--- /dev/null
+++ b/crypto/openssl/freebsd/dump_version_from_configdata.pl
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+#
+# This dumps out the values needed to generate manpages and other artifacts
+# which include the release version/date.
+#
+# See also: `secure/lib/libcrypto/Makefile.version`.
+
+use Cwd qw(realpath);
+use File::Basename qw(dirname);
+use Time::Piece;
+
+use lib dirname(dirname(realpath($0)));
+
+use configdata qw(%config);
+
+$OPENSSL_DATE = Time::Piece->strptime($config{"release_date"}, "%d %b %Y")->strftime("%Y-%m-%d");
+
+$OPENSSL_VER = "$config{'major'}.$config{'minor'}.$config{'patch'}";
+
+print("OPENSSL_VER=\t${OPENSSL_VER}\n");
+print("OPENSSL_DATE=\t${OPENSSL_DATE}\n");
diff --git a/crypto/openssl/freebsd/include/crypto/bn_conf.h b/crypto/openssl/freebsd/include/crypto/bn_conf.h
new file mode 100644
index 000000000000..442931b63339
--- /dev/null
+++ b/crypto/openssl/freebsd/include/crypto/bn_conf.h
@@ -0,0 +1,27 @@
+
+/**
+ * OpenSSL's Configure script generates these values automatically for the host
+ * architecture, but FreeBSD provides values which are universal for all
+ * supported target architectures.
+ */
+
+#ifndef __FREEBSD_BN_CONF_H__
+#define __FREEBSD_BN_CONF_H__
+
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# undef THIRTY_TWO_BIT
+
+# if __SIZEOF_LONG__ == 8
+# define SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# undef THIRTY_TWO_BIT
+# elif __SIZEOF_LONG__ == 4
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# define THIRTY_TWO_BIT
+# else
+# error Unsupported size of long
+# endif
+
+#endif /* __FREEBSD_BN_CONF_H__ */
diff --git a/crypto/openssl/freebsd/include/openssl/configuration.h b/crypto/openssl/freebsd/include/openssl/configuration.h
new file mode 100644
index 000000000000..faea78cb32c8
--- /dev/null
+++ b/crypto/openssl/freebsd/include/openssl/configuration.h
@@ -0,0 +1,38 @@
+
+/**
+ * OpenSSL's Configure script generates these values automatically for the host
+ * architecture, but FreeBSD provides values which are universal for all
+ * supported target architectures.
+ */
+
+#ifndef __FREEBSD_CONFIGURATION_H__
+#define __FREEBSD_CONFIGURATION_H__
+
+# undef OPENSSL_NO_EC_NISTP_64_GCC_128
+# if __SIZEOF_LONG__ == 4 || __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
+# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
+# define OPENSSL_NO_EC_NISTP_64_GCC_128
+# endif
+# endif
+
+# undef BN_LLONG
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# undef THIRTY_TWO_BIT
+# if !defined(OPENSSL_SYS_UEFI)
+# if __SIZEOF_LONG__ == 8
+# undef BN_LLONG
+# define SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# undef THIRTY_TWO_BIT
+# elif __SIZEOF_LONG__ == 4
+# define BN_LLONG
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# define THIRTY_TWO_BIT
+# else
+# error Unsupported size of long
+# endif
+# endif
+
+#endif /* __FREEBSD_CONFIGURATION_H__ */