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