Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
From 28c65fd9dff2f30438b98f0b71f387468259a2c3 Mon Sep 17 00:00:00 2001
|
||||
From: Aleksandr Makarov <aleksandr.o.makarov@gmail.com>
|
||||
Date: Fri, 12 Jul 2024 21:07:10 +0300
|
||||
Subject: [PATCH] =?UTF-8?q?package/libest:=20fix=20error:=20implicit?=
|
||||
=?UTF-8?q?=20declaration=20of=20function=20=E2=80=98ERR=5Ferror=5Fstring?=
|
||||
=?UTF-8?q?=E2=80=99?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Added necessary header includes to fix 'implicit declaration' errors which occur when
|
||||
using -Wimplicit-function-declaration flag.
|
||||
|
||||
Upstream: https://github.com/cisco/libest/pull/132
|
||||
Signed-off-by: Aleksandr Makarov <aleksandr.o.makarov@gmail.com>
|
||||
---
|
||||
src/est/est.c | 4 +++-
|
||||
src/est/est_client.c | 1 +
|
||||
src/est/est_server_http.c | 2 ++
|
||||
3 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/est/est.c b/src/est/est.c
|
||||
index 8a65f87..24474c0 100644
|
||||
--- a/src/est/est.c
|
||||
+++ b/src/est/est.c
|
||||
@@ -42,7 +42,9 @@
|
||||
#include <DbgHelp.h>
|
||||
#endif /* DISABLE_BACKTRACE*/
|
||||
#endif /* WIN32*/
|
||||
-
|
||||
+#include <openssl/err.h>
|
||||
+#include <openssl/ssl.h>
|
||||
+#include <openssl/rand.h>
|
||||
#ifndef ENABLE_CLIENT_ONLY
|
||||
static char hex_chpw[] = {0x06, 0x09, 0x2A, 0x86, 0x48, 0x86,
|
||||
0xF7, 0x0D, 0x01, 0x09, 0x07};
|
||||
diff --git a/src/est/est_client.c b/src/est/est_client.c
|
||||
index 8dff9d9..5c25d4f 100644
|
||||
--- a/src/est/est_client.c
|
||||
+++ b/src/est/est_client.c
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/cms.h>
|
||||
#include <openssl/rand.h>
|
||||
+#include <openssl/crypto.h>
|
||||
#include "est.h"
|
||||
#include "est_locl.h"
|
||||
#include "est_ossl_util.h"
|
||||
diff --git a/src/est/est_server_http.c b/src/est/est_server_http.c
|
||||
index 2bd08d5..ce1cece 100644
|
||||
--- a/src/est/est_server_http.c
|
||||
+++ b/src/est/est_server_http.c
|
||||
@@ -42,6 +42,8 @@
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/x509v3.h>
|
||||
+#include <openssl/crypto.h>
|
||||
+#include <openssl/rand.h>
|
||||
#if defined(_WIN32)
|
||||
#define _CRT_SECURE_NO_WARNINGS // Disable deprecation warning in VS2005
|
||||
#else
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
From ad5ce7ff1cae92c151dc6f350ef943106ddd852f Mon Sep 17 00:00:00 2001
|
||||
From: Aleksandr Makarov <aleksandr.o.makarov@gmail.com>
|
||||
Date: Fri, 12 Jul 2024 21:07:36 +0300
|
||||
Subject: [PATCH] package/libest: Add OpenSSL 3.0 compatibility
|
||||
|
||||
The functions `FIPS_mode` and `FIPS_mode_set` are deprecated in OpenSSL 3.0, replaced by
|
||||
`EVP_default_properties_is_fips_enabled` and `EVP_default_properties_enable_fips` respectively.
|
||||
|
||||
This commit introduces wrappers for these new EVP APIs to maintain compatibility with OpenSSL 3.0,
|
||||
while ensuring continued support for older versions of OpenSSL.
|
||||
|
||||
- Implemented `is_fips_enabled` wrapper around `EVP_default_properties_is_fips_enabled`
|
||||
- Implemented `enable_fips` wrapper around `EVP_default_properties_enable_fips`
|
||||
- Added conditional compilation to support both new and legacy OpenSSL versions
|
||||
|
||||
Upstream: https://github.com/cisco/libest/pull/132
|
||||
Signed-off-by: Aleksandr Makarov <aleksandr.o.makarov@gmail.com>
|
||||
---
|
||||
example/client-brski/estclient-brski.c | 2 +-
|
||||
example/client/estclient.c | 2 +-
|
||||
example/proxy/estproxy.c | 2 +-
|
||||
example/server/estserver.c | 2 +-
|
||||
java/jni/client.c | 2 +-
|
||||
src/est/est_client.c | 12 ++++++------
|
||||
src/est/est_ossl_util.c | 18 ++++++++++++++++++
|
||||
src/est/est_ossl_util.h | 2 ++
|
||||
src/est/est_server.c | 2 +-
|
||||
test/UT/US1864/us1864.c | 4 ++--
|
||||
10 files changed, 34 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/example/client-brski/estclient-brski.c b/example/client-brski/estclient-brski.c
|
||||
index 9e63af5..6e03052 100644
|
||||
--- a/example/client-brski/estclient-brski.c
|
||||
+++ b/example/client-brski/estclient-brski.c
|
||||
@@ -388,7 +388,7 @@ int main (int argc, char **argv)
|
||||
break;
|
||||
case 'f':
|
||||
/* Turn FIPS on if requested and exit if failure */
|
||||
- set_fips_return = FIPS_mode_set(1);
|
||||
+ set_fips_return = est_enable_fips(1);
|
||||
if (!set_fips_return) {
|
||||
printf("\nERROR setting FIPS MODE ON ...\n");
|
||||
ERR_load_crypto_strings();
|
||||
diff --git a/example/client/estclient.c b/example/client/estclient.c
|
||||
index a8a2d6f..75b1272 100644
|
||||
--- a/example/client/estclient.c
|
||||
+++ b/example/client/estclient.c
|
||||
@@ -1280,7 +1280,7 @@ int main (int argc, char **argv)
|
||||
break;
|
||||
case 'f':
|
||||
/* Turn FIPS on if requested and exit if failure */
|
||||
- set_fips_return = FIPS_mode_set(1);
|
||||
+ set_fips_return = est_enable_fips(1);
|
||||
if (!set_fips_return) {
|
||||
printf("\nERROR setting FIPS MODE ON ...\n");
|
||||
ERR_load_crypto_strings();
|
||||
diff --git a/example/proxy/estproxy.c b/example/proxy/estproxy.c
|
||||
index 114bd65..6dbdbda 100644
|
||||
--- a/example/proxy/estproxy.c
|
||||
+++ b/example/proxy/estproxy.c
|
||||
@@ -593,7 +593,7 @@ int main (int argc, char **argv)
|
||||
/*
|
||||
* Turn FIPS on if user requested it and exit if failure
|
||||
*/
|
||||
- set_fips_return = FIPS_mode_set(1);
|
||||
+ set_fips_return = est_enable_fips(1);
|
||||
if (set_fips_return != 1) {
|
||||
set_fips_error = ERR_get_error();
|
||||
printf("\nERROR WHILE SETTING FIPS MODE ON exiting ....\n");
|
||||
diff --git a/example/server/estserver.c b/example/server/estserver.c
|
||||
index 3539dc4..90886cf 100644
|
||||
--- a/example/server/estserver.c
|
||||
+++ b/example/server/estserver.c
|
||||
@@ -2285,7 +2285,7 @@ int main (int argc, char **argv)
|
||||
/* turn FIPS on if user requested it
|
||||
* and exit if failure.
|
||||
*/
|
||||
- set_fips_return = FIPS_mode_set(1);
|
||||
+ set_fips_return = est_enable_fips(1);
|
||||
if (set_fips_return != 1) {
|
||||
set_fips_error = ERR_get_error();
|
||||
printf("\nERROR WHILE SETTING FIPS MODE ON exiting ....\n");
|
||||
diff --git a/java/jni/client.c b/java/jni/client.c
|
||||
index c5bc28e..f58d5c0 100644
|
||||
--- a/java/jni/client.c
|
||||
+++ b/java/jni/client.c
|
||||
@@ -179,7 +179,7 @@ static int jni_est_client_X509_REQ_sign (X509_REQ *x, EVP_PKEY *pkey, const EVP_
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_com_cisco_c3m_est_ESTClient_enable_1fips(
|
||||
JNIEnv *env, jclass obj) {
|
||||
- if (!FIPS_mode() && !FIPS_mode_set(1)) {
|
||||
+ if (!est_is_fips_enabled() && !est_enable_fips(1)) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
return -1;
|
||||
} else {
|
||||
diff --git a/src/est/est_client.c b/src/est/est_client.c
|
||||
index 5c25d4f..63069af 100644
|
||||
--- a/src/est/est_client.c
|
||||
+++ b/src/est/est_client.c
|
||||
@@ -3183,7 +3183,7 @@ EST_ERROR est_client_enroll_internal (EST_CTX *ctx, char *cn, int *pkcs7_len, in
|
||||
* HTTPS digest mode requires the use of MD5. Make sure we're not
|
||||
* in FIPS mode and can use MD5
|
||||
*/
|
||||
- if (ctx->auth_mode == AUTH_DIGEST && (FIPS_mode())){
|
||||
+ if (ctx->auth_mode == AUTH_DIGEST && (est_is_fips_enabled())){
|
||||
EST_LOG_ERR("HTTP digest auth not allowed while in FIPS mode");
|
||||
rv = EST_ERR_BAD_MODE;
|
||||
goto err;
|
||||
@@ -3594,7 +3594,7 @@ EST_ERROR est_client_reenroll (EST_CTX *ctx, X509 *cert, int *pkcs7_len, EVP_PKE
|
||||
* HTTPS digest mode requires the use of MD5. Make sure we're not
|
||||
* in FIPS mode and can use MD5
|
||||
*/
|
||||
- if (ctx->auth_mode == AUTH_DIGEST && (FIPS_mode())){
|
||||
+ if (ctx->auth_mode == AUTH_DIGEST && (est_is_fips_enabled())){
|
||||
EST_LOG_ERR("HTTP digest auth not allowed while in FIPS mode");
|
||||
rv = EST_ERR_BAD_MODE;
|
||||
goto err;
|
||||
@@ -3680,7 +3680,7 @@ static EST_ERROR est_client_enroll_csr_internal (EST_CTX *ctx, X509_REQ *csr, in
|
||||
* HTTPS digest mode requires the use of MD5. Make sure we're not
|
||||
* in FIPS mode and can use MD5
|
||||
*/
|
||||
- if (ctx->auth_mode == AUTH_DIGEST && (FIPS_mode())){
|
||||
+ if (ctx->auth_mode == AUTH_DIGEST && (est_is_fips_enabled())){
|
||||
EST_LOG_ERR("HTTP digest auth not allowed while in FIPS mode");
|
||||
rv = EST_ERR_BAD_MODE;
|
||||
goto err;
|
||||
@@ -5872,7 +5872,7 @@ static EST_ERROR est_client_brski_send_get_voucher (EST_CTX *ctx, int *cacert_le
|
||||
* HTTPS digest mode requires the use of MD5. Make sure we're not
|
||||
* in FIPS mode and can use MD5
|
||||
*/
|
||||
- if (ctx->auth_mode == AUTH_DIGEST && (FIPS_mode())){
|
||||
+ if (ctx->auth_mode == AUTH_DIGEST && (est_is_fips_enabled())){
|
||||
EST_LOG_ERR("HTTP digest auth not allowed while in FIPS mode");
|
||||
rv = EST_ERR_BAD_MODE;
|
||||
goto err;
|
||||
@@ -6366,7 +6366,7 @@ EST_ERROR est_client_brski_send_voucher_status (EST_CTX *ctx, EST_BRSKI_STATUS_V
|
||||
* HTTPS digest mode requires the use of MD5. Make sure we're not
|
||||
* in FIPS mode and can use MD5
|
||||
*/
|
||||
- if (ctx->auth_mode == AUTH_DIGEST && (FIPS_mode())){
|
||||
+ if (ctx->auth_mode == AUTH_DIGEST && (est_is_fips_enabled())){
|
||||
EST_LOG_ERR("HTTP digest auth not allowed while in FIPS mode");
|
||||
rv = EST_ERR_BAD_MODE;
|
||||
goto err;
|
||||
@@ -6535,7 +6535,7 @@ EST_ERROR est_client_brski_send_enroll_status (EST_CTX *ctx, EST_BRSKI_STATUS_VA
|
||||
* HTTPS digest mode requires the use of MD5. Make sure we're not
|
||||
* in FIPS mode and can use MD5
|
||||
*/
|
||||
- if (ctx->auth_mode == AUTH_DIGEST && (FIPS_mode())){
|
||||
+ if (ctx->auth_mode == AUTH_DIGEST && (est_is_fips_enabled())){
|
||||
EST_LOG_ERR("HTTP digest auth not allowed while in FIPS mode");
|
||||
rv = EST_ERR_BAD_MODE;
|
||||
goto err;
|
||||
diff --git a/src/est/est_ossl_util.c b/src/est/est_ossl_util.c
|
||||
index daa54f2..0887daa 100644
|
||||
--- a/src/est/est_ossl_util.c
|
||||
+++ b/src/est/est_ossl_util.c
|
||||
@@ -500,3 +500,21 @@ char *est_find_ser_num_in_subj(X509 *cert)
|
||||
return(ser_num_str);
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+int est_is_fips_enabled()
|
||||
+{
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
+ return EVP_default_properties_is_fips_enabled(NULL);
|
||||
+#else
|
||||
+ return FIPS_mode();
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+int est_enable_fips(int enable)
|
||||
+{
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
+ return EVP_default_properties_enable_fips(NULL, enable);
|
||||
+#else
|
||||
+ return FIPS_mode_set(enable);
|
||||
+#endif
|
||||
+}
|
||||
diff --git a/src/est/est_ossl_util.h b/src/est/est_ossl_util.h
|
||||
index 68ad290..2389e45 100644
|
||||
--- a/src/est/est_ossl_util.h
|
||||
+++ b/src/est/est_ossl_util.h
|
||||
@@ -44,4 +44,6 @@ LIBEST_TEST_API void ossl_dump_ssl_errors(void);
|
||||
EST_ERROR ossl_init_cert_store(X509_STORE *store,
|
||||
unsigned char *raw1, int size1);
|
||||
|
||||
+int est_is_fips_enabled();
|
||||
+int est_enable_fips(int);
|
||||
#endif
|
||||
diff --git a/src/est/est_server.c b/src/est/est_server.c
|
||||
index d047b48..979ae53 100644
|
||||
--- a/src/est/est_server.c
|
||||
+++ b/src/est/est_server.c
|
||||
@@ -3355,7 +3355,7 @@ EST_ERROR est_server_set_auth_mode (EST_CTX *ctx, EST_HTTP_AUTH_MODE amode)
|
||||
/*
|
||||
* Since HTTP digest auth uses MD5, make sure we're not in FIPS mode.
|
||||
*/
|
||||
- if (FIPS_mode()) {
|
||||
+ if (est_is_fips_enabled()) {
|
||||
EST_LOG_ERR("HTTP digest auth not allowed while in FIPS mode");
|
||||
return (EST_ERR_BAD_MODE);
|
||||
}
|
||||
diff --git a/test/UT/US1864/us1864.c b/test/UT/US1864/us1864.c
|
||||
index 3e41cd7..1f57494 100644
|
||||
--- a/test/UT/US1864/us1864.c
|
||||
+++ b/test/UT/US1864/us1864.c
|
||||
@@ -218,12 +218,12 @@ static void us1864_test1 (void)
|
||||
/*
|
||||
* Make sure we don't allow DIGEST mode when in FIPS mode
|
||||
*/
|
||||
- if (!FIPS_mode_set(1)) {
|
||||
+ if (!est_enable_fips(1)) {
|
||||
printf("FIPS mode not supported, skipping test to prevent digest auth when in FIPS mode");
|
||||
} else {
|
||||
est_rv = est_server_set_auth_mode(ctx, AUTH_DIGEST);
|
||||
CU_ASSERT(est_rv == EST_ERR_BAD_MODE);
|
||||
- FIPS_mode_set(0);
|
||||
+ est_enable_fips(0);
|
||||
}
|
||||
|
||||
X509_free(x);
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From bd4fad5e427f4d2828f2edbe8063f6d6c9276c7b Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Sat, 8 Jan 2022 13:30:58 +0100
|
||||
Subject: [PATCH] configure.ac: remove duplicate invocation of AM_INIT_AUTOMAKE
|
||||
|
||||
autoreconf fails with:
|
||||
|
||||
configure.ac:9: error: AM_INIT_AUTOMAKE expanded multiple times
|
||||
/home/thomas/projets/buildroot/output/host/share/aclocal-1.16/init.m4:29: AM_INIT_AUTOMAKE is expanded from...
|
||||
configure.ac:7: the top level
|
||||
/home/thomas/projets/buildroot/output/host/share/aclocal-1.16/init.m4:29: AM_INIT_AUTOMAKE is expanded from...
|
||||
configure.ac:9: the top level
|
||||
|
||||
Drop the duplicate invocation to AM_INIT_AUTOMAKE to solve this.
|
||||
|
||||
Upstream: https://github.com/cisco/libest/pull/106
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
configure.ac | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0b930bf..66a91f2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4,7 +4,6 @@ AC_CONFIG_AUX_DIR(config)
|
||||
AC_CONFIG_SRCDIR(src/est/est.c)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
-AM_INIT_AUTOMAKE
|
||||
AM_MAINTAINER_MODE
|
||||
AM_INIT_AUTOMAKE([subdir-objects])
|
||||
|
||||
--
|
||||
2.33.1
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From 32fe99fa403d2f51931615745a64f8aede1ca46f Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Sat, 8 Jan 2022 13:38:17 +0100
|
||||
Subject: [PATCH] src/est/est_locl.h: add missing extern on
|
||||
e_ctx_ssl_exdata_index
|
||||
|
||||
Without this extern, the variable gets re-declared in each compilation
|
||||
unit including est_locl.h, causing gcc >= 10 to complain with:
|
||||
|
||||
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: .libs/est_client.o:(.data+0x0): multiple definition of `e_ctx_ssl_exdata_index'; .libs/est.o:(.bss+0x8): first defined here
|
||||
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: .libs/est_server.o:(.bss+0xc): multiple definition of `e_ctx_ssl_exdata_index'; .libs/est.o:(.bss+0x8): first defined here
|
||||
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: .libs/est_server_http.o:(.bss+0x3b8): multiple definition of `e_ctx_ssl_exdata_index'; .libs/est.o:(.bss+0x8): first defined here
|
||||
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: .libs/est_proxy.o:(.bss+0x0): multiple definition of `e_ctx_ssl_exdata_index'; .libs/est.o:(.bss+0x8): first defined here
|
||||
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: .libs/est_client_http.o:(.bss+0x0): multiple definition of `e_ctx_ssl_exdata_index'; .libs/est.o:(.bss+0x8): first defined here
|
||||
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: .libs/est_ossl_util.o:(.bss+0x0): multiple definition of `e_ctx_ssl_exdata_index'; .libs/est.o:(.bss+0x8): first defined here
|
||||
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: .libs/est_client_proxy.o:(.bss+0x0): multiple definition of `e_ctx_ssl_exdata_index'; .libs/est.o:(.bss+0x8): first defined here
|
||||
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: .libs/est_enhcd_cert_auth.o:(.bss+0x0): multiple definition of `e_ctx_ssl_exdata_index'; .libs/est.o:(.bss+0x8): first defined here
|
||||
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: .libs/est_server_coap.o:(.bss+0x0): multiple definition of `e_ctx_ssl_exdata_index'; .libs/est.o:(.bss+0x8): first defined here
|
||||
collect2: error: ld returned 1 exit status
|
||||
|
||||
Upstream: https://github.com/cisco/libest/pull/107
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
src/est/est_locl.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/est/est_locl.h b/src/est/est_locl.h
|
||||
index 62dcbea..b16f62d 100644
|
||||
--- a/src/est/est_locl.h
|
||||
+++ b/src/est/est_locl.h
|
||||
@@ -590,7 +590,7 @@ typedef struct est_oid_list {
|
||||
/*
|
||||
* Index used to link the EST Ctx into the SSL structures
|
||||
*/
|
||||
-int e_ctx_ssl_exdata_index;
|
||||
+extern int e_ctx_ssl_exdata_index;
|
||||
|
||||
LIBEST_TEST_API void est_log (EST_LOG_LEVEL lvl, char *format, ...);
|
||||
LIBEST_TEST_API void est_log_backtrace (void);
|
||||
--
|
||||
2.33.1
|
||||
|
||||
32
package/libest/Config.in
Normal file
32
package/libest/Config.in
Normal file
@@ -0,0 +1,32 @@
|
||||
comment "libest needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
config BR2_PACKAGE_LIBEST
|
||||
bool "libest"
|
||||
depends on !BR2_STATIC_LIBS # libexecinfo or glibc
|
||||
select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL
|
||||
select BR2_PACKAGE_SAFECLIB
|
||||
help
|
||||
libest is a C implementation of RFC 7030 (Enrollment over
|
||||
Secure Transport).
|
||||
|
||||
It can be used to provision public key certificates from
|
||||
a certificate authority (CA) or registration authority (RA)
|
||||
to end-user devices and network infrastructure devices.
|
||||
|
||||
https://github.com/cisco/libest
|
||||
|
||||
if BR2_PACKAGE_LIBEST
|
||||
|
||||
config BR2_PACKAGE_LIBEST_BRSKI
|
||||
bool "BRSKI support"
|
||||
|
||||
config BR2_PACKAGE_LIBEST_MODE_CLIENT_ONLY
|
||||
bool "client-only mode"
|
||||
# The client-only mode fails to build with OpenJDK/JNI
|
||||
# bindings
|
||||
depends on !BR2_PACKAGE_OPENJDK
|
||||
|
||||
endif # BR2_PACKAGE_LIBEST
|
||||
3
package/libest/libest.hash
Normal file
3
package/libest/libest.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Computed locally
|
||||
sha256 83983ac05137fd73586ddcb4874e30689fe694ee9a329797b60b3defc9a87327 libest-f8a6e5b53a5f70e72fe4029981df0693b17cbb32.tar.gz
|
||||
sha256 fbdb055f98babf8d86095d6f9b9e34d2ff21a8212e442b8f18bdcb403e44366c LICENSE
|
||||
67
package/libest/libest.mk
Normal file
67
package/libest/libest.mk
Normal file
@@ -0,0 +1,67 @@
|
||||
################################################################################
|
||||
#
|
||||
# libest
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBEST_VERSION = f8a6e5b53a5f70e72fe4029981df0693b17cbb32
|
||||
LIBEST_SITE = $(call github,cisco,libest,$(LIBEST_VERSION))
|
||||
# We don't build examples, so we're not affected by the OpenSSL
|
||||
# license
|
||||
LIBEST_LICENSE = BSD-3-Clause, MIT, W3C
|
||||
LIBEST_LICENSE_FILES = LICENSE
|
||||
LIBEST_INSTALL_STAGING = YES
|
||||
LIBEST_AUTORECONF = YES
|
||||
LIBEST_DEPENDENCIES = openssl host-pkgconf safeclib
|
||||
# libcoap support is explicitly disabled because it breaks the build
|
||||
# libsafec support is explicitly enabled because we want to avoid
|
||||
# possible hidden use of bundled copy of library.
|
||||
LIBEST_CONF_OPTS = \
|
||||
--with-ssl-dir=$(STAGING_DIR)/usr \
|
||||
$(if $(BR2_TOOLCHAIN_HAS_THREADS),--enable-pthreads,--disable-pthreads) \
|
||||
$(if $(BR2_PACKAGE_LIBEST_BRSKI),--enable-brski,--disable-brski) \
|
||||
--disable-examples \
|
||||
--without-libcoap-dir \
|
||||
--with-system-libsafec
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
|
||||
LIBEST_DEPENDENCIES += libexecinfo
|
||||
LIBEST_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lexecinfo"
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBEST_MODE_CLIENT_ONLY),y)
|
||||
LIBEST_CONF_OPTS += --enable-client-only
|
||||
else
|
||||
LIBEST_CONF_OPTS += --disable-client-only
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENJDK),y)
|
||||
LIBEST_MAKE_ENV += JAVA_HOME=$(HOST_DIR)/lib/jvm
|
||||
LIBEST_CONF_ENV += JAVA_HOME=$(HOST_DIR)/lib/jvm
|
||||
LIBEST_CONF_OPTS += --enable-jni
|
||||
LIBEST_DEPENDENCIES += openjdk
|
||||
else
|
||||
LIBEST_CONF_OPTS += --disable-jni
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCURL),y)
|
||||
LIBEST_CONF_OPTS += --with-libcurl-dir=$(STAGING_DIR)/usr
|
||||
LIBEST_DEPENDENCIES += libcurl
|
||||
else
|
||||
LIBEST_CONF_OPTS += --without-libcurl-dir
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBURIPARSER),y)
|
||||
LIBEST_CONF_OPTS += --with-uriparser-dir=$(STAGING_DIR)/usr
|
||||
LIBEST_DEPENDENCIES += liburiparser
|
||||
else
|
||||
LIBEST_CONF_OPTS += --without-uriparser-dir
|
||||
endif
|
||||
|
||||
define LIBEST_INSTALL_PC
|
||||
$(INSTALL) -c -m 0644 $(LIBEST_PKGDIR)/libest.pc \
|
||||
$(STAGING_DIR)/usr/lib/pkgconfig/libest.pc
|
||||
endef
|
||||
LIBEST_POST_INSTALL_STAGING_HOOKS += LIBEST_INSTALL_PC
|
||||
|
||||
$(eval $(autotools-package))
|
||||
10
package/libest/libest.pc
Normal file
10
package/libest/libest.pc
Normal file
@@ -0,0 +1,10 @@
|
||||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: libest
|
||||
Description: implementation of RFC 7030 (Enrollment over Secure Transport)
|
||||
Version: 2.1.0
|
||||
Libs: -lest
|
||||
Cflags: -I${includedir}/est
|
||||
Reference in New Issue
Block a user