Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
compile cleanly on systems without openssl ec support.
Browse files Browse the repository at this point in the history
  • Loading branch information
blovett committed Jan 3, 2012
1 parent 6d8eac6 commit 9b0947f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stud.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9b0947f

Please sign in to comment.