From 248111b439fe931511a87bf54452b6e650918e84 Mon Sep 17 00:00:00 2001 From: Nathaniel Brough Date: Tue, 27 Aug 2024 17:37:55 +1000 Subject: [PATCH] liboqs: Initial integration --- projects/liboqs/Dockerfile | 22 ++++++++++++++++++++++ projects/liboqs/build.sh | 22 ++++++++++++++++++++++ projects/liboqs/project.yaml | 10 ++++++++++ 3 files changed, 54 insertions(+) create mode 100644 projects/liboqs/Dockerfile create mode 100755 projects/liboqs/build.sh create mode 100644 projects/liboqs/project.yaml diff --git a/projects/liboqs/Dockerfile b/projects/liboqs/Dockerfile new file mode 100644 index 000000000000..d0fed48ce93f --- /dev/null +++ b/projects/liboqs/Dockerfile @@ -0,0 +1,22 @@ +# Copyright 2024 Google LLC +# +# 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 cmake ninja-build openssl +# TODO(silvergasp): Switch this back to mainline liboqs once fuzzer's merged. +RUN git clone --depth 1 https://github.com/silvergasp/liboqs.git liboqs +WORKDIR liboqs +COPY build.sh $SRC/ diff --git a/projects/liboqs/build.sh b/projects/liboqs/build.sh new file mode 100755 index 000000000000..bb89dfec714e --- /dev/null +++ b/projects/liboqs/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash -eu +# Copyright 2024 Google LLC +# +# 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. +# +################################################################################ + +mkdir build +cd build +cmake -GNinja .. -DOQS_BUILD_FUZZ_TESTS=ON +ninja -j$(nproc) +cp tests/fuzz_* $OUT/ diff --git a/projects/liboqs/project.yaml b/projects/liboqs/project.yaml new file mode 100644 index 000000000000..3b5d0a7eb4b1 --- /dev/null +++ b/projects/liboqs/project.yaml @@ -0,0 +1,10 @@ +homepage: "https://openquantumsafe.org/" +language: c +primary_contact: "security@openquantumsafe.org" +auto_ccs: + - nathaniel.brough@gmail.com +main_repo: "https://github.com/open-quantum-safe/liboqs.git" +fuzzing_engines: + - libfuzzer + - afl + - honggfuzz