@@ -2937,6 +2937,216 @@ fun(Conf) ->
29372937 _ ->
29382938 Settings = cuttlefish_variable :filter_by_prefix (" node_tags" , Conf ),
29392939 [ {list_to_binary (K ), V } || {[_ , K ], V } <- Settings ]
2940+
2941+ % % ----------------------------------------------------------------------------
2942+ % % AMQP client 1.0 TLS options
2943+ % % ----------------------------------------------------------------------------
2944+
2945+ {mapping , " amqp10_client.ssl_options" , " amqp10_client.ssl_options" , [
2946+ {datatype , {enum , [none ]}}
2947+ ]}.
2948+
2949+ {translation , " amqp10_client.ssl_options" ,
2950+ fun (Conf ) ->
2951+ case cuttlefish :conf_get (" amqp10_client.ssl_options" , Conf , undefined ) of
2952+ none -> [];
2953+ _ -> cuttlefish :invalid (" Invalid amqp10_client.ssl_options" )
2954+ end
2955+ end }.
2956+
2957+ {mapping , " amqp10_client.ssl_options.verify" , " amqp10_client.ssl_options.verify" , [
2958+ {datatype , {enum , [verify_peer , verify_none ]}}]}.
2959+
2960+ {mapping , " amqp10_client.ssl_options.cacertfile" , " amqp10_client.ssl_options.cacertfile" ,
2961+ [{datatype , string }, {validators , [" file_accessible" ]}]}.
2962+
2963+ {mapping , " amqp10_client.ssl_options.certfile" , " amqp10_client.ssl_options.certfile" ,
2964+ [{datatype , string }, {validators , [" file_accessible" ]}]}.
2965+
2966+ {mapping , " amqp10_client.ssl_options.cacerts.$name" , " amqp10_client.ssl_options.cacerts" ,
2967+ [{datatype , string }]}.
2968+
2969+ {translation , " amqp10_client.ssl_options.cacerts" ,
2970+ fun (Conf ) ->
2971+ Settings = cuttlefish_variable :filter_by_prefix (" amqp10_client.ssl_options.cacerts" , Conf ),
2972+ [ list_to_binary (V ) || {_ , V } <- Settings ]
2973+ end }.
2974+
2975+ {mapping , " amqp10_client.ssl_options.cert" , " amqp10_client.ssl_options.cert" ,
2976+ [{datatype , string }]}.
2977+
2978+ {translation , " amqp10_client.ssl_options.cert" ,
2979+ fun (Conf ) ->
2980+ list_to_binary (cuttlefish :conf_get (" amqp10_client.ssl_options.cert" , Conf ))
2981+ end }.
2982+
2983+ {mapping , " amqp10_client.ssl_options.crl_check" , " amqp10_client.ssl_options.crl_check" ,
2984+ [{datatype , [{enum , [true , false , peer , best_effort ]}]}]}.
2985+
2986+ {mapping , " amqp10_client.ssl_options.depth" , " amqp10_client.ssl_options.depth" ,
2987+ [{datatype , integer }, {validators , [" byte" ]}]}.
2988+
2989+ {mapping , " amqp10_client.ssl_options.key.RSAPrivateKey" , " amqp10_client.ssl_options.key" ,
2990+ [{datatype , string }]}.
2991+
2992+ {mapping , " amqp10_client.ssl_options.key.DSAPrivateKey" , " amqp10_client.ssl_options.key" ,
2993+ [{datatype , string }]}.
2994+
2995+ {mapping , " amqp10_client.ssl_options.key.PrivateKeyInfo" , " amqp10_client.ssl_options.key" ,
2996+ [{datatype , string }]}.
2997+
2998+ {translation , " amqp10_client.ssl_options.key" ,
2999+ fun (Conf ) ->
3000+ case cuttlefish_variable :filter_by_prefix (" amqp10_client.ssl_options.key" , Conf ) of
3001+ [{[_ ,_ ,Key ], Val }|_ ] -> {list_to_atom (Key ), list_to_binary (Val )};
3002+ _ -> undefined
3003+ end
3004+ end }.
3005+
3006+ {mapping , " amqp10_client.ssl_options.keyfile" , " amqp10_client.ssl_options.keyfile" ,
3007+ [{datatype , string }, {validators , [" file_accessible" ]}]}.
3008+
3009+ {mapping , " amqp10_client.ssl_options.log_alert" , " amqp10_client.ssl_options.log_alert" ,
3010+ [{datatype , {enum , [true , false ]}}]}.
3011+
3012+ {mapping , " amqp10_client.ssl_options.password" , " amqp10_client.ssl_options.password" ,
3013+ [{datatype , string }]}.
3014+
3015+ {mapping , " amqp10_client.ssl_options.psk_identity" , " amqp10_client.ssl_options.psk_identity" ,
3016+ [{datatype , string }]}.
3017+
3018+ {mapping , " amqp10_client.ssl_options.reuse_sessions" , " amqp10_client.ssl_options.reuse_sessions" ,
3019+ [{datatype , {enum , [true , false ]}}]}.
3020+
3021+ {mapping , " amqp10_client.ssl_options.secure_renegotiate" , " amqp10_client.ssl_options.secure_renegotiate" ,
3022+ [{datatype , {enum , [true , false ]}}]}.
3023+
3024+ {mapping , " amqp10_client.ssl_options.versions.$version" , " amqp10_client.ssl_options.versions" ,
3025+ [{datatype , atom }]}.
3026+
3027+ {translation , " amqp10_client.ssl_options.versions" ,
3028+ fun (Conf ) ->
3029+ Settings = cuttlefish_variable :filter_by_prefix (" amqp10_client.ssl_options.versions" , Conf ),
3030+ [ V || {_ , V } <- Settings ]
3031+ end }.
3032+
3033+ {mapping , " amqp10_client.ssl_options.sni" , " amqp10_client.ssl_options.server_name_indication" ,
3034+ [{datatype , [{enum , [none ]}, string ]}]}.
3035+
3036+ {translation , " amqp10_client.ssl_options.server_name_indication" ,
3037+ fun (Conf ) ->
3038+ case cuttlefish :conf_get (" amqp10_client.ssl_options.sni" , Conf , undefined ) of
3039+ undefined -> cuttlefish :unset ();
3040+ none -> cuttlefish :unset ();
3041+ Hostname -> Hostname
3042+ end
3043+ end }.
3044+
3045+ % ===============================
3046+ % AMQP 0.9.1
3047+ % ===============================
3048+
3049+ % % ----------------------------------------------------------------------------
3050+ % % AMQP client 0.9.1 TLS options
3051+ % % ----------------------------------------------------------------------------
3052+
3053+ {mapping , " amqp_client.ssl_options" , " amqp_client.ssl_options" , [
3054+ {datatype , {enum , [none ]}}
3055+ ]}.
3056+
3057+ {translation , " amqp_client.ssl_options" ,
3058+ fun (Conf ) ->
3059+ case cuttlefish :conf_get (" amqp_client.ssl_options" , Conf , undefined ) of
3060+ none -> [];
3061+ _ -> cuttlefish :invalid (" Invalid amqp_client.ssl_options" )
3062+ end
3063+ end }.
3064+
3065+ {mapping , " amqp_client.ssl_options.verify" , " amqp_client.ssl_options.verify" , [
3066+ {datatype , {enum , [verify_peer , verify_none ]}}]}.
3067+
3068+ {mapping , " amqp_client.ssl_options.cacertfile" , " amqp_client.ssl_options.cacertfile" ,
3069+ [{datatype , string }, {validators , [" file_accessible" ]}]}.
3070+
3071+ {mapping , " amqp_client.ssl_options.certfile" , " amqp_client.ssl_options.certfile" ,
3072+ [{datatype , string }, {validators , [" file_accessible" ]}]}.
3073+
3074+ {mapping , " amqp_client.ssl_options.cacerts.$name" , " amqp_client.ssl_options.cacerts" ,
3075+ [{datatype , string }]}.
3076+
3077+ {translation , " amqp_client.ssl_options.cacerts" ,
3078+ fun (Conf ) ->
3079+ Settings = cuttlefish_variable :filter_by_prefix (" amqp_client.ssl_options.cacerts" , Conf ),
3080+ [ list_to_binary (V ) || {_ , V } <- Settings ]
3081+ end }.
3082+
3083+ {mapping , " amqp_client.ssl_options.cert" , " amqp_client.ssl_options.cert" ,
3084+ [{datatype , string }]}.
3085+
3086+ {translation , " amqp_client.ssl_options.cert" ,
3087+ fun (Conf ) ->
3088+ list_to_binary (cuttlefish :conf_get (" amqp_client.ssl_options.cert" , Conf ))
3089+ end }.
3090+
3091+ {mapping , " amqp_client.ssl_options.crl_check" , " amqp_client.ssl_options.crl_check" ,
3092+ [{datatype , [{enum , [true , false , peer , best_effort ]}]}]}.
3093+
3094+ {mapping , " amqp_client.ssl_options.depth" , " amqp_client.ssl_options.depth" ,
3095+ [{datatype , integer }, {validators , [" byte" ]}]}.
3096+
3097+ {mapping , " amqp_client.ssl_options.key.RSAPrivateKey" , " amqp_client.ssl_options.key" ,
3098+ [{datatype , string }]}.
3099+
3100+ {mapping , " amqp_client.ssl_options.key.DSAPrivateKey" , " amqp_client.ssl_options.key" ,
3101+ [{datatype , string }]}.
3102+
3103+ {mapping , " amqp_client.ssl_options.key.PrivateKeyInfo" , " amqp_client.ssl_options.key" ,
3104+ [{datatype , string }]}.
3105+
3106+ {translation , " amqp_client.ssl_options.key" ,
3107+ fun (Conf ) ->
3108+ case cuttlefish_variable :filter_by_prefix (" amqp_client.ssl_options.key" , Conf ) of
3109+ [{[_ ,_ ,Key ], Val }|_ ] -> {list_to_atom (Key ), list_to_binary (Val )};
3110+ _ -> undefined
3111+ end
3112+ end }.
3113+
3114+ {mapping , " amqp_client.ssl_options.keyfile" , " amqp_client.ssl_options.keyfile" ,
3115+ [{datatype , string }, {validators , [" file_accessible" ]}]}.
3116+
3117+ {mapping , " amqp_client.ssl_options.log_alert" , " amqp_client.ssl_options.log_alert" ,
3118+ [{datatype , {enum , [true , false ]}}]}.
3119+
3120+ {mapping , " amqp_client.ssl_options.password" , " amqp_client.ssl_options.password" ,
3121+ [{datatype , string }]}.
3122+
3123+ {mapping , " amqp_client.ssl_options.psk_identity" , " amqp_client.ssl_options.psk_identity" ,
3124+ [{datatype , string }]}.
3125+
3126+ {mapping , " amqp_client.ssl_options.reuse_sessions" , " amqp_client.ssl_options.reuse_sessions" ,
3127+ [{datatype , {enum , [true , false ]}}]}.
3128+
3129+ {mapping , " amqp_client.ssl_options.secure_renegotiate" , " amqp_client.ssl_options.secure_renegotiate" ,
3130+ [{datatype , {enum , [true , false ]}}]}.
3131+
3132+ {mapping , " amqp_client.ssl_options.versions.$version" , " amqp_client.ssl_options.versions" ,
3133+ [{datatype , atom }]}.
3134+
3135+ {translation , " amqp_client.ssl_options.versions" ,
3136+ fun (Conf ) ->
3137+ Settings = cuttlefish_variable :filter_by_prefix (" amqp_client.ssl_options.versions" , Conf ),
3138+ [ V || {_ , V } <- Settings ]
3139+ end }.
3140+
3141+ {mapping , " amqp_client.ssl_options.sni" , " amqp_client.ssl_options.server_name_indication" ,
3142+ [{datatype , [{enum , [none ]}, string ]}]}.
3143+
3144+ {translation , " amqp_client.ssl_options.server_name_indication" ,
3145+ fun (Conf ) ->
3146+ case cuttlefish :conf_get (" amqp_client.ssl_options.sni" , Conf , undefined ) of
3147+ undefined -> cuttlefish :unset ();
3148+ none -> cuttlefish :unset ();
3149+ Hostname -> Hostname
29403150 end
29413151end }.
29423152
0 commit comments