diff --git a/plugins/mqtt/mqtt.json b/plugins/mqtt/mqtt.json index d4ddbf06..989989b2 100644 --- a/plugins/mqtt/mqtt.json +++ b/plugins/mqtt/mqtt.json @@ -243,20 +243,5 @@ "valid": { "length": 81960 } - }, - "keypass": { - "name": "Client Private Key Password", - "name_zh": "客户端私钥密码", - "description": "Client private key password when using two way authentication with an encrypted client private key", - "description_zh": "使用加密的客户端私钥进行双向认证时,客户端私钥的密码", - "attribute": "optional", - "type": "string", - "condition": { - "field": "ssl", - "value": true - }, - "valid": { - "length": 256 - } } } diff --git a/plugins/mqtt/mqtt_config.c b/plugins/mqtt/mqtt_config.c index 2aef69b9..9a4b54e3 100644 --- a/plugins/mqtt/mqtt_config.c +++ b/plugins/mqtt/mqtt_config.c @@ -110,6 +110,7 @@ static inline int parse_ssl_params(neu_plugin_t *plugin, const char *setting, } // keypass, optional + // keep it here for backward compatibility with version 2.5 ret = neu_parse_param(setting, NULL, 1, keypass); if (0 != ret) { plog_notice(plugin, "setting no keypass"); diff --git a/plugins/mqtt/mqtt_config.h b/plugins/mqtt/mqtt_config.h index ec6e68e2..05f729ca 100644 --- a/plugins/mqtt/mqtt_config.h +++ b/plugins/mqtt/mqtt_config.h @@ -66,6 +66,8 @@ typedef struct { char * cert; // client cert char * key; // client key char * keypass; // client key password + // remove in 2.6, keep it here + // for backward compatibility } mqtt_config_t; int mqtt_config_parse(neu_plugin_t *plugin, const char *setting,