Skip to content

Commit 38fe99f

Browse files
authored
Remove unused QCBOR converters (#7590)
1 parent 292ef16 commit 38fe99f

2 files changed

Lines changed: 0 additions & 23 deletions

File tree

src/crypto/openssl/cose_verifier.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020

2121
namespace
2222
{
23-
std::string qcbor_buf_to_string(const UsefulBufC& buf)
24-
{
25-
return {reinterpret_cast<const char*>(buf.ptr), buf.len};
26-
}
27-
2823
std::optional<int> extract_algorithm_from_header(
2924
std::span<const uint8_t> cose_msg)
3025
{

src/node/cose_common.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,6 @@ namespace ccf::cose
3535

3636
using Signature = std::span<const uint8_t>;
3737

38-
static std::string qcbor_buf_to_string(const UsefulBufC& buf)
39-
{
40-
return {reinterpret_cast<const char*>(buf.ptr), buf.len};
41-
}
42-
43-
static std::vector<uint8_t> qcbor_buf_to_byte_vector(const UsefulBufC& buf)
44-
{
45-
const auto* ptr = static_cast<const uint8_t*>(buf.ptr);
46-
return {ptr, ptr + buf.len};
47-
}
48-
4938
static bool is_ecdsa_alg(int64_t cose_alg)
5039
{
5140
return cose_alg == T_COSE_ALGORITHM_ES256 ||
@@ -70,13 +59,6 @@ namespace ccf::cose
7059
{}
7160
};
7261

73-
static std::string tstring_to_string(QCBORItem& item)
74-
{
75-
return {
76-
static_cast<const char*>(item.val.string.ptr),
77-
static_cast<const char*>(item.val.string.ptr) + item.val.string.len};
78-
}
79-
8062
struct CwtClaims
8163
{
8264
int64_t iat{};

0 commit comments

Comments
 (0)