| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
The Cryptosense API Client depends on libcurl.
$ export CRYPTOSENSE_API_KEY=secret
$ ./cs-api upload-trace \
--verbose \
--trace-file test_trace.cst.gz \
--project-id 1 \
--analyze 1
DEBUG HTTP request: POST https://aqtiveguard.sandboxaq.com/api/v2
DEBUG HTTP response: 200
DEBUG HTTP request: POST https://storage.googleapis.com/cs-prod-traces
DEBUG HTTP response: 201
DEBUG HTTP request: POST https://aqtiveguard.sandboxaq.com/api/v2
DEBUG HTTP response: 200
INFO Trace 1234 uploaded
DEBUG HTTP request: POST https://aqtiveguard.sandboxaq.com/api/v2
DEBUG HTTP response: 200
INFO Report 'Report 1234' of ID 1234 is being generatedIf you need to route your request through a proxy, set the http_proxy or https_proxy environment variable to the URL of your proxy endpoint.
Note that, for now, the --no-check-certificate option has no effect on the checking of the proxy certificate: it is always checked.
For more advanced configuration, please refer to the curl documentation.
Make sure you are using Opam 2.2 or later. You will need basic tools like:
opam switch create --no-action . 4.14.2
opam install --deps-only --with-test --with-dev-setup --working-dir .
eval $(opam env) # This is for Linux (use the appropriate alternative on Windows).For end-to-end tests, we have Python dependencies managed by Poetry:
# Create a virtual environment (unless you'd like Poetry to manage it)
poetry installFor later steps, ensure the virtual environment is activated.
To build the executable, run:
dune build @install && dune install`dune build @check @runtestmake formatEnd-to-end tests are run with the Python test suite and should be checked on both Linux and Windows.
Most of the tests require at least one running instance of the AQtive Guard API server. Each instance is defined as an server in a TOML file. Tests for which pytest can't find a suitable environment will be skipped.
Usage:
pytest \
--executable=/path/to/cs-api \
--server=/path/to/dev.toml \
--server=/path/to/other_env.tomlThose tests can run either Linux and Windows. They can be run in parallel (e.g. -n 4).
Sample TOML file:
api_url = "https://localhost:8443"
api_key = "<secret-api-key>"
trusted_cert = false
ca_path = "/path/to/self-signed-cert.pem"
profile_id = 1
project_id = 3
slot_name = "cs-api-test"
is_default_url = false| Back | FazBrowse Home | New Git URL |