Fix Windows linking error in GOST test case.
[openssl.git] / engines / ccgost / gost2814789t.c
index 4a4be477370d391c3feb7939c1f777a74f5993d5..a59ac9240969ad300f4d96347f3d9aac57512b07 100644 (file)
@@ -61,22 +61,22 @@ typedef enum g89_mode_ {
 }   g89_mode;
 
 typedef struct g89_tc_ {
-    u64 ullLen;                                // ullLen > G89_MAX_TC_LEN
-                                       //     Clear text ullLen
-                                       //     of zero bytes
-    const byte bIn[G89_MAX_TC_LEN];    // Clear text, when
-                                       //     ullLen <= G89_MAX_TC_LEN
-    const char *szParamSet;            // S-Box ID
-    const char *szDerive;              // String for derive bRawKey
+    u64 ullLen;                                /* ullLen > G89_MAX_TC_LEN */
+                                       /*     Clear text ullLen */
+                                       /*     of zero bytes */
+    const byte bIn[G89_MAX_TC_LEN];    /* Clear text, when */
+                                       /*     ullLen <= G89_MAX_TC_LEN */
+    const char *szParamSet;            /* S-Box ID */
+    const char *szDerive;              /* String for derive bRawKey */
     const byte bRawKey[EVP_MAX_KEY_LENGTH];
-    g89_mode gMode;                    // Mode of encryption or MAC
-    const byte bIV[EVP_MAX_IV_LENGTH]; // IV for CFB or CNT mode
-    const byte bOut[G89_MAX_TC_LEN];   // Cipher text for ECB/CFB/CNT
-                                       // mode, when ullLen <= G89_MAX_TC_LEN;
-                                       // Last 16 byte of cipher text for
-                                       // ECB/CFB/CNT, when ullLen >
-                                       // G89_MAX_TC_LEN;
-                                       // 4 byte MAC for imitovstavka
+    g89_mode gMode;                    /* Mode of encryption or MAC */
+    const byte bIV[EVP_MAX_IV_LENGTH]; /* IV for CFB or CNT mode */
+    const byte bOut[G89_MAX_TC_LEN];   /* Cipher text for ECB/CFB/CNT */
+                                       /* mode, when ullLen <= G89_MAX_TC_LEN;
+                                        * Last 16 byte of cipher text for
+                                        * ECB/CFB/CNT, when ullLen >
+                                        * G89_MAX_TC_LEN;
+                                        * 4 byte MAC for imitovstavka */
 }   g89_tc;
 
 const g89_tc tcs[] = {
@@ -1314,7 +1314,7 @@ int main(int argc, char *argv[])
     /* 
      * Internal function test on GostR3411_94_TestParamSet
      */
-    #ifdef OPENSSL_NO_DYNAMIC_ENGINE
+    #if 0 && defined(OPENSSL_NO_DYNAMIC_ENGINE)
     {
        gost_ctx ctx;
 
@@ -1573,7 +1573,7 @@ engine_cipher_check:
                                        (unsigned int)ullLeft);
            }
            siglen = 4;
-           EVP_DigestSignFinal(&mctx, bTest, &siglen);
+           OPENSSL_assert(EVP_DigestSignFinal(&mctx, bTest, &siglen));
            EVP_MD_CTX_cleanup(&mctx);
            enlu = (int)tcs[t].ullLen;
            enlf = 0;