Skip to content

Commit

Permalink
Remove openenclave.verifyOpenEnclaveEvidence JS API (#6236)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyashton authored Jun 6, 2024
1 parent 855d818 commit 9254ec3
Show file tree
Hide file tree
Showing 12 changed files with 302 additions and 545 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Added TypeScript `TypedKvSet` and `ccfapp.typedKv<K>` to facilitate set handling from application code.

### Removed

- Removed unused `openenclave.verifyOpenEnclaveEvidence` API from JS/TS.

## [5.0.0-dev17]

[5.0.0-dev17]: https://github.com/microsoft/CCF/releases/tag/ccf-5.0.0-dev17
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ set(CCF_JS_SOURCES
${CCF_DIR}/src/js/ffi_plugins.cpp
${CCF_DIR}/src/js/extensions/console.cpp
${CCF_DIR}/src/js/extensions/math/random.cpp
${CCF_DIR}/src/js/extensions/openenclave.cpp
${CCF_DIR}/src/js/extensions/snp_attestation.cpp
${CCF_DIR}/src/js/extensions/ccf/consensus.cpp
${CCF_DIR}/src/js/extensions/ccf/converters.cpp
Expand Down
5 changes: 0 additions & 5 deletions include/ccf/js/common_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "ccf/js/extensions/ccf/kv.h"
#include "ccf/js/extensions/console.h"
#include "ccf/js/extensions/math/random.h"
#include "ccf/js/extensions/openenclave.h"
#include "ccf/js/extensions/snp_attestation.h"

namespace ccf::js
Expand Down Expand Up @@ -39,10 +38,6 @@ namespace ccf::js
Base::add_extension(
std::make_shared<ccf::js::extensions::CryptoExtension>());

// add openenclave.*
Base::add_extension(
std::make_shared<ccf::js::extensions::OpenEnclaveExtension>());

// add snp_attestation.*
Base::add_extension(
std::make_shared<ccf::js::extensions::SnpAttestationExtension>());
Expand Down
22 changes: 0 additions & 22 deletions include/ccf/js/extensions/openenclave.h

This file was deleted.

26 changes: 0 additions & 26 deletions js/ccf-app/src/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -743,32 +743,6 @@ export interface CCF {
enableMetricsLogging(enable: boolean): boolean;
}

export const openenclave: OpenEnclave = (<any>globalThis).openenclave;

export interface EvidenceClaims {
claims: { [name: string]: ArrayBuffer };
customClaims: { [name: string]: ArrayBuffer };
}

export interface OpenEnclave {
/**
* Verifies Open Enclave evidence and returns the claims of the evidence.
*
* @param format The optional format id of the evidence to be verified as
* a UUID of the form "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".
* If this parameter is `undefined`, the evidence and endorsement
* must either contain data with an attestation header holding a valid
* format id, or be an Open Enclave report generated by the legacy API function
* `oe_get_report()`. Otherwise, this parameter must be a valid format id, and
* the evidence and endorsements data must not be wrapped with an attestation header.
*/
verifyOpenEnclaveEvidence(
format: string | undefined,
evidence: ArrayBuffer,
endorsements?: ArrayBuffer,
): EvidenceClaims;
}

export interface TcbVersion {
boot_loader: number;
tee: number;
Expand Down
17 changes: 0 additions & 17 deletions js/ccf-app/src/openenclave.ts

This file was deleted.

14 changes: 0 additions & 14 deletions js/ccf-app/src/polyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ import {
CryptoKeyPair,
WrapAlgoParams,
DigestAlgorithm,
EvidenceClaims,
OpenEnclave,
SnpAttestation,
SnpAttestationResult,
SigningAlgorithm,
Expand Down Expand Up @@ -630,18 +628,6 @@ class CCFPolyfill implements CCF {

(<any>globalThis).ccf = new CCFPolyfill();

class OpenEnclavePolyfill implements OpenEnclave {
verifyOpenEnclaveEvidence(
format: string | undefined,
evidence: ArrayBuffer,
endorsements?: ArrayBuffer,
): EvidenceClaims {
throw new Error("Method not implemented.");
}
}

(<any>globalThis).openenclave = new OpenEnclavePolyfill();

class SnpAttestationPolyfill implements SnpAttestation {
verifySnpAttestation(
evidence: ArrayBuffer,
Expand Down
210 changes: 0 additions & 210 deletions src/js/extensions/openenclave.cpp

This file was deleted.

Loading

0 comments on commit 9254ec3

Please sign in to comment.