X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=test_keyexpimp.c;h=0fa549bf4bbfeddee0e5fda969ea19abbc38feac;hb=a78aa26906bf544e7771c0af67fa074bd535ade9;hp=9a84516058281741f94f62af3bcfc68839888e7c;hpb=c719289105537c5df301ccad0e6b7e94b6f7843d;p=openssl-gost%2Fengine.git diff --git a/test_keyexpimp.c b/test_keyexpimp.c index 9a84516..0fa549b 100644 --- a/test_keyexpimp.c +++ b/test_keyexpimp.c @@ -1,4 +1,15 @@ -#include +/* + * Copyright (c) 2019-2020 Dmitry Belyavskiy + * + * Contents licensed under the terms of the OpenSSL license + * See https://www.openssl.org/source/license.html for details + */ +#ifdef _MSC_VER +# include +# include +#else +# include +#endif #include #include #include @@ -9,9 +20,10 @@ #include "e_gost_err.h" #include "gost_grasshopper_cipher.h" -#define T(e) if (!(e)) {\ - ERR_print_errors_fp(stderr);\ - OpenSSLDie(__FILE__, __LINE__, #e);\ +#define T(e) \ + if (!(e)) { \ + ERR_print_errors_fp(stderr); \ + OpenSSLDie(__FILE__, __LINE__, #e); \ } static void hexdump(FILE *f, const char *title, const unsigned char *s, int l) @@ -97,7 +109,11 @@ int main(void) unsigned char tlsseq[8]; unsigned char out[32]; +#ifdef _MSC_VER + _putenv_s("OPENSSL_ENGINES", ENGINE_DIR); +#else setenv("OPENSSL_ENGINES", ENGINE_DIR, 0); +#endif OPENSSL_add_all_algorithms_conf(); ERR_load_crypto_strings(); ENGINE *eng;