crypto/ec/curve448/eddsa.c: fix EBCDIC platforms
authorPatrick Steuer <patrick.steuer@de.ibm.com>
Tue, 3 Mar 2020 12:29:03 +0000 (13:29 +0100)
committerPatrick Steuer <patrick.steuer@de.ibm.com>
Thu, 5 Mar 2020 16:33:35 +0000 (17:33 +0100)
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11229)

(cherry picked from commit af7f656cd91d99d62567e2b20c61f07cb4d81d0b)

crypto/ec/curve448/eddsa.c

index cd018c3db1262fcfadee5e6413fd06ca41171632..dc8ac2365a4ee1709c842f8f88cdbe999f893678 100644 (file)
@@ -50,7 +50,12 @@ static c448_error_t hash_init_with_dom(EVP_MD_CTX *hashctx, uint8_t prehashed,
                                        const uint8_t *context,
                                        size_t context_len)
 {
-    const char *dom_s = "SigEd448";
+#ifdef CHARSET_EBCDIC
+    const char dom_s[] = {0x53, 0x69, 0x67, 0x45,
+                          0x64, 0x34, 0x34, 0x38, 0x00};
+#else
+    const char dom_s[] = "SigEd448";
+#endif
     uint8_t dom[2];
 
     if (context_len > UINT8_MAX)