diff options
| author | jsing <> | 2014-10-31 15:25:55 +0000 |
|---|---|---|
| committer | jsing <> | 2014-10-31 15:25:55 +0000 |
| commit | 0da99f89c646309c2093dbe094b8dc7d568cdfd7 (patch) | |
| tree | 10ac57418996f21ce78687efb7443c1a142dd4a1 /src/lib/libssl/ssl.h | |
| parent | 7abf5bb08462c2b7ad3caf4e4fd4601fa2098700 (diff) | |
| download | openbsd-0da99f89c646309c2093dbe094b8dc7d568cdfd7.tar.gz openbsd-0da99f89c646309c2093dbe094b8dc7d568cdfd7.tar.bz2 openbsd-0da99f89c646309c2093dbe094b8dc7d568cdfd7.zip | |
Add support for automatic DH ephemeral keys.
This allows an SSL server to enable DHE ciphers with a single setting,
which results in an DH key being generated based on the server key length.
Partly based on OpenSSL.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 2b1ceaf2c7..350d6fb4d1 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl.h,v 1.68 2014/10/15 13:57:21 jsing Exp $ */ | 1 | /* $OpenBSD: ssl.h,v 1.69 2014/10/31 15:25:55 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -1429,6 +1429,8 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) | |||
| 1429 | 1429 | ||
| 1430 | #define SSL_CTRL_SET_ECDH_AUTO 94 | 1430 | #define SSL_CTRL_SET_ECDH_AUTO 94 |
| 1431 | 1431 | ||
| 1432 | #define SSL_CTRL_SET_DH_AUTO 118 | ||
| 1433 | |||
| 1432 | #define DTLSv1_get_timeout(ssl, arg) \ | 1434 | #define DTLSv1_get_timeout(ssl, arg) \ |
| 1433 | SSL_ctrl(ssl,DTLS_CTRL_GET_TIMEOUT,0, (void *)arg) | 1435 | SSL_ctrl(ssl,DTLS_CTRL_GET_TIMEOUT,0, (void *)arg) |
| 1434 | #define DTLSv1_handle_timeout(ssl) \ | 1436 | #define DTLSv1_handle_timeout(ssl) \ |
| @@ -1453,6 +1455,8 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) | |||
| 1453 | SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh) | 1455 | SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh) |
| 1454 | #define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \ | 1456 | #define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \ |
| 1455 | SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh) | 1457 | SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh) |
| 1458 | #define SSL_CTX_set_dh_auto(ctx, onoff) \ | ||
| 1459 | SSL_CTX_ctrl(ctx,SSL_CTRL_SET_DH_AUTO,onoff,NULL) | ||
| 1456 | #define SSL_CTX_set_ecdh_auto(ctx, onoff) \ | 1460 | #define SSL_CTX_set_ecdh_auto(ctx, onoff) \ |
| 1457 | SSL_CTX_ctrl(ctx,SSL_CTRL_SET_ECDH_AUTO,onoff,NULL) | 1461 | SSL_CTX_ctrl(ctx,SSL_CTRL_SET_ECDH_AUTO,onoff,NULL) |
| 1458 | 1462 | ||
| @@ -1464,6 +1468,8 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) | |||
| 1464 | SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)dh) | 1468 | SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)dh) |
| 1465 | #define SSL_set_tmp_ecdh(ssl,ecdh) \ | 1469 | #define SSL_set_tmp_ecdh(ssl,ecdh) \ |
| 1466 | SSL_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh) | 1470 | SSL_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh) |
| 1471 | #define SSL_set_dh_auto(s, onoff) \ | ||
| 1472 | SSL_ctrl(s,SSL_CTRL_SET_DH_AUTO,onoff,NULL) | ||
| 1467 | #define SSL_set_ecdh_auto(s, onoff) \ | 1473 | #define SSL_set_ecdh_auto(s, onoff) \ |
| 1468 | SSL_ctrl(s,SSL_CTRL_SET_ECDH_AUTO,onoff,NULL) | 1474 | SSL_ctrl(s,SSL_CTRL_SET_ECDH_AUTO,onoff,NULL) |
| 1469 | 1475 | ||
