]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Changed dir structure of crypto/isal
authorAdam Kupczyk <akupczyk@mirantis.com>
Mon, 13 Feb 2017 14:29:09 +0000 (15:29 +0100)
committerAdam Kupczyk <akupczyk@mirantis.com>
Wed, 5 Apr 2017 16:31:17 +0000 (18:31 +0200)
Signed-off-by: Adam Kupczyk <akupczyk@mirantis.com>
19 files changed:
.gitmodules
src/CMakeLists.txt
src/crypto/crypto_accel.h [new file with mode: 0644]
src/crypto/crypto_plugin.h [new file with mode: 0644]
src/crypto/isa-l/CMakeLists.txt [new file with mode: 0644]
src/crypto/isa-l/isa-l_crypto [new submodule]
src/crypto/isa-l/isal_crypto_accel.cc [new file with mode: 0644]
src/crypto/isa-l/isal_crypto_accel.h [new file with mode: 0644]
src/crypto/isa-l/isal_crypto_plugin.cc [new file with mode: 0644]
src/crypto/isa-l/isal_crypto_plugin.h [new file with mode: 0644]
src/isa-l_crypto [deleted submodule]
src/isa-l_crypto_plugin/CMakeLists.txt [deleted file]
src/isa-l_crypto_plugin/crypto_accel.h [deleted file]
src/isa-l_crypto_plugin/crypto_plugin.h [deleted file]
src/isa-l_crypto_plugin/isal_crypto_accel.cc [deleted file]
src/isa-l_crypto_plugin/isal_crypto_accel.h [deleted file]
src/isa-l_crypto_plugin/isal_crypto_plugin.cc [deleted file]
src/isa-l_crypto_plugin/isal_crypto_plugin.h [deleted file]
src/rgw/rgw_crypt.cc

index 8290e69a40b8751a515a01a62b6a5d24807adf31..aa04fde04462afa88a76ef7e79d50451cc9534af 100644 (file)
@@ -49,6 +49,6 @@
 [submodule "src/zstd"]
        path = src/zstd
        url = https://github.com/facebook/zstd
-[submodule "src/isa-l_crypto"]
-       path = src/isa-l_crypto
+[submodule "src/crypto/isa-l/isa-l_crypto"]
+       path = src/crypto/isa-l/isa-l_crypto
        url = https://github.com/01org/isa-l_crypto
index 1f3e3e3b5f84c805a3c4cd482ad3de5f87f8ca9c..260549a09492dca5b160baa3b8baf62ead1be9f8 100644 (file)
@@ -837,7 +837,7 @@ add_subdirectory(compressor)
 
 add_subdirectory(tools)
 
-add_subdirectory(isa-l_crypto_plugin)
+add_subdirectory(crypto/isa-l)
 
 if(WITH_TESTS)
 
diff --git a/src/crypto/crypto_accel.h b/src/crypto/crypto_accel.h
new file mode 100644 (file)
index 0000000..caefa38
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2016 Mirantis, Inc.
+ *
+ * Author: Adam Kupczyk <akupczyk@mirantis.com>
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef CRYPTO_ACCEL_H
+#define CRYPTO_ACCEL_H
+#include <cstddef>
+#include "include/Context.h"
+
+class CryptoAccel;
+typedef ceph::shared_ptr<CryptoAccel> CryptoAccelRef;
+
+class CryptoAccel {
+ public:
+  CryptoAccel() {}
+  virtual ~CryptoAccel() {}
+
+  static const int AES_256_IVSIZE = 128/8;
+  static const int AES_256_KEYSIZE = 256/8;
+  virtual bool cbc_encrypt(unsigned char* out, const unsigned char* in, size_t size,
+                   const unsigned char (&iv)[AES_256_IVSIZE],
+                   const unsigned char (&key)[AES_256_KEYSIZE]) = 0;
+  virtual bool cbc_decrypt(unsigned char* out, const unsigned char* in, size_t size,
+                   const unsigned char (&iv)[AES_256_IVSIZE],
+                   const unsigned char (&key)[AES_256_KEYSIZE]) = 0;
+};
+#endif
diff --git a/src/crypto/crypto_plugin.h b/src/crypto/crypto_plugin.h
new file mode 100644 (file)
index 0000000..ff91b11
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2016 Mirantis, Inc.
+ *
+ * Author: Adam Kupczyk <akupczyk@mirantis.com>
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef CRYPTO_PLUGIN_H
+#define CRYPTO_PLUGIN_H
+
+// -----------------------------------------------------------------------------
+#include "include/memory.h"
+#include "common/PluginRegistry.h"
+#include "ostream"
+
+#include "crypto/crypto_accel.h"
+// -----------------------------------------------------------------------------
+
+class CryptoPlugin : public Plugin {
+
+public:
+  explicit CryptoPlugin(CephContext* cct) : Plugin(cct)
+  {}
+  ~CryptoPlugin()
+  {}
+  virtual int factory(CryptoAccelRef *cs,
+                      std::ostream *ss) = 0;
+};
+#endif
diff --git a/src/crypto/isa-l/CMakeLists.txt b/src/crypto/isa-l/CMakeLists.txt
new file mode 100644 (file)
index 0000000..49a0187
--- /dev/null
@@ -0,0 +1,38 @@
+set(isal_dir ${CMAKE_SOURCE_DIR}/src/crypto/isa-l/isa-l_crypto)
+
+set(isal_crypto_plugin_srcs
+  isal_crypto_accel.cc 
+  isal_crypto_plugin.cc
+  ${isal_dir}/aes/cbc_pre.c
+  ${isal_dir}/aes/cbc_multibinary.asm
+  ${isal_dir}/aes/keyexp_128.asm
+  ${isal_dir}/aes/keyexp_192.asm
+  ${isal_dir}/aes/keyexp_256.asm
+  ${isal_dir}/aes/keyexp_multibinary.asm
+  ${isal_dir}/aes/cbc_dec_128_x4_sse.asm
+  ${isal_dir}/aes/cbc_dec_128_x8_avx.asm
+  ${isal_dir}/aes/cbc_dec_192_x4_sse.asm
+  ${isal_dir}/aes/cbc_dec_192_x8_avx.asm
+  ${isal_dir}/aes/cbc_dec_256_x4_sse.asm
+  ${isal_dir}/aes/cbc_dec_256_x8_avx.asm
+  ${isal_dir}/aes/cbc_enc_128_x4_sb.asm
+  ${isal_dir}/aes/cbc_enc_128_x8_sb.asm
+  ${isal_dir}/aes/cbc_enc_192_x4_sb.asm
+  ${isal_dir}/aes/cbc_enc_192_x8_sb.asm
+  ${isal_dir}/aes/cbc_enc_256_x4_sb.asm
+  ${isal_dir}/aes/cbc_enc_256_x8_sb.asm)
+
+add_library(isal_crypto_plugin_objs OBJECT ${isal_crypto_plugin_srcs})
+target_include_directories(isal_crypto_plugin_objs PRIVATE ${isal_dir}/include)
+set(isal_crypto_plugin_dir ${CMAKE_INSTALL_PKGLIBDIR}/crypto)
+
+add_custom_target(crypto_plugins)
+if(HAVE_GOOD_YASM_ELF64)
+add_dependencies(crypto_plugins ceph_crypto_isal)
+endif(HAVE_GOOD_YASM_ELF64)
+
+add_library(ceph_crypto_isal SHARED ${isal_crypto_plugin_srcs})
+target_include_directories(ceph_crypto_isal PRIVATE ${isal_dir}/include)
+add_dependencies(ceph_crypto_isal ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
+set_target_properties(ceph_crypto_isal PROPERTIES VERSION 1.0.0 SOVERSION 1)
+install(TARGETS ceph_crypto_isal DESTINATION ${isal_crypto_plugin_dir})
diff --git a/src/crypto/isa-l/isa-l_crypto b/src/crypto/isa-l/isa-l_crypto
new file mode 160000 (submodule)
index 0000000..603529a
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 603529a4e06ac8a1662c13d6b31f122e21830352
diff --git a/src/crypto/isa-l/isal_crypto_accel.cc b/src/crypto/isa-l/isal_crypto_accel.cc
new file mode 100644 (file)
index 0000000..7dccf64
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2016 Mirantis, Inc.
+ *
+ * Author: Adam Kupczyk <akupczyk@mirantis.com>
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#include "crypto/isa-l/isal_crypto_accel.h"
+
+#include "crypto/isa-l/isa-l_crypto/include/aes_cbc.h"
+
+bool ISALCryptoAccel::cbc_encrypt(unsigned char* out, const unsigned char* in, size_t size,
+                             const unsigned char (&iv)[AES_256_IVSIZE],
+                             const unsigned char (&key)[AES_256_KEYSIZE])
+{
+  if ((size % AES_256_IVSIZE) != 0) {
+    return false;
+  }
+  alignas(16) struct cbc_key_data keys_blk;
+  aes_cbc_precomp(const_cast<unsigned char*>(&key[0]), AES_256_KEYSIZE, &keys_blk);
+  aes_cbc_enc_256(const_cast<unsigned char*>(in),
+                  const_cast<unsigned char*>(&iv[0]), keys_blk.enc_keys, out, size);
+  return true;
+}
+bool ISALCryptoAccel::cbc_decrypt(unsigned char* out, const unsigned char* in, size_t size,
+                             const unsigned char (&iv)[AES_256_IVSIZE],
+                             const unsigned char (&key)[AES_256_KEYSIZE])
+{
+  if ((size % AES_256_IVSIZE) != 0) {
+    return false;
+  }
+  alignas(16) struct cbc_key_data keys_blk;
+  aes_cbc_precomp(const_cast<unsigned char*>(&key[0]), AES_256_KEYSIZE, &keys_blk);
+  aes_cbc_dec_256(const_cast<unsigned char*>(in), const_cast<unsigned char*>(&iv[0]), keys_blk.dec_keys, out, size);
+  return true;
+}
diff --git a/src/crypto/isa-l/isal_crypto_accel.h b/src/crypto/isa-l/isal_crypto_accel.h
new file mode 100644 (file)
index 0000000..84331bb
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2016 Mirantis, Inc.
+ *
+ * Author: Adam Kupczyk <akupczyk@mirantis.com>
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef ISAL_CRYPTO_ACCEL_H
+#define ISAL_CRYPTO_ACCEL_H
+#include "crypto/crypto_accel.h"
+
+class ISALCryptoAccel : public CryptoAccel {
+ public:
+  ISALCryptoAccel() {}
+  virtual ~ISALCryptoAccel() {}
+
+  bool cbc_encrypt(unsigned char* out, const unsigned char* in, size_t size,
+                   const unsigned char (&iv)[AES_256_IVSIZE],
+                   const unsigned char (&key)[AES_256_KEYSIZE]) override;
+  bool cbc_decrypt(unsigned char* out, const unsigned char* in, size_t size,
+                   const unsigned char (&iv)[AES_256_IVSIZE],
+                   const unsigned char (&key)[AES_256_KEYSIZE]) override;
+};
+#endif
diff --git a/src/crypto/isa-l/isal_crypto_plugin.cc b/src/crypto/isa-l/isal_crypto_plugin.cc
new file mode 100644 (file)
index 0000000..6101dda
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2016 Mirantis, Inc.
+ *
+ * Author: Adam Kupczyk <akupczykd@mirantis.com>
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+
+// -----------------------------------------------------------------------------
+#include "crypto/isa-l/isal_crypto_plugin.h"
+
+#include "ceph_ver.h"
+// -----------------------------------------------------------------------------
+
+const char *__ceph_plugin_version()
+{
+  return CEPH_GIT_NICE_VER;
+}
+
+int __ceph_plugin_init(CephContext *cct,
+                       const std::string& type,
+                       const std::string& name)
+{
+  PluginRegistry *instance = cct->get_plugin_registry();
+
+  return instance->add(type, name, new ISALCryptoPlugin(cct));
+}
diff --git a/src/crypto/isa-l/isal_crypto_plugin.h b/src/crypto/isa-l/isal_crypto_plugin.h
new file mode 100644 (file)
index 0000000..7f30da7
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2016 Mirantis, Inc.
+ *
+ * Author: Adam Kupczyk <akupczyk@mirantis.com>
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef ISAL_CRYPTO_PLUGIN_H
+#define ISAL_CRYPTO_PLUGIN_H
+// -----------------------------------------------------------------------------
+#include "crypto/crypto_plugin.h"
+#include "crypto/isa-l/isal_crypto_accel.h"
+// -----------------------------------------------------------------------------
+
+
+class ISALCryptoPlugin : public CryptoPlugin {
+
+  CryptoAccelRef cryptoaccel;
+public:
+
+  explicit ISALCryptoPlugin(CephContext* cct) : CryptoPlugin(cct)
+  {}
+  ~ISALCryptoPlugin()
+  {}
+  virtual int factory(CryptoAccelRef *cs,
+                      ostream *ss)
+  {
+    if (cryptoaccel == nullptr)
+    {
+      cryptoaccel = CryptoAccelRef(new ISALCryptoAccel);
+    }
+    *cs = cryptoaccel;
+    return 0;
+  }
+};
+#endif
diff --git a/src/isa-l_crypto b/src/isa-l_crypto
deleted file mode 160000 (submodule)
index 7a7baca..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 7a7baca8599811141b6c657c8d3c47c12a855066
diff --git a/src/isa-l_crypto_plugin/CMakeLists.txt b/src/isa-l_crypto_plugin/CMakeLists.txt
deleted file mode 100644 (file)
index 7cf8369..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-set(isal_dir ${CMAKE_SOURCE_DIR}/src/isa-l_crypto)
-
-set(isal_crypto_plugin_srcs
-  isal_crypto_accel.cc 
-  isal_crypto_plugin.cc
-  ${isal_dir}/aes/cbc_pre.c
-  ${isal_dir}/aes/cbc_multibinary.asm
-  ${isal_dir}/aes/keyexp_128.asm
-  ${isal_dir}/aes/keyexp_192.asm
-  ${isal_dir}/aes/keyexp_256.asm
-  ${isal_dir}/aes/keyexp_multibinary.asm
-  ${isal_dir}/aes/cbc_dec_128_x4_sse.asm
-  ${isal_dir}/aes/cbc_dec_128_x8_avx.asm
-  ${isal_dir}/aes/cbc_dec_192_x4_sse.asm
-  ${isal_dir}/aes/cbc_dec_192_x8_avx.asm
-  ${isal_dir}/aes/cbc_dec_256_x4_sse.asm
-  ${isal_dir}/aes/cbc_dec_256_x8_avx.asm
-  ${isal_dir}/aes/cbc_enc_128_x4_sb.asm
-  ${isal_dir}/aes/cbc_enc_128_x8_sb.asm
-  ${isal_dir}/aes/cbc_enc_192_x4_sb.asm
-  ${isal_dir}/aes/cbc_enc_192_x8_sb.asm
-  ${isal_dir}/aes/cbc_enc_256_x4_sb.asm
-  ${isal_dir}/aes/cbc_enc_256_x8_sb.asm)
-
-add_library(isal_crypto_plugin_objs OBJECT ${isal_crypto_plugin_srcs})
-target_include_directories(isal_crypto_plugin_objs PRIVATE ${isal_dir}/include)
-set(isal_crypto_plugin_dir ${CMAKE_INSTALL_PKGLIBDIR}/crypto)
-
-add_custom_target(crypto_plugins)
-if(HAVE_GOOD_YASM_ELF64)
-add_dependencies(crypto_plugins ceph_crypto_isal)
-endif(HAVE_GOOD_YASM_ELF64)
-
-add_library(ceph_crypto_isal SHARED ${isal_crypto_plugin_srcs})
-target_include_directories(ceph_crypto_isal PRIVATE ${isal_dir}/include)
-add_dependencies(ceph_crypto_isal ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
-set_target_properties(ceph_crypto_isal PROPERTIES VERSION 1.0.0 SOVERSION 1)
-install(TARGETS ceph_crypto_isal DESTINATION ${isal_crypto_plugin_dir})
diff --git a/src/isa-l_crypto_plugin/crypto_accel.h b/src/isa-l_crypto_plugin/crypto_accel.h
deleted file mode 100644 (file)
index caefa38..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2016 Mirantis, Inc.
- *
- * Author: Adam Kupczyk <akupczyk@mirantis.com>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#ifndef CRYPTO_ACCEL_H
-#define CRYPTO_ACCEL_H
-#include <cstddef>
-#include "include/Context.h"
-
-class CryptoAccel;
-typedef ceph::shared_ptr<CryptoAccel> CryptoAccelRef;
-
-class CryptoAccel {
- public:
-  CryptoAccel() {}
-  virtual ~CryptoAccel() {}
-
-  static const int AES_256_IVSIZE = 128/8;
-  static const int AES_256_KEYSIZE = 256/8;
-  virtual bool cbc_encrypt(unsigned char* out, const unsigned char* in, size_t size,
-                   const unsigned char (&iv)[AES_256_IVSIZE],
-                   const unsigned char (&key)[AES_256_KEYSIZE]) = 0;
-  virtual bool cbc_decrypt(unsigned char* out, const unsigned char* in, size_t size,
-                   const unsigned char (&iv)[AES_256_IVSIZE],
-                   const unsigned char (&key)[AES_256_KEYSIZE]) = 0;
-};
-#endif
diff --git a/src/isa-l_crypto_plugin/crypto_plugin.h b/src/isa-l_crypto_plugin/crypto_plugin.h
deleted file mode 100644 (file)
index e941c9f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2016 Mirantis, Inc.
- *
- * Author: Adam Kupczyk <akupczyk@mirantis.com>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#ifndef CRYPTO_PLUGIN_H
-#define CRYPTO_PLUGIN_H
-
-// -----------------------------------------------------------------------------
-#include "include/memory.h"
-#include "common/PluginRegistry.h"
-#include "ostream"
-
-#include "../isa-l_crypto_plugin/crypto_accel.h"
-// -----------------------------------------------------------------------------
-
-class CryptoPlugin : public Plugin {
-
-public:
-  explicit CryptoPlugin(CephContext* cct) : Plugin(cct)
-  {}
-  ~CryptoPlugin()
-  {}
-  virtual int factory(CryptoAccelRef *cs,
-                      std::ostream *ss) = 0;
-};
-#endif
diff --git a/src/isa-l_crypto_plugin/isal_crypto_accel.cc b/src/isa-l_crypto_plugin/isal_crypto_accel.cc
deleted file mode 100644 (file)
index 91547c2..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2016 Mirantis, Inc.
- *
- * Author: Adam Kupczyk <akupczyk@mirantis.com>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#include "../isa-l_crypto_plugin/isal_crypto_accel.h"
-
-#include <isa-l_crypto/include/aes_cbc.h>
-
-bool ISALCryptoAccel::cbc_encrypt(unsigned char* out, const unsigned char* in, size_t size,
-                             const unsigned char (&iv)[AES_256_IVSIZE],
-                             const unsigned char (&key)[AES_256_KEYSIZE])
-{
-  if ((size % AES_256_IVSIZE) != 0) {
-    return false;
-  }
-  alignas(16) struct cbc_key_data keys_blk;
-  aes_cbc_precomp(const_cast<unsigned char*>(&key[0]), AES_256_KEYSIZE, &keys_blk);
-  aes_cbc_enc_256(const_cast<unsigned char*>(in),
-                  const_cast<unsigned char*>(&iv[0]), keys_blk.enc_keys, out, size);
-  return true;
-}
-bool ISALCryptoAccel::cbc_decrypt(unsigned char* out, const unsigned char* in, size_t size,
-                             const unsigned char (&iv)[AES_256_IVSIZE],
-                             const unsigned char (&key)[AES_256_KEYSIZE])
-{
-  if ((size % AES_256_IVSIZE) != 0) {
-    return false;
-  }
-  alignas(16) struct cbc_key_data keys_blk;
-  aes_cbc_precomp(const_cast<unsigned char*>(&key[0]), AES_256_KEYSIZE, &keys_blk);
-  aes_cbc_dec_256(const_cast<unsigned char*>(in), const_cast<unsigned char*>(&iv[0]), keys_blk.dec_keys, out, size);
-  return true;
-}
diff --git a/src/isa-l_crypto_plugin/isal_crypto_accel.h b/src/isa-l_crypto_plugin/isal_crypto_accel.h
deleted file mode 100644 (file)
index d7c68fa..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2016 Mirantis, Inc.
- *
- * Author: Adam Kupczyk <akupczyk@mirantis.com>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#ifndef ISAL_CRYPTO_ACCEL_H
-#define ISAL_CRYPTO_ACCEL_H
-#include "../isa-l_crypto_plugin/crypto_accel.h"
-
-
-class ISALCryptoAccel : public CryptoAccel {
- public:
-  ISALCryptoAccel() {}
-  virtual ~ISALCryptoAccel() {}
-
-  bool cbc_encrypt(unsigned char* out, const unsigned char* in, size_t size,
-                   const unsigned char (&iv)[AES_256_IVSIZE],
-                   const unsigned char (&key)[AES_256_KEYSIZE]) override;
-  bool cbc_decrypt(unsigned char* out, const unsigned char* in, size_t size,
-                   const unsigned char (&iv)[AES_256_IVSIZE],
-                   const unsigned char (&key)[AES_256_KEYSIZE]) override;
-};
-#endif
diff --git a/src/isa-l_crypto_plugin/isal_crypto_plugin.cc b/src/isa-l_crypto_plugin/isal_crypto_plugin.cc
deleted file mode 100644 (file)
index 9ac0b88..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2016 Mirantis, Inc.
- *
- * Author: Adam Kupczyk <akupczykd@mirantis.com>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-
-// -----------------------------------------------------------------------------
-#include "../isa-l_crypto_plugin/isal_crypto_plugin.h"
-
-#include "ceph_ver.h"
-// -----------------------------------------------------------------------------
-
-const char *__ceph_plugin_version()
-{
-  return CEPH_GIT_NICE_VER;
-}
-
-int __ceph_plugin_init(CephContext *cct,
-                       const std::string& type,
-                       const std::string& name)
-{
-  PluginRegistry *instance = cct->get_plugin_registry();
-
-  return instance->add(type, name, new ISALCryptoPlugin(cct));
-}
diff --git a/src/isa-l_crypto_plugin/isal_crypto_plugin.h b/src/isa-l_crypto_plugin/isal_crypto_plugin.h
deleted file mode 100644 (file)
index af97ba9..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2016 Mirantis, Inc.
- *
- * Author: Adam Kupczyk <akupczyk@mirantis.com>
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- */
-
-#ifndef ISAL_CRYPTO_PLUGIN_H
-#define ISAL_CRYPTO_PLUGIN_H
-// -----------------------------------------------------------------------------
-#include "../isa-l_crypto_plugin/crypto_plugin.h"
-#include "../isa-l_crypto_plugin/isal_crypto_accel.h"
-// -----------------------------------------------------------------------------
-
-
-class ISALCryptoPlugin : public CryptoPlugin {
-
-  CryptoAccelRef cryptoaccel;
-public:
-
-  explicit ISALCryptoPlugin(CephContext* cct) : CryptoPlugin(cct)
-  {}
-  ~ISALCryptoPlugin()
-  {}
-  virtual int factory(CryptoAccelRef *cs,
-                      ostream *ss)
-  {
-    if (cryptoaccel == nullptr)
-    {
-      cryptoaccel = CryptoAccelRef(new ISALCryptoAccel);
-    }
-    *cs = cryptoaccel;
-    return 0;
-  }
-};
-#endif
index 8430155a79c741aefdf21fb0c6fad3e9151cbdfa..4f99cdc0b2c5fcaa5b25964b47b61684a4464e84 100644 (file)
@@ -12,8 +12,8 @@
 #include <boost/utility/string_ref.hpp>
 #include <rgw/rgw_keystone.h>
 #include "include/str_map.h"
-#include "isa-l_crypto_plugin/crypto_accel.h"
-#include "isa-l_crypto_plugin/crypto_plugin.h"
+#include "crypto/crypto_accel.h"
+#include "crypto/crypto_plugin.h"
 #ifdef USE_NSS
 # include <nspr.h>
 # include <nss.h>