]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_kmip_client.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
4 #include "common/Thread.h"
5 #include "include/compat.h"
6 #include "common/errno.h"
7 #include "rgw_common.h"
8 #include "rgw_kmip_client.h"
12 #define dout_context g_ceph_context
13 #define dout_subsys ceph_subsys_rgw
15 RGWKMIPManager
*rgw_kmip_manager
;
18 RGWKMIPTransceiver::wait(optional_yield y
)
22 std::unique_lock l
{lock
};
26 lderr(cct
) << "kmip process failed, " << ret
<< dendl
;
32 RGWKMIPTransceiver::send()
34 int r
= rgw_kmip_manager
->add_request(this);
36 lderr(cct
) << "kmip send failed, " << r
<< dendl
;
42 RGWKMIPTransceiver::process(optional_yield y
)
50 RGWKMIPTransceiver::~RGWKMIPTransceiver()
56 if (outlist
->strings
) {
57 for (i
= 0; i
< outlist
->string_count
; ++i
) {
58 free(outlist
->strings
[i
]);
60 free(outlist
->strings
);
64 ::ceph::crypto::zeroize_for_security(outkey
->data
, outkey
->keylen
);
71 rgw_kmip_client_init(RGWKMIPManager
&m
)
73 rgw_kmip_manager
= &m
;
74 rgw_kmip_manager
->start();
78 rgw_kmip_client_cleanup()
80 rgw_kmip_manager
->stop();
81 delete rgw_kmip_manager
;