Skip to content

Commit

Permalink
feat(pull): Add SSL support to Bazel build
Browse files Browse the repository at this point in the history
Issue: #592
  • Loading branch information
gjasny committed May 23, 2022
1 parent 1181640 commit b232b70
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bazel/civetweb.BUILD
Expand Up @@ -24,12 +24,13 @@ cc_library(
"include/civetweb.h",
],
copts = [
"-DOPENSSL_API_1_1",
"-DUSE_IPV6",
"-DNDEBUG",
"-DNO_CGI",
"-DNO_CACHING",
"-DNO_SSL",
"-DNO_FILES",
"-DNO_SSL_DL",
"-UDEBUG",
],
includes = [
Expand All @@ -43,6 +44,10 @@ cc_library(
":windows": [],
"//conditions:default": ["-lrt"],
}),
deps = [
"@boringssl//:crypto",
"@boringssl//:ssl",
],
textual_hdrs = [
"src/md5.inl",
"src/handle_form.inl",
Expand All @@ -59,11 +64,12 @@ cc_library(
"include/CivetServer.h",
],
copts = [
"-DOPENSSL_API_1_1",
"-DUSE_IPV6",
"-DNDEBUG",
"-DNO_CGI",
"-DNO_CACHING",
"-DNO_SSL",
"-DNO_SSL_DL",
"-DNO_FILES",
],
includes = [
Expand Down
13 changes: 13 additions & 0 deletions bazel/repositories.bzl
Expand Up @@ -57,3 +57,16 @@ def prometheus_cpp_repositories():
],
build_file = "@com_github_jupp0r_prometheus_cpp//bazel:zlib.BUILD",
)

maybe(
http_archive,
name = "boringssl",
# Use github mirror instead of https://boringssl.googlesource.com/boringssl
# to obtain a boringssl archive with consistent sha256
sha256 = "534fa658bd845fd974b50b10f444d392dfd0d93768c4a51b61263fd37d851c40",
strip_prefix = "boringssl-b9232f9e27e5668bc0414879dcdedb2a59ea75f2",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/b9232f9e27e5668bc0414879dcdedb2a59ea75f2.tar.gz",
"https://github.com/google/boringssl/archive/b9232f9e27e5668bc0414879dcdedb2a59ea75f2.tar.gz",
],
)

2 comments on commit b232b70

@LaithS
Copy link

@LaithS LaithS commented on b232b70 May 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use boringssl when openssl is more readily available almost out of the box with most linux operating systems?

@LaithS
Copy link

@LaithS LaithS commented on b232b70 May 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it might be useful to have that option turned on via an option rather than always

Please sign in to comment.