Skip to content

Commit

Permalink
Upgrade to 6.0.0-dev8 and de-duplicate wrappers (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
achamayou authored Dec 11, 2024
1 parent 52c2f40 commit 69b9f53
Show file tree
Hide file tree
Showing 23 changed files with 114 additions and 530 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/microsoft/ccf/app/dev/virtual:ccf-6.0.0-dev7
FROM ghcr.io/microsoft/ccf/app/dev/virtual:ccf-6.0.0-dev8
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
checks:
name: Format and License Checks
runs-on: ubuntu-20.04
container: ghcr.io/microsoft/ccf/app/dev/virtual:ccf-6.0.0-dev7
container: ghcr.io/microsoft/ccf/app/dev/virtual:ccf-6.0.0-dev8
steps:
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout repository
Expand All @@ -37,7 +37,7 @@ jobs:
unit_tests_enabled: OFF
runs-on: ${{ matrix.platform.nodes }}
container:
image: ghcr.io/microsoft/ccf/app/dev/${{ matrix.platform.image }}:ccf-6.0.0-dev7
image: ghcr.io/microsoft/ccf/app/dev/${{ matrix.platform.image }}:ccf-6.0.0-dev8
options: ${{ matrix.platform.options }}
env:
# Helps to distinguish between CI and local builds.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Analyze

runs-on: ubuntu-latest
container: ghcr.io/microsoft/ccf/app/dev/virtual:ccf-6.0.0-dev7
container: ghcr.io/microsoft/ccf/app/dev/virtual:ccf-6.0.0-dev8

permissions:
actions: read
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
- name: CCF_VERSION
displayName: Target CCF version to build for
type: string
default: 6.0.0-dev7
default: 6.0.0-dev8

variables:
SCITT_CI: 1 # used in scitt builds and tests
Expand Down
8 changes: 4 additions & 4 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ It is expected that you have Ubuntu 20.04. Follow the steps below to setup your

2. Install dependencies:
```sh
wget https://github.com/microsoft/CCF/archive/refs/tags/ccf-6.0.0-dev7.tar.gz
tar xvzf ccf-6.0.0-dev7.tar.gz
cd CCF-ccf-6.0.0-dev7/getting_started/setup_vm/
./run.sh app-dev.yml -e ccf_ver=6.0.0-dev7 -e platform=<virtual|snp> -e clang_version=15
wget https://github.com/microsoft/CCF/archive/refs/tags/ccf-6.0.0-dev8.tar.gz
tar xvzf ccf-6.0.0-dev8.tar.gz
cd CCF-ccf-6.0.0-dev8/getting_started/setup_vm/
./run.sh app-dev.yml -e ccf_ver=6.0.0-dev8 -e platform=<virtual|snp> -e clang_version=15
```

## Compiling
Expand Down
4 changes: 2 additions & 2 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ project(scitt
set(COMPILE_TARGET "snp" CACHE STRING "Target compilation platform, either 'virtual', or 'snp'")
option(BUILD_TESTS "Whether to build tests" ON)
option(ENABLE_CLANG_TIDY "Run clang-tidy on the codebase" OFF)
# Added as option to enable Azure Linux build in 6.0.0-dev7, will eventually be removed
# Added as option to enable Azure Linux build in 6.0.0-dev, will eventually be removed
# once the transition to libstdc++ is complete
set(USE_LIBCXX ON CACHE BOOL "Use libc++ instead of libstdc++")

Expand Down Expand Up @@ -141,7 +141,7 @@ if (BUILD_TESTS)
unit_tests SYSTEM PRIVATE
${CCF_DIR}/include
${CCF_DIR}/include/3rdparty
${CCF_DIR}/include/ccf/_private # openssl_wrappers depends on ds/x509_time_fmt.h
${CCF_DIR}/include/ccf/_private # public_key.h and verifier.h depend on crypto/openssl/openssl_wrappers.h
)

if (ENABLE_CLANG_TIDY)
Expand Down
1 change: 0 additions & 1 deletion app/src/cbor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include "tracing.h"

#include <ccf/ccf_assert.h>
#include <ccf/crypto/hash_provider.h>
#include <ccf/crypto/sha256_hash.h>
#include <qcbor/UsefulBuf.h>
Expand Down
1 change: 0 additions & 1 deletion app/src/cose.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#pragma once

#include "cbor.h"
#include "openssl_wrappers.h"
#include "public_key.h"
#include "tracing.h"
#include "util.h"
Expand Down
17 changes: 10 additions & 7 deletions app/src/did/resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,16 @@ namespace scitt::did

void register_resolver(std::unique_ptr<MethodResolver> resolver)
{
CCF_ASSERT(
resolver->get_method_prefix().starts_with(DID_PREFIX),
"Method resolver prefix must start with `did:`");
CCF_ASSERT(
resolver->get_method_prefix().ends_with(':'),
"Method resolver prefix must end with a colon");

if (!resolver->get_method_prefix().starts_with(DID_PREFIX))
{
throw std::invalid_argument(
"Method resolver prefix must start with `did:`");
}
if (!resolver->get_method_prefix().ends_with(':'))
{
throw std::invalid_argument(
"Method resolver prefix must end with a colon");
}
resolvers.push_back(std::move(resolver));
}
};
Expand Down
4 changes: 2 additions & 2 deletions app/src/http_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ namespace scitt
struct HTTPError : public std::runtime_error
{
using Headers = std::unordered_map<std::string, std::string>;
http_status status_code;
ccf::http_status status_code;
std::string code;
Headers headers;
HTTPError(
http_status status_code,
ccf::http_status status_code,
std::string code,
std::string msg,
Headers headers = {}) :
Expand Down
Loading

0 comments on commit 69b9f53

Please sign in to comment.