<?xml version="1.0" encoding="utf-8"?>

<creole>

    <files>
        <file name='/etc/eole/ssl/certif-eole.conf' mkdir='True'/>
        <file name='/etc/eole/ssl/ca-eole.conf' mkdir='True'/>
    </files>

    <variables>
        <family name='certificats ssl' mode='expert' icon='lock'>
            <variable name='server_cert' type='filename' description='Nom long du certificat SSL par défaut'>
                <value>/etc/ssl/certs/eole.crt</value>
            </variable>
            <variable name='server_key' type='filename' description='Nom long de la clé privée du certificat SSL par défaut'>
                <value>/etc/ssl/certs/eole.key</value>
            </variable>
            <variable name='server_pem' type='filename' description='Nom long du certificat Privacy Enhanced Mail'>
                <value>/etc/ssl/certs/eole.pem</value>
            </variable>
            <variable name='ssl_default_key_bits' type='number' description='Taille de la clef'>
                <value>2048</value>
            </variable>
            <variable name='ssl_default_cert_time' type='number' description='Durée de validité du certificat (en jours)'>
                <value>1096</value>
            </variable>
            <variable name='ssl_country_name' type='string' description='Nom du pays (C=)'/>
            <variable name='ssl_organization_name' type='string' description="Nom de l'organisation (O=)">
                <value>Ministere Education Nationale (MENESR)</value>
            </variable>
            <variable name='ssl_organization_unit_name' type='string' description="Nom de l'unité de l'organisation (OU=)" multi='True'/>
            <variable name='ssl_server_name' type='domain_strict' description="Nom DNS du serveur (de la forme nom-serveur.ac-acad.fr) (CN=)"/>
            <variable name='ssl_subjectaltname' type='domain' description="Nom DNS/IP alternatif du serveur" multi='True'/>
        </family>

         <separators>
            <!-- certificats -->
            <separator name='server_cert'>Choix du certificat SSL</separator>
            <separator name='ssl_default_key_bits'>Paramètres SSL</separator>
            <separator name='ssl_country_name'>Subject (DN)</separator>
            <separator name='ssl_subjectaltname'>Nom Alternatif de la machine (SubjectAltName)</separator>
        </separators>
    </variables>

    <constraints>
        <check name='valid_country' target='ssl_country_name'>
        </check>
        <fill name='calc_ssl_country_name' target='ssl_country_name'>
            <param type='eole' name='valeur'>suffixe_domaine_academique</param>
        </fill>
        <fill name='calc_multi_val' target='ssl_organization_unit_name'>
            <param>110 043 015</param>
            <param type='eole' >nom_academie</param>
        </fill>
        <fill name='calc_multi_val' target='ssl_subjectaltname'>
            <param type='eole'>adresse_ip_eth0</param>
            <param type='eole'>nom_domaine_machine</param>
            <param type='eole' hidden='False'>alias_ip_eth0</param>
            <param type='eole' optional='True' hidden='False'>revprox_domainname</param>
            <param type='eole' optional='True' hidden='False'>eolesso_adresse</param>
            <param type='eole' optional='True' hidden='False'>web_url</param>
        </fill>
        <fill name='calc_val' target='ssl_server_name'>
            <param type='eole'>nom_domaine_machine</param>
        </fill>
    </constraints>

    <help/>

</creole>
