[comment]: # translation:outdated

[comment]: # ({58c98254-58c98254})
# 3 PSK 问题

[comment]: # ({/58c98254-58c98254})

[comment]: # ({aebe0aa7-aebe0aa7})

#### PSK 包含奇数个十六进制数字

Proxy 或者 agent 不能启动，proxy 或者 agent 日志中会有如下消息：

    invalid PSK in file "/home/zabbix/zabbix_proxy.psk"

[comment]: # ({/aebe0aa7-aebe0aa7})

[comment]: # ({887ee505-887ee505})
#### 长度超过 128 个字节的 PSK 标识字符串将传递到 GnuTLS

在 TLS 客户端日志中会显示如下信息：

    gnutls_handshake() failed: -110 The TLS connection was non-properly terminated.

在 TLS 服务器端日志中会显示如下信息：

    gnutls_handshake() failed: -90 The SRP username supplied is illegal.

[comment]: # ({/887ee505-887ee505})

[comment]: # ({a2e71eaa-a2e71eaa})
#### OpenSSL 1.1.1 使用了过长的PSK值

在连接发起端的日志中，会有如下信息显示：

    ...OpenSSL library (version OpenSSL 1.1.1  11 Sep 2018) initialized
    ...
    ...In zbx_tls_connect(): psk_identity:"PSK 1"
    ...zbx_psk_client_cb() requested PSK identity "PSK 1"
    ...End of zbx_tls_connect():FAIL error:'SSL_connect() set result code to SSL_ERROR_SSL: file ssl\statem\extensions_clnt.c line 801: error:14212044:SSL routines:tls_construct_ctos_early_data:internal error: TLS write fatal alert "internal error"'

在连接接收端的日志中，会有如下信息显示：

    ...Message from 123.123.123.123 is missing header. Message ignored.

将 OpenSSL 从 1.0.x 或 1.1.0 升级到 1.1.1 以及 PSK 值的长度超过 512 位（64 字节 PSK，以 128 个十六进制数字输入）时，通常会出现此问题。

参考: [值大小限制](/manual/encryption/using_pre_shared_keys#size_limits)

[comment]: # ({/a2e71eaa-a2e71eaa})
