Keep OpenSSL compat headers under nwssl
All checks were successful
Source release / source-package (push) Successful in 1m0s
All checks were successful
Source release / source-package (push) Successful in 1m0s
This commit is contained in:
committed by
Mario Fetka
parent
9662ae7126
commit
8420f90e67
@@ -1,5 +1,5 @@
|
||||
#ifndef MARS_MATRIXSSL_OPENSSL_BIO_H
|
||||
#define MARS_MATRIXSSL_OPENSSL_BIO_H
|
||||
#ifndef MARS_NWSSL_OPENSSL_BIO_H
|
||||
#define MARS_NWSSL_OPENSSL_BIO_H
|
||||
#include <openssl/ssl.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
4
include/nwssl/openssl/err.h
Normal file
4
include/nwssl/openssl/err.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#ifndef MARS_NWSSL_OPENSSL_ERR_H
|
||||
#define MARS_NWSSL_OPENSSL_ERR_H
|
||||
#include <openssl/ssl.h>
|
||||
#endif
|
||||
4
include/nwssl/openssl/pem.h
Normal file
4
include/nwssl/openssl/pem.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#ifndef MARS_NWSSL_OPENSSL_PEM_H
|
||||
#define MARS_NWSSL_OPENSSL_PEM_H
|
||||
#include <openssl/bio.h>
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef MARS_MATRIXSSL_OPENSSL_SSL_H
|
||||
#define MARS_MATRIXSSL_OPENSSL_SSL_H
|
||||
#ifndef MARS_NWSSL_OPENSSL_SSL_H
|
||||
#define MARS_NWSSL_OPENSSL_SSL_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
4
include/nwssl/openssl/x509.h
Normal file
4
include/nwssl/openssl/x509.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#ifndef MARS_NWSSL_OPENSSL_X509_H
|
||||
#define MARS_NWSSL_OPENSSL_X509_H
|
||||
#include <openssl/ssl.h>
|
||||
#endif
|
||||
@@ -1,4 +0,0 @@
|
||||
#ifndef MARS_MATRIXSSL_OPENSSL_ERR_H
|
||||
#define MARS_MATRIXSSL_OPENSSL_ERR_H
|
||||
#include <openssl/ssl.h>
|
||||
#endif
|
||||
@@ -1,4 +0,0 @@
|
||||
#ifndef MARS_MATRIXSSL_OPENSSL_PEM_H
|
||||
#define MARS_MATRIXSSL_OPENSSL_PEM_H
|
||||
#include <openssl/bio.h>
|
||||
#endif
|
||||
@@ -1,4 +0,0 @@
|
||||
#ifndef MARS_MATRIXSSL_OPENSSL_X509_H
|
||||
#define MARS_MATRIXSSL_OPENSSL_X509_H
|
||||
#include <openssl/ssl.h>
|
||||
#endif
|
||||
@@ -1,6 +1,10 @@
|
||||
set(NWSSL_BUILD_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/nwssl")
|
||||
set(NWSSL_OPENSSL_COMPAT_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/openssl")
|
||||
file(MAKE_DIRECTORY "${NWSSL_BUILD_INCLUDE_DIR}" "${NWSSL_OPENSSL_COMPAT_INCLUDE_DIR}")
|
||||
set(NWSSL_OPENSSL_COMPAT_INCLUDE_DIR "${NWSSL_BUILD_INCLUDE_DIR}/openssl")
|
||||
set(NWSSL_PRIVATE_INCLUDE_DIR "${NWSSL_BUILD_INCLUDE_DIR}/private")
|
||||
file(MAKE_DIRECTORY
|
||||
"${NWSSL_BUILD_INCLUDE_DIR}"
|
||||
"${NWSSL_OPENSSL_COMPAT_INCLUDE_DIR}"
|
||||
"${NWSSL_PRIVATE_INCLUDE_DIR}")
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_SOURCE_DIR}/include/nwssl/nwssl.h"
|
||||
@@ -9,9 +13,12 @@ configure_file(
|
||||
|
||||
# nwssl owns the reduced OpenSSL compatibility surface used by legacy mars-nwe
|
||||
# code. MatrixSSL stays a native TLS/crypto provider underneath this wrapper.
|
||||
file(COPY "${CMAKE_SOURCE_DIR}/include/openssl/"
|
||||
file(COPY "${CMAKE_SOURCE_DIR}/include/nwssl/openssl/"
|
||||
DESTINATION "${NWSSL_OPENSSL_COMPAT_INCLUDE_DIR}"
|
||||
FILES_MATCHING PATTERN "*.h")
|
||||
file(COPY "${CMAKE_SOURCE_DIR}/include/nwssl/private/"
|
||||
DESTINATION "${NWSSL_PRIVATE_INCLUDE_DIR}"
|
||||
FILES_MATCHING PATTERN "*.h")
|
||||
|
||||
add_library(nwssl SHARED
|
||||
nwssl.c
|
||||
@@ -31,9 +38,12 @@ target_compile_definitions(nwssl PRIVATE
|
||||
target_include_directories(nwssl
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>"
|
||||
"$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include/nwssl>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/nwssl>"
|
||||
PRIVATE
|
||||
"${CMAKE_SOURCE_DIR}/include")
|
||||
"${CMAKE_SOURCE_DIR}/include"
|
||||
"${CMAKE_SOURCE_DIR}/include/nwssl")
|
||||
|
||||
target_link_libraries(nwssl
|
||||
PUBLIC
|
||||
@@ -54,8 +64,6 @@ install(TARGETS nwssl
|
||||
|
||||
install(DIRECTORY "${NWSSL_BUILD_INCLUDE_DIR}/"
|
||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/nwssl")
|
||||
install(DIRECTORY "${NWSSL_OPENSSL_COMPAT_INCLUDE_DIR}/"
|
||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/openssl")
|
||||
|
||||
install(EXPORT mars-nwe-ssl-targets
|
||||
NAMESPACE mars_nwe::
|
||||
|
||||
Reference in New Issue
Block a user