Skip to content
Browse files

compile cleanly on systems without openssl ec support.

  • Loading branch information...
1 parent 6d8eac6 commit 9b0947f3e46bb40105951a29d2c27173f0a1faab @blovett blovett committed Jan 2, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 stud.c
View
4 stud.c
@@ -283,13 +283,15 @@ static int init_dh(SSL_CTX *ctx, const char *cert) {
LOG("{core} DH initialized with %d bit key\n", 8*DH_size(dh));
DH_free(dh);
+#ifndef OPENSSL_NO_EC
#ifdef NID_X9_62_prime256v1
EC_KEY *ecdh = NULL;
ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
SSL_CTX_set_tmp_ecdh(ctx,ecdh);
EC_KEY_free(ecdh);
LOG("{core} ECDH Initialized with NIST P-256\n");
-#endif
+#endif /* NID_X9_62_prime256v1 */
+#endif /* OPENSSL_NO_EC */
return 0;
}

0 comments on commit 9b0947f

Please sign in to comment.
Something went wrong with that request. Please try again.