common/run_cmd.h\
common/safe_io.h\
common/config.h\
+ common/ceph_crypto.h\
crush/CrushWrapper.h\
crush/CrushWrapper.i\
crush/builder.h\
--- /dev/null
+#ifndef CEPH_CRYPTO_H
+#define CEPH_CRYPTO_H
+
+#include "acconfig.h"
+
+#ifdef USE_CRYPTOPP
+# define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
+# include <cryptopp/md5.h>
+namespace ceph {
+ namespace crypto {
+ static inline void init() {
+ // nothing
+ }
+ using CryptoPP::Weak::MD5;
+ }
+}
+#elif USE_NSS
+# error "TODO NSS support for md5"
+#else
+# error "No supported crypto implementation found."
+#endif
+
+#endif
#ifndef CEPH_RGW_COMMON_H
#define CEPH_RGW_COMMON_H
+#include "common/ceph_crypto.h"
#include "fcgiapp.h"
#include <string.h>
-#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
-#include <cryptopp/md5.h>
#include <string>
#include <map>
#include "include/types.h"
std::string name;
size_t size;
time_t mtime;
- char etag[CryptoPP::Weak::MD5::DIGESTSIZE * 2 + 1];
+ // two md5 digests and a terminator
+ char etag[ceph::crypto::MD5::DIGESTSIZE * 2 + 1];
void encode(bufferlist& bl) const {
__u8 struct_v = 1;
sighandler_usr1 = signal(SIGUSR1, godown_handler);
sighandler_alrm = signal(SIGALRM, godown_alarm);
+ ceph::crypto::init();
+
while (FCGX_Accept(&fcgx.in, &fcgx.out, &fcgx.err, &fcgx.envp) >= 0)
{
rgwhandler.init_state(&s, &fcgx);
#include "rgw_user.h"
using namespace std;
-using namespace CryptoPP::Weak;
+using ceph::crypto::MD5;
static int parse_range(const char *range, off_t& ofs, off_t& end)
{