[pkg-opensc-commit] [opensc] 89/295: sm: no SHA256 for OpenSSL version < 0.9.8
Eric Dorland
eric at moszumanska.debian.org
Sat Jun 24 21:11:19 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository opensc.
commit 3b352d5eca6d8ff2212829c8d0a9eb7240b8c2e1
Author: Viktor Tarasov <viktor.tarasov at gmail.com>
Date: Wed Oct 5 11:03:40 2016 +0200
sm: no SHA256 for OpenSSL version < 0.9.8
---
src/smm/sm-cwa14890.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/smm/sm-cwa14890.c b/src/smm/sm-cwa14890.c
index 1d0dcb8..73bd05a 100644
--- a/src/smm/sm-cwa14890.c
+++ b/src/smm/sm-cwa14890.c
@@ -204,6 +204,7 @@ sm_cwa_init_session_keys(struct sc_context *ctx, struct sm_cwa_session *session_
memcpy(&session_data->session_mac[0], buff, sizeof(session_data->session_mac));
}
else if (mechanism == IASECC_ALGORITHM_SYMMETRIC_SHA256) {
+#if OPENSSL_VERSION_NUMBER >= 0x00908000L
xored[35] = 0x01;
SHA256(xored, 36, buff);
memcpy(&session_data->session_enc[0], buff, sizeof(session_data->session_enc));
@@ -211,6 +212,10 @@ sm_cwa_init_session_keys(struct sc_context *ctx, struct sm_cwa_session *session_
xored[35] = 0x02;
SHA256(xored, 36, buff);
memcpy(&session_data->session_mac[0], buff, sizeof(session_data->session_mac));
+#else
+ sc_log(ctx, "No FIPS, SHA256 is not supported");
+ return SC_ERROR_INVALID_ARGUMENTS;
+#endif
}
else {
return SC_ERROR_INVALID_ARGUMENTS;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git
More information about the pkg-opensc-commit
mailing list