mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Only do checks for SSL_get_server_tmp_key in network-openssl.c.
This commit is contained in:
parent
0a6e66f8b7
commit
322625b548
@ -42,10 +42,7 @@ void tls_rec_free(TLS_REC *tls_rec)
|
||||
g_free_and_null(tls_rec->certificate_fingerprint_algorithm);
|
||||
g_free_and_null(tls_rec->not_after);
|
||||
g_free_and_null(tls_rec->not_before);
|
||||
|
||||
#ifdef SSL_get_server_tmp_key
|
||||
g_free_and_null(tls_rec->ephemeral_key_algorithm);
|
||||
#endif
|
||||
|
||||
if (tls_rec->certs != NULL) {
|
||||
g_slist_foreach(tls_rec->certs, (GFunc)tls_cert_rec_free, NULL);
|
||||
@ -130,7 +127,6 @@ void tls_rec_set_not_before(TLS_REC *tls_rec, const char *not_before)
|
||||
tls_rec->not_before = g_strdup(not_before);
|
||||
}
|
||||
|
||||
#ifdef SSL_get_server_tmp_key
|
||||
void tls_rec_set_ephemeral_key_algorithm(TLS_REC *tls_rec, const char *algorithm)
|
||||
{
|
||||
g_return_if_fail(tls_rec != NULL);
|
||||
@ -142,7 +138,6 @@ void tls_rec_set_ephemeral_key_size(TLS_REC *tls_rec, size_t size)
|
||||
g_return_if_fail(tls_rec != NULL);
|
||||
tls_rec->ephemeral_key_size = size;
|
||||
}
|
||||
#endif
|
||||
|
||||
void tls_rec_append_cert(TLS_REC *tls_rec, TLS_CERT_REC *tls_cert_rec)
|
||||
{
|
||||
|
@ -43,10 +43,8 @@ struct _TLS_REC {
|
||||
char *not_after;
|
||||
char *not_before;
|
||||
|
||||
#ifdef SSL_get_server_tmp_key
|
||||
char *ephemeral_key_algorithm;
|
||||
size_t ephemeral_key_size;
|
||||
#endif
|
||||
|
||||
GSList *certs;
|
||||
};
|
||||
@ -75,11 +73,8 @@ void tls_rec_set_certificate_fingerprint(TLS_REC *tls_rec, const char *fingerpri
|
||||
void tls_rec_set_certificate_fingerprint_algorithm(TLS_REC *tls_rec, const char *algorithm);
|
||||
void tls_rec_set_not_after(TLS_REC *tls_rec, const char *not_after);
|
||||
void tls_rec_set_not_before(TLS_REC *tls_rec, const char *not_before);
|
||||
|
||||
#ifdef SSL_get_server_tmp_key
|
||||
void tls_rec_set_ephemeral_key_algorithm(TLS_REC *tls_rec, const char *algorithm);
|
||||
void tls_rec_set_ephemeral_key_size(TLS_REC *tls_rec, size_t size);
|
||||
#endif
|
||||
|
||||
void tls_rec_append_cert(TLS_REC *tls_rec, TLS_CERT_REC *tls_cert_rec);
|
||||
|
||||
|
@ -59,12 +59,10 @@ static void tls_handshake_finished(SERVER_REC *server, TLS_REC *tls)
|
||||
|
||||
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, TXT_TLS_PROTOCOL_VERSION, tls->protocol_version, tls->cipher_size, tls->cipher);
|
||||
|
||||
#ifdef SSL_get_server_tmp_key
|
||||
if (tls->ephemeral_key_algorithm != NULL)
|
||||
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, TXT_TLS_EPHEMERAL_KEY, tls->ephemeral_key_size, tls->ephemeral_key_algorithm);
|
||||
else
|
||||
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, TXT_TLS_EPHEMERAL_KEY_UNAVAILBLE);
|
||||
#endif
|
||||
|
||||
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, TXT_TLS_PUBKEY, tls->public_key_size, tls->public_key_algorithm, tls->not_before, tls->not_after);
|
||||
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, TXT_TLS_PUBKEY_FINGERPRINT, tls->public_key_fingerprint, tls->public_key_fingerprint_algorithm);
|
||||
|
Loading…
Reference in New Issue
Block a user