"FR",
"stateOrProvinceName" => "Sophia",
"localityName" => "Valbonne",
"organizationName" => "iut",
"organizationalUnitName" => "iut_iotia",
"commonName" => "b",
"emailAddress" => "iut@univ.fr"
);
$pk = openssl_pkey_new($config);
$req = openssl_csr_new($dn, $pk, $config);
$certif = openssl_csr_sign($req, null, $pk, (365*3), $config);
$exportCertif = openssl_x509_export_to_file($certif, "./a/certificat");
$exportReq = openssl_csr_export_to_file($req, "./a/requete");
$exportKey = openssl_pkey_export_to_file($pk, "./a/clePrivee", null, $config);
echo "Certificat exporté
";
echo "Requête exportée
";
echo "Clée privée exportée
";