--- gvpe/src/connection.C 2013/07/19 21:01:16 1.106 +++ gvpe/src/connection.C 2013/09/20 11:57:03 1.107 @@ -35,11 +35,19 @@ #include #include +#include #include #include #include #include +// openssl 0.9.8 compatibility +#if OPENSSL_VERSION_NUMBER < 0x10100000 + #define require101(exp) exp +#else + #define require101(exp) equire (exp) +#endif + #include "conf.h" #include "slog.h" #include "device.h" @@ -128,7 +136,7 @@ kdf.expand (mac_key, sizeof (mac_key), mac_info, sizeof (mac_info)); HMAC_CTX_init (&hctx); - require (HMAC_Init_ex (&hctx, mac_key, MAC_KEYSIZE, MAC_DIGEST (), 0)); + require101 (HMAC_Init_ex (&hctx, mac_key, MAC_KEYSIZE, MAC_DIGEST (), 0)); } { @@ -366,9 +374,9 @@ { HMAC_CTX *hctx = &ctx->hctx; - require (HMAC_Init_ex (hctx, 0, 0, 0, 0)); - require (HMAC_Update (hctx, ((unsigned char *) this) + sizeof (hmac_packet), len - sizeof (hmac_packet))); - require (HMAC_Final (hctx, hmac_digest, 0)); + require101 (HMAC_Init_ex (hctx, 0, 0, 0, 0)); + require101 (HMAC_Update (hctx, ((unsigned char *) this) + sizeof (hmac_packet), len - sizeof (hmac_packet))); + require101 (HMAC_Final (hctx, hmac_digest, 0)); } void