@@ -70,7 +70,6 @@ option(GPGFRONTEND_XCODE_ENABLE_SANDBOX "Enable SandBox For Xcode Build" OFF)
7070
7171# check options
7272option (GPGFRONTEND_CHECK_RELEASE_COMMIT_HASH "Enable checking on commit hash from the GitHub release" OFF )
73- option (GPGFRONTEND_SIGN_BUILT_BINARY "Use OpenSSL to sign shared libraries and executables" OFF )
7473option (GPGFRONTEND_LINK_GPGME_INTO_CORE "Statically link GpgME into the core library" OFF )
7574option (GPGFRONTEND_LINK_OPENSSL_INTO_EXEC "Statically link OpenSSL into the executable" OFF )
7675
@@ -109,12 +108,6 @@ else()
109108 set (BUILD_STRIP_RPATH 0)
110109endif ()
111110
112- if (GPGFRONTEND_SIGN_BUILT_BINARY)
113- set (SIGN_BUILT_BINARY 1)
114- else ()
115- set (SIGN_BUILT_BINARY 0)
116- endif ()
117-
118111if (GPGFRONTEND_LINK_GPGME_INTO_CORE)
119112 set (BUILD_AND_STATIC_LINK_GPGME 1)
120113else ()
@@ -435,41 +428,6 @@ else()
435428 endif ()
436429endif ()
437430
438- if (SIGN_BUILT_BINARY)
439- set (SIGN_KEYS_DIR "${CMAKE_BINARY_DIR } /keys" )
440- file (MAKE_DIRECTORY "${SIGN_KEYS_DIR} " )
441-
442- set (SIGN_PRIVATE_KEY "${SIGN_KEYS_DIR} /private.pem" )
443- set (SIGN_PUBLIC_KEY "${SIGN_KEYS_DIR} /public.pem" )
444-
445- find_program (OPENSSL_EXECUTABLE NAMES openssl )
446-
447- if (NOT OPENSSL_EXECUTABLE)
448- message (FATAL_ERROR "Signing is enabled (SIGN_BUILT_BINARY=ON), but openssl executable not found, please install OpenSSL." )
449- endif ()
450-
451- execute_process (
452- COMMAND ${OPENSSL_EXECUTABLE} genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out "${SIGN_PRIVATE_KEY} "
453- RESULT_VARIABLE result_priv
454- )
455-
456- if (NOT result_priv EQUAL 0)
457- message (FATAL_ERROR "Failed to generate private key for binary signing." )
458- endif ()
459-
460- execute_process (
461- COMMAND ${OPENSSL_EXECUTABLE} pkey -in "${SIGN_PRIVATE_KEY} " -pubout -out "${SIGN_PUBLIC_KEY} "
462- RESULT_VARIABLE result_pub
463- )
464-
465- if (NOT result_pub EQUAL 0)
466- message (FATAL_ERROR "Failed to generate public key for binary signing." )
467- endif ()
468-
469- message (STATUS "Binary Signing Private Key: ${SIGN_PRIVATE_KEY} " )
470- message (STATUS "Binary Signing Public Key: ${SIGN_PUBLIC_KEY} " )
471- endif ()
472-
473431if (BUILD_AND_STATIC_LINK_GPGME)
474432 add_subdirectory (third_party )
475433endif ()
0 commit comments