Skip to content

[etr/libhttpserver] Initial integration #4745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions projects/libhttpserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2020 Google Inc.
#
# 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.
#
################################################################################

FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y make autoconf automake libtool
RUN apt-get install -y libgnutls-dev wget curl
RUN wget --no-check-certificate https://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-latest.tar.gz
RUN git clone --depth 1 --branch fuzzing_PR https://github.com/sgbhat2/libhttpserver.git libhttpserver
WORKDIR libhttpserver
COPY build.sh $SRC/
35 changes: 35 additions & 0 deletions projects/libhttpserver/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash -eu
# Copyright 2020 Google Inc.
#
# 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.
#
################################################################################

cd $SRC
tar -xf libmicrohttpd-latest.tar.gz
cd libmicrohttpd*
./configure
make
make install

cd $SRC/libhttpserver
./bootstrap
mkdir build; cd build
../configure --enable-shared=no
make
make install

cd ../test/fuzz
$CXX $CXXFLAGS -std=c++11 basic_fuzzer.cc -o $OUT/basic_fuzzer $LIB_FUZZING_ENGINE /usr/local/lib/libhttpserver.a /usr/local/lib/libmicrohttpd.a -lgnutls
$CXX $CXXFLAGS -std=c++11 ip_representation.cc -o $OUT/ip_representation $LIB_FUZZING_ENGINE /usr/local/lib/libhttpserver.a /usr/local/lib/libmicrohttpd.a -lgnutls
cp *.zip $OUT
8 changes: 8 additions & 0 deletions projects/libhttpserver/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
homepage: "https://github.com/etr/libhttpserver"
main_repo: "https://github.com/etr/libhttpserver"
language: c++
primary_contact: "[email protected]"
auto_ccs:
- "[email protected]"
sanitizers:
- address