aboutsummaryrefslogtreecommitdiffstats
path: root/src/cms
diff options
context:
space:
mode:
Diffstat (limited to 'src/cms')
-rw-r--r--src/cms/cms_algo.cpp2
-rw-r--r--src/cms/cms_dec.cpp4
-rw-r--r--src/cms/cms_enc.cpp2
-rw-r--r--src/cms/info.txt2
4 files changed, 7 insertions, 3 deletions
diff --git a/src/cms/cms_algo.cpp b/src/cms/cms_algo.cpp
index 50384d85a..3c245cc6f 100644
--- a/src/cms/cms_algo.cpp
+++ b/src/cms/cms_algo.cpp
@@ -99,7 +99,7 @@ SecureVector<byte> CMS_Encoder::wrap_key(RandomNumberGenerator& rng,
throw Encoding_Error("CMS: 128-bit KEKs must be used with " + cipher);
SecureVector<byte> lcekpad;
- lcekpad.push_back((byte)cek.length());
+ lcekpad.push_back(static_cast<byte>(cek.length()));
lcekpad += cek.bits_of();
while(lcekpad.size() % 8)
lcekpad.push_back(rng.next_byte());
diff --git a/src/cms/cms_dec.cpp b/src/cms/cms_dec.cpp
index c86e1d0ae..a9f4e69d9 100644
--- a/src/cms/cms_dec.cpp
+++ b/src/cms/cms_dec.cpp
@@ -86,7 +86,9 @@ std::string CMS_Decoder::get_data() const
{
if(layer_type() != DATA)
throw Invalid_State("CMS: Cannot retrieve data from non-DATA layer");
- return std::string((const char*)&data[0], data.size());
+
+ return std::string(reinterpret_cast<const char*>(&data[0]),
+ data.size());
}
/*
diff --git a/src/cms/cms_enc.cpp b/src/cms/cms_enc.cpp
index cd739ef08..1a45a6a46 100644
--- a/src/cms/cms_enc.cpp
+++ b/src/cms/cms_enc.cpp
@@ -30,7 +30,7 @@ void CMS_Encoder::set_data(const byte buf[], size_t length)
*/
void CMS_Encoder::set_data(const std::string& str)
{
- set_data((const byte*)str.c_str(), str.length());
+ set_data(reinterpret_cast<const byte*>(str.c_str()), str.length());
}
/*
diff --git a/src/cms/info.txt b/src/cms/info.txt
index dc2110ae5..34e2c089c 100644
--- a/src/cms/info.txt
+++ b/src/cms/info.txt
@@ -1,5 +1,7 @@
define CMS
+load_on request
+
<requires>
asn1
bigint