[#ftl attributes={"generated.type":"blueprint.fragment"}]
[#if properties.sslContextParameters?? && properties.sslContextParameters == "visual configuration"]
[#--
<sslContextParameters id="mySslContextParameters" xmlns="http://camel.apache.org/schema/blueprint">
    <keyManagers keyPassword="karaf1234">
        <keyStore resource="./sec/local-keystore.p12" type="PKCS12" password="karaf1234" />
    </keyManagers>
    <trustManagers>
        <keyStore resource="./sec/local-keystore.p12" type="PKCS12" password="karaf1234" />
    </trustManagers>
</sslContextParameters>
--]
	[#if properties.sslContextParametersKeyManagersKeyStoreResource?? && properties.sslContextParametersKeyManagersKeyStoreResource?has_content]
	<bean id="keyManagersKeystore" class="org.apache.camel.support.jsse.KeyStoreParameters">
        [#if properties.sslContextParametersKeyManagersKeyStoreResource?? && properties.sslContextParametersKeyManagersKeyStoreResource?has_content]
        <property name="resource" value="[=properties.sslContextParametersKeyManagersKeyStoreResource]"/>
        [/#if]
        [#if properties.sslContextParametersKeyManagersKeyStorePass?? && properties.sslContextParametersKeyManagersKeyStorePass?has_content]
        <property name="password" value="[=properties.sslContextParametersKeyManagersKeyStorePass]"/>
        [/#if]
        [#if properties.sslContextParametersKeyManagersKeyStoreType?? && properties.sslContextParametersKeyManagersKeyStoreType?has_content]
        <property name="type" value="[=properties.sslContextParametersKeyManagersKeyStoreType]"/>
        [/#if]
    </bean>
    <bean id="beanKeyManagers" class="org.apache.camel.support.jsse.KeyManagersParameters">
        <property name="keyStore" ref="keyManagersKeystore"/>
        [#if properties.sslContextParametersKeyManagersPass?? && properties.sslContextParametersKeyManagersPass?has_content]
        <property name="keyPassword" value="[=properties.sslContextParametersKeyManagersPass]"/>
        [/#if]
    </bean>
    [/#if]
	
    [#if properties.sslContextParametersTrustManagersKeyStoreResource?? && properties.sslContextParametersTrustManagersKeyStoreResource?has_content]
    <bean id="trustManagersKeystore" class="org.apache.camel.support.jsse.KeyStoreParameters">
        [#if properties.sslContextParametersTrustManagersKeyStoreResource?? && properties.sslContextParametersTrustManagersKeyStoreResource?has_content]
        <property name="resource" value="[=properties.sslContextParametersTrustManagersKeyStoreResource]"/>
        [/#if]
          [#if properties.sslContextParametersTrustManagersKeyStorePass?? && properties.sslContextParametersTrustManagersKeyStorePass?has_content]
        <property name="password" value="[=properties.sslContextParametersTrustManagersKeyStorePass]"/>
        [/#if]
        [#if properties.sslContextParametersTrustManagersKeyStoreType?? && properties.sslContextParametersTrustManagersKeyStoreType?has_content]
        <property name="type" value="[=properties.sslContextParametersTrustManagersKeyStoreType]"/>
        [/#if]
    </bean>
    <bean id="beanTrustManagers" class="org.apache.camel.support.jsse.TrustManagersParameters">
        <property name="keyStore" ref="trustManagersKeystore"/>
    </bean>
    [/#if]
    <bean id="sslContextParameters" class="org.apache.camel.support.jsse.SSLContextParameters">
        [#if properties.sslContextParametersKeyManagersKeyStoreResource?? && properties.sslContextParametersKeyManagersKeyStoreResource?has_content]
        <property name="keyManagers" ref="beanKeyManagers"/>
        [/#if]
        [#if properties.sslContextParametersTrustManagersKeyStoreResource?? && properties.sslContextParametersTrustManagersKeyStoreResource?has_content]
        <property name="trustManagers" ref="beanTrustManagers"/>
        [/#if]
    </bean>
[/#if]