aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/cert
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-05-09 18:23:24 -0400
committerJack Lloyd <[email protected]>2016-05-09 18:23:24 -0400
commit2d0bafb646e238978bce966b9adae31fa92fb26b (patch)
treef0c1cd1397294ddea9c867643333c35603323b2b /src/lib/cert
parent5dd6fbc45b356fa34717e77bc252392016baf8a9 (diff)
parenta0a2b66b3b6ba9dd94f924ef9639570f4a4ae2b6 (diff)
Merge GH #484 use explicit casts to avoids MSVC warning C4267
Diffstat (limited to 'src/lib/cert')
-rw-r--r--src/lib/cert/x509/x509_ext.cpp4
-rw-r--r--src/lib/cert/x509/x509cert.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/cert/x509/x509_ext.cpp b/src/lib/cert/x509/x509_ext.cpp
index b54c82b87..85d40bf21 100644
--- a/src/lib/cert/x509/x509_ext.cpp
+++ b/src/lib/cert/x509/x509_ext.cpp
@@ -246,7 +246,7 @@ void Basic_Constraints::decode_inner(const std::vector<byte>& in)
void Basic_Constraints::contents_to(Data_Store& subject, Data_Store&) const
{
subject.add("X509v3.BasicConstraints.is_ca", (m_is_ca ? 1 : 0));
- subject.add("X509v3.BasicConstraints.path_constraint", m_path_limit);
+ subject.add("X509v3.BasicConstraints.path_constraint", static_cast<u32bit>(m_path_limit));
}
/*
@@ -744,7 +744,7 @@ void CRL_Number::decode_inner(const std::vector<byte>& in)
*/
void CRL_Number::contents_to(Data_Store& info, Data_Store&) const
{
- info.add("X509v3.CRLNumber", m_crl_number);
+ info.add("X509v3.CRLNumber", static_cast<u32bit>(m_crl_number));
}
/*
diff --git a/src/lib/cert/x509/x509cert.cpp b/src/lib/cert/x509/x509cert.cpp
index f68956859..d7da00af0 100644
--- a/src/lib/cert/x509/x509cert.cpp
+++ b/src/lib/cert/x509/x509cert.cpp
@@ -159,7 +159,7 @@ void X509_Certificate::force_decode()
if(tbs_cert.more_items())
throw Decoding_Error("TBSCertificate has more items that expected");
- m_subject.add("X509.Certificate.version", version);
+ m_subject.add("X509.Certificate.version", static_cast<u32bit>(version));
m_subject.add("X509.Certificate.serial", BigInt::encode(serial_bn));
m_subject.add("X509.Certificate.start", start.to_string());
m_subject.add("X509.Certificate.end", end.to_string());
@@ -182,7 +182,7 @@ void X509_Certificate::force_decode()
const size_t limit = (x509_version() < 3) ?
Cert_Extension::NO_CERT_PATH_LIMIT : 0;
- m_subject.add("X509v3.BasicConstraints.path_constraint", limit);
+ m_subject.add("X509v3.BasicConstraints.path_constraint", static_cast<u32bit>(limit));
}
}