Skip to content

Commit

Permalink
signature verification moved to library.
Browse files Browse the repository at this point in the history
  • Loading branch information
John-LittleBearLabs committed Jan 29, 2024
1 parent 4fd2ab8 commit b345de9
Showing 17 changed files with 124 additions and 11,351 deletions.
8 changes: 1 addition & 7 deletions component/chromium_ipfs_context.cc
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@
#include "block_http_request.h"
#include "chromium_cbor_adapter.h"
#include "chromium_json_adapter.h"
#include "crypto_api.h"
#include "inter_request_state.h"
#include "ipfs_client/crypto_api.h"
#include "preferences.h"

#include <components/cbor/reader.h>
@@ -78,12 +78,6 @@ void Self::SendHttpRequest(HttpRequestDescription req_inf,
auto ptr = std::make_shared<BlockHttpRequest>(req_inf, cb);
ptr->send(loader_factory_);
}
bool Self::VerifyKeySignature(SigningKeyType t,
ByteView signature,
ByteView data,
ByteView key_bytes) const {
return crypto_api::VerifySignature(t, signature, data, key_bytes);
}
auto Self::ParseCbor(ipfs::ContextApi::ByteView bytes) const
-> std::unique_ptr<DagCborValue> {
cbor::Reader::Config cfg;
4 changes: 0 additions & 4 deletions component/chromium_ipfs_context.h
Original file line number Diff line number Diff line change
@@ -43,10 +43,6 @@ class ChromiumIpfsContext final : public ContextApi {
DnsTextCompleteCallback) override;
void SendHttpRequest(HttpRequestDescription req_inf,
HttpCompleteCallback cb) const override;
bool VerifyKeySignature(SigningKeyType,
ByteView signature,
ByteView data,
ByteView key_bytes) const override;

std::unique_ptr<DagCborValue> ParseCbor(ByteView) const override;
std::unique_ptr<DagJsonValue> ParseJson(std::string_view) const override;
58 changes: 0 additions & 58 deletions component/crypto_api.cc

This file was deleted.

17 changes: 0 additions & 17 deletions component/crypto_api.h

This file was deleted.

Loading

0 comments on commit b345de9

Please sign in to comment.