Merge pull request #7011 from lafirest/fix/exhook_ssl

fix(emqx_exhook): replace ssl-config schema with emqx_schema:client_s…
This commit is contained in:
lafirest 2022-02-15 16:55:12 +08:00 committed by GitHub
commit 1724536afa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 16 deletions

View File

@ -61,22 +61,8 @@ fields(server) ->
]; ];
fields(ssl_conf) -> fields(ssl_conf) ->
[ {enable, sc(boolean(), #{default => true})} Schema = emqx_schema:client_ssl_opts_schema(#{}),
, {cacertfile, lists:keydelete(user_lookup_fun, 1, Schema).
sc(binary(),
#{example => <<"{{ platform_etc_dir }}/certs/cacert.pem">>})
}
, {certfile,
sc(binary(),
#{example => <<"{{ platform_etc_dir }}/certs/cert.pem">>})
}
, {keyfile,
sc(binary(),
#{example => <<"{{ platform_etc_dir }}/certs/key.pem">>})}
, {verify,
sc(hoconsc:enum([verify_peer, verify_none]),
#{example => <<"verify_none">>})}
].
%% types %% types
sc(Type, Meta) -> Meta#{type => Type}. sc(Type, Meta) -> Meta#{type => Type}.