# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# @generated by folly/facebook/generate_cmake.py

folly_add_library(
  NAME openssl_cert_utils
  SRCS OpenSSLCertUtils.cpp
  HEADERS OpenSSLCertUtils.h
  DEPS
    folly_file_util
    folly_scope_guard
    folly_string
  EXPORTED_DEPS
    folly_io_iobuf
    folly_network_address
    folly_optional
    folly_portability_openssl
    folly_ssl_openssl_ptr_types
)

folly_add_library(
  NAME openssl_hash
  SRCS OpenSSLHash.cpp
  HEADERS OpenSSLHash.h
  DEPS
    fmt::fmt
    folly_format
  EXPORTED_DEPS
    folly_exception
    folly_io_iobuf
    folly_portability_openssl
    folly_range
    folly_ssl_openssl_ptr_types
)

folly_add_library(
  NAME openssl_key_utils
  SRCS OpenSSLKeyUtils.cpp
  HEADERS OpenSSLKeyUtils.h
  DEPS
    folly_portability_openssl
    folly_ssl_password_collector
  EXPORTED_DEPS
    folly_range
    folly_ssl_openssl_ptr_types
)

folly_add_library(
  NAME openssl_ptr_types
  HEADERS OpenSSLPtrTypes.h
  EXPORTED_DEPS
    ${GLOG_LIBRARIES}
    folly_memory
    folly_portability_openssl
)

folly_add_library(
  NAME openssl_ticket_handler
  HEADERS OpenSSLTicketHandler.h
  EXPORTED_DEPS folly_portability_openssl
)

folly_add_library(
  NAME openssl_version_finder
  HEADERS OpenSSLVersionFinder.h
  EXPORTED_DEPS folly_portability_openssl
)

folly_add_library(
  NAME password_collector
  SRCS PasswordCollector.cpp
  HEADERS PasswordCollector.h
)

folly_add_library(
  NAME ssl_session
  HEADERS SSLSession.h
)

folly_add_library(
  NAME ssl_session_manager
  SRCS SSLSessionManager.cpp
  HEADERS SSLSessionManager.h
  DEPS
    folly_overload
    folly_ssl_detail_openssl_session
  EXPORTED_DEPS
    folly_portability_openssl
    folly_ssl_openssl_ptr_types
    folly_ssl_ssl_session
)

add_subdirectory(detail)
