diff options
author | Radoslaw Zarzynski <rzarzyns@redhat.com> | 2019-02-05 23:39:05 +0100 |
---|---|---|
committer | Radoslaw Zarzynski <rzarzyns@redhat.com> | 2019-02-21 21:54:18 +0100 |
commit | b2b06ea7b3372ea8123beb22e465f33fc1971b98 (patch) | |
tree | f688b4d10f21fefe90a9dcba9d6371776c2de671 /src/msg/async/crypto_onwire.h | |
parent | auth: introduce ceph::crypto::onwire interfaces. (diff) | |
download | ceph-b2b06ea7b3372ea8123beb22e465f33fc1971b98.tar.xz ceph-b2b06ea7b3372ea8123beb22e465f33fc1971b98.zip |
auth: implement ceph::crypto::onwire with OpenSSL EVP.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Diffstat (limited to 'src/msg/async/crypto_onwire.h')
-rw-r--r-- | src/msg/async/crypto_onwire.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/msg/async/crypto_onwire.h b/src/msg/async/crypto_onwire.h index d65a85f1c2a..64e1db99d24 100644 --- a/src/msg/async/crypto_onwire.h +++ b/src/msg/async/crypto_onwire.h @@ -16,8 +16,11 @@ #ifndef CEPH_CRYPTO_ONWIRE_H #define CEPH_CRYPTO_ONWIRE_H -#include "include/types.h" +#include <cstdint> +#include <memory> +#include "auth/Auth.h" +#include "include/buffer.h" namespace ceph::math { @@ -64,7 +67,7 @@ struct TxHandler { // bufferlist. The method MUST NOT be called after _final() if there // was no call to _reset(). virtual void authenticated_encrypt_update( - ceph::bufferlist&& plaintext) = 0; + const ceph::bufferlist& plaintext) = 0; // Generates authentication signature and returns bufferlist crafted // basing on plaintext from preceding call to _update(). @@ -100,11 +103,13 @@ struct rxtx_t { // Hmm, isn't that too much flexbility? std::unique_ptr<RxHandler> rx; std::unique_ptr<TxHandler> tx; + + static rxtx_t create_handler_pair( + CephContext* ctx, + const class AuthConnectionMeta& auth_meta, + bool crossed); }; -static rxtx_t create_stream_handler_pair( - CephContext* ctx, - const class AuthConnectionMeta& auth_meta); } // namespace ceph::crypto::onwire |