Skip to content

Commit cb2e3c6

Browse files
authored
Expose OpenSSL wrappers (#6895)
1 parent 300e5f2 commit cb2e3c6

28 files changed

+30
-26
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
[6.0.0-rc1]: https://github.com/microsoft/CCF/releases/tag/6.0.0-rc1
1111

12+
### Changed
13+
14+
- `ccf/crypto/openssl/openssl_wrappers.h` is now exposed.
15+
1216
### Added
1317

1418
- The `read-ledger.py` tool now has a `--recovery` argument, which will allow it to parse `.recovery` files. Previously these were ignored (#6896).

src/clients/tls_client.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5+
#include "ccf/crypto/openssl/openssl_wrappers.h"
56
#include "ccf/ds/logger.h"
6-
#include "crypto/openssl/openssl_wrappers.h"
77
#include "tls/ca.h"
88
#include "tls/cert.h"
99

src/crypto/csr.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5+
#include "ccf/crypto/openssl/openssl_wrappers.h"
56
#include "ccf/crypto/pem.h"
6-
#include "crypto/openssl/openssl_wrappers.h"
77

88
#include <openssl/bio.h>
99

src/crypto/ecdsa.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the Apache 2.0 License.
33
#include "ccf/crypto/ecdsa.h"
44

5-
#include "crypto/openssl/openssl_wrappers.h"
5+
#include "ccf/crypto/openssl/openssl_wrappers.h"
66
#include "crypto/openssl/public_key.h"
77

88
#include <openssl/bn.h>

src/crypto/key_exchange.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#pragma once
44

55
#include "ccf/crypto/key_pair.h"
6+
#include "ccf/crypto/openssl/openssl_wrappers.h"
67
#include "ccf/ds/logger.h"
7-
#include "crypto/openssl/openssl_wrappers.h"
88
#include "crypto/openssl/public_key.h"
99

1010
#include <iostream>

src/crypto/openssl/base64.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5+
#include "ccf/crypto/openssl/openssl_wrappers.h"
56
#include "ccf/ds/logger.h"
6-
#include "crypto/openssl/openssl_wrappers.h"
77

88
#include <openssl/err.h>
99
#include <openssl/evp.h>

src/crypto/openssl/cose_verifier.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
#include "crypto/openssl/cose_verifier.h"
55

6+
#include "ccf/crypto/openssl/openssl_wrappers.h"
67
#include "ccf/crypto/public_key.h"
78
#include "ccf/ds/logger.h"
89
#include "crypto/openssl/cose_sign.h"
9-
#include "crypto/openssl/openssl_wrappers.h"
1010
#include "crypto/openssl/rsa_key_pair.h"
1111
#include "x509_time.h"
1212

src/crypto/openssl/cose_verifier.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#pragma once
44

55
#include "ccf/crypto/cose_verifier.h"
6+
#include "ccf/crypto/openssl/openssl_wrappers.h"
67
#include "ccf/crypto/rsa_key_pair.h"
78
#include "ccf/crypto/verifier.h"
8-
#include "crypto/openssl/openssl_wrappers.h"
99
#include "crypto/openssl/public_key.h"
1010

1111
#include <chrono>

src/crypto/openssl/eddsa_key_pair.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include "crypto/openssl/eddsa_key_pair.h"
55

6-
#include "openssl_wrappers.h"
6+
#include "ccf/crypto/openssl/openssl_wrappers.h"
77

88
namespace ccf::crypto
99
{

src/crypto/openssl/eddsa_key_pair.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#pragma once
44

55
#include "ccf/crypto/eddsa_key_pair.h"
6+
#include "ccf/crypto/openssl/openssl_wrappers.h"
67
#include "crypto/openssl/eddsa_public_key.h"
7-
#include "openssl_wrappers.h"
88

99
namespace ccf::crypto
1010
{

src/crypto/openssl/eddsa_public_key.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the Apache 2.0 License.
33

4+
#include "ccf/crypto/openssl/openssl_wrappers.h"
45
#include "crypto/openssl/eddsa_key_pair.h"
56
#include "crypto/openssl/hash.h"
6-
#include "openssl_wrappers.h"
77

88
namespace ccf::crypto
99
{

src/crypto/openssl/entropy.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#pragma once
44

55
#include "ccf/crypto/entropy.h"
6-
#include "openssl_wrappers.h"
6+
#include "ccf/crypto/openssl/openssl_wrappers.h"
77

88
#include <functional>
99
#include <memory>

src/crypto/openssl/hash.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#pragma once
44

55
#include "ccf/crypto/hash_provider.h"
6-
#include "openssl_wrappers.h"
6+
#include "ccf/crypto/openssl/openssl_wrappers.h"
77

88
#include <openssl/evp.h>
99
#include <openssl/kdf.h>

src/crypto/openssl/key_pair.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
#include "crypto/openssl/key_pair.h"
55

66
#include "ccf/crypto/curve.h"
7+
#include "ccf/crypto/openssl/openssl_wrappers.h"
78
#include "crypto/openssl/hash.h"
89
#include "crypto/openssl/public_key.h"
9-
#include "openssl_wrappers.h"
1010
#include "x509_time.h"
1111

1212
#define FMT_HEADER_ONLY

src/crypto/openssl/key_pair.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#pragma once
44

55
#include "ccf/crypto/key_pair.h"
6+
#include "ccf/crypto/openssl/openssl_wrappers.h"
67
#include "ccf/crypto/public_key.h"
78
#include "crypto/openssl/public_key.h"
8-
#include "openssl_wrappers.h"
99

1010
#include <optional>
1111
#include <stdexcept>

src/crypto/openssl/public_key.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
#include "crypto/openssl/public_key.h"
55

6+
#include "ccf/crypto/openssl/openssl_wrappers.h"
67
#include "ccf/ds/logger.h"
78
#include "crypto/openssl/hash.h"
8-
#include "openssl_wrappers.h"
99

1010
#include <openssl/ec.h>
1111
#include <openssl/engine.h>

src/crypto/openssl/public_key.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5+
#include "ccf/crypto/openssl/openssl_wrappers.h"
56
#include "ccf/crypto/public_key.h"
6-
#include "openssl_wrappers.h"
77

88
#include <openssl/err.h>
99
#include <openssl/evp.h>

src/crypto/openssl/rsa_key_pair.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#include "crypto/openssl/rsa_key_pair.h"
55

6+
#include "ccf/crypto/openssl/openssl_wrappers.h"
67
#include "crypto/openssl/hash.h"
7-
#include "openssl_wrappers.h"
88

99
#if defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_MAJOR >= 3
1010
# include <openssl/core_names.h>

src/crypto/openssl/rsa_public_key.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the Apache 2.0 License.
33

4+
#include "ccf/crypto/openssl/openssl_wrappers.h"
45
#include "crypto/openssl/hash.h"
56
#include "crypto/openssl/rsa_key_pair.h"
6-
#include "openssl_wrappers.h"
77

88
#if defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_MAJOR >= 3
99
# include <openssl/core_names.h>

src/crypto/openssl/symmetric_key.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
#include "crypto/openssl/symmetric_key.h"
55

6+
#include "ccf/crypto/openssl/openssl_wrappers.h"
67
#include "ccf/crypto/symmetric_key.h"
78
#include "ccf/ds/logger.h"
8-
#include "crypto/openssl/openssl_wrappers.h"
99
#include "ds/thread_messaging.h"
1010

1111
#include <openssl/aes.h>

src/crypto/openssl/symmetric_key.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5+
#include "ccf/crypto/openssl/openssl_wrappers.h"
56
#include "ccf/crypto/symmetric_key.h"
6-
#include "openssl_wrappers.h"
77

88
#include <openssl/crypto.h>
99

src/crypto/openssl/verifier.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
#include "crypto/openssl/verifier.h"
55

6+
#include "ccf/crypto/openssl/openssl_wrappers.h"
67
#include "ccf/crypto/public_key.h"
78
#include "ccf/ds/logger.h"
8-
#include "crypto/openssl/openssl_wrappers.h"
99
#include "crypto/openssl/rsa_key_pair.h"
1010
#include "x509_time.h"
1111

src/crypto/openssl/verifier.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5+
#include "ccf/crypto/openssl/openssl_wrappers.h"
56
#include "ccf/crypto/verifier.h"
6-
#include "crypto/openssl/openssl_wrappers.h"
77

88
#include <chrono>
99
#include <openssl/x509.h>

src/crypto/openssl/x509_time.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5+
#include "ccf/crypto/openssl/openssl_wrappers.h"
56
#include "ccf/ds/x509_time_fmt.h"
6-
#include "openssl_wrappers.h"
77

88
#include <openssl/asn1.h>
99

src/tls/ca.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5+
#include "ccf/crypto/openssl/openssl_wrappers.h"
56
#include "ccf/crypto/pem.h"
6-
#include "crypto/openssl/openssl_wrappers.h"
77

88
#include <exception>
99

src/tls/cert.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5+
#include "ccf/crypto/openssl/openssl_wrappers.h"
56
#include "crypto/openssl/key_pair.h"
6-
#include "crypto/openssl/openssl_wrappers.h"
77
#include "tls/ca.h"
88

99
#include <cstring>

src/tls/tls.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
// Once we refactor the code to match the OpenSSL style we may not need this.
2424
#define TLS_ERR_X509_VERIFY INT_MIN
2525

26-
#include "crypto/openssl/openssl_wrappers.h"
26+
#include "ccf/crypto/openssl/openssl_wrappers.h"
2727

2828
#include <string>
2929

0 commit comments

Comments
 (0)