]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - test_tlstree.c
Update INSTALL.md
[openssl-gost/engine.git] / test_tlstree.c
index 08caf906b7d1cd215e80d5345537e1970543f4cb..2fbc16a094ab2df3a66e4c49bf32e958db01e95f 100644 (file)
@@ -19,6 +19,7 @@ static void hexdump(FILE *f, const char *title, const unsigned char *s, int l)
 int main(void)
 {
 #ifdef EVP_MD_CTRL_TLSTREE
+#ifdef EVP_CTRL_TLS1_2_TLSTREE
        const unsigned char mac_secret[] = {
 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -132,7 +133,7 @@ int main(void)
        EVP_Cipher(enc, data0_processed+sizeof(data0), mac0, 16);
 
        hexdump(stderr, "ENC0 result", data0_processed, 31);
-       if (memcmp(enc0_etl, data0_processed, 16) != 0) {
+       if (memcmp(enc0_etl, data0_processed, sizeof(data0_processed)) != 0) {
                fprintf(stderr, "ENC0 mismatch");
                exit(1);
        }
@@ -176,6 +177,7 @@ int main(void)
                exit(1);
        }
 
+#endif
 #endif
        return 0;
 }