diff --git a/TD/TD2/a.php b/TD/TD2/a.php
new file mode 100644
index 0000000..f1dc284
--- /dev/null
+++ b/TD/TD2/a.php
@@ -0,0 +1,26 @@
+ "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
";
+
+
diff --git a/TD/TD2/a/certificat b/TD/TD2/a/certificat
new file mode 100644
index 0000000..a1196d9
--- /dev/null
+++ b/TD/TD2/a/certificat
@@ -0,0 +1,23 @@
+-----BEGIN CERTIFICATE-----
+MIIDxDCCAqygAwIBAgIBADANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJGUjEP
+MA0GA1UECAwGU29waGlhMREwDwYDVQQHDAhWYWxib25uZTEMMAoGA1UECgwDaXV0
+MRIwEAYDVQQLDAlpdXRfaW90aWExCjAIBgNVBAMMAWIxGjAYBgkqhkiG9w0BCQEW
+C2l1dEB1bml2LmZyMB4XDTIyMTAwNzA5NDEyNFoXDTI1MTAwNjA5NDEyNFowezEL
+MAkGA1UEBhMCRlIxDzANBgNVBAgMBlNvcGhpYTERMA8GA1UEBwwIVmFsYm9ubmUx
+DDAKBgNVBAoMA2l1dDESMBAGA1UECwwJaXV0X2lvdGlhMQowCAYDVQQDDAFiMRow
+GAYJKoZIhvcNAQkBFgtpdXRAdW5pdi5mcjCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBAKTjKuZWKCxhjtwCVeDu4uYZ98emKbJc9UloO8f7bcWclCyltN6I
+9EyhfCcj82/RDg86TKlKvraIf4Z9AFJP0LMtpej7r5iUDGGw+NZgTifbLi0mhNhy
+/TaFttF3OnupWgbSlATUmVRQ5QCQoA1ugr1hMO004F3Wgdgh3q0bS+8i6dq5cidF
+m0NfiFbncKgFUKRhTIJdkIqugI5E6H1GsGGczmvkRIYYlkn2gIhruMOODbBWMDW9
+L4zq+qpU4aLRa/MqEpZxvFG4PiF7016EfGIgyOPz2JfS3c6Yn3/SaeGUraibqIG1
+tMDsWkVWCzif9qdlsyUumjn2S5YXyaX+S/8CAwEAAaNTMFEwHQYDVR0OBBYEFF0E
+cIRUTZsnEoku+SMwkYbQ+oIDMB8GA1UdIwQYMBaAFF0EcIRUTZsnEoku+SMwkYbQ
++oIDMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBACKbV0Op3YIa
+VtizjCa781QJNo2zSUFUU3pR/n0vyP4Hq5OEibiXCNnsn1imXf+uFTMZX/b9NVmf
+zlQTYBsP6LKtGIDt9XVkG4gtP//cxw3RbDzFtf/1DXYDniA5UmR35waHT9KIPj3J
+ejIori0XC6DoJ9e9bQ9B03JAIMUg2TaDDSuSR2fSGHIkRyWewMYFi1CnM6PdFZoJ
+DyP2aZuolatY5DS/0yObjrRCfAMo76NxRbnq+ArbMYZpctAlxOU7N9fV0xwTl4xl
+dZFWfHHG3Y55J1Fiat5QcrKW5aCqTAHEgsDt0uM1En8Hvx57pjTAM4TZxg/tXOk+
+c13dhwzyW10=
+-----END CERTIFICATE-----
diff --git a/TD/TD2/a/clePrivee b/TD/TD2/a/clePrivee
new file mode 100644
index 0000000..26b70b0
--- /dev/null
+++ b/TD/TD2/a/clePrivee
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCk4yrmVigsYY7c
+AlXg7uLmGffHpimyXPVJaDvH+23FnJQspbTeiPRMoXw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/AGDYO
+7u5yry+CstEgvqp/wyhdR3J0i+Z2qo7V3IexrNbcoEGCw12PtXRXpbJimpq7jwpQ
+bs917O+xjRus/R010t8sw8AhHHamRiYZeHB9bYQN2NwSTnBjslJwrTM6hQKBgQCM
+lqvSOnah1u8SeRjKx/naI+onkmvVFvRe68y+CyOZK/m7otH7NmC3TFnZOV802MEe
+B1KlRCavD2z0dSr7ylZj+ajt4TafkAqjsKt0huPNiRYDMOpiIitECvzMB1HkrHmn
+LYmJlix6An5uT1kAXinPOQ3Dmi23mfMwtzMAXMBtWQKBgQCAJ6rAW+S+osjLjLZ7
+EQ+GJDl5+diGC40EQ3qhiek4P1O3yFJAHsSf85PTEbcOUmYBQbQ25EirO72FoypZ
+srxFirR6dllH63TiqBbimvgYP/7ESeT5VPJgdTAPgKAZePDhEJsCBf/XR3S+2YKd
+N/bXMZXi92sxnqotp4vhfVsaFw==
+-----END PRIVATE KEY-----
diff --git a/TD/TD2/a/requete b/TD/TD2/a/requete
new file mode 100644
index 0000000..2e99704
--- /dev/null
+++ b/TD/TD2/a/requete
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIICwDCCAagCAQAwezELMAkGA1UEBhMCRlIxDzANBgNVBAgMBlNvcGhpYTERMA8G
+A1UEBwwIVmFsYm9ubmUxDDAKBgNVBAoMA2l1dDESMBAGA1UECwwJaXV0X2lvdGlh
+MQowCAYDVQQDDAFiMRowGAYJKoZIhvcNAQkBFgtpdXRAdW5pdi5mcjCCASIwDQYJ
+KoZIhvcNAQEBBQADggEPADCCAQoCggEBAKTjKuZWKCxhjtwCVeDu4uYZ98emKbJc
+9UloO8f7bcWclCyltN6I9EyhfCcj82/RDg86TKlKvraIf4Z9AFJP0LMtpej7r5iU
+DGGw+NZgTifbLi0mhNhy/TaFttF3OnupWgbSlATUmVRQ5QCQoA1ugr1hMO004F3W
+gdgh3q0bS+8i6dq5cidFm0NfiFbncKgFUKRhTIJdkIqugI5E6H1GsGGczmvkRIYY
+lkn2gIhruMOODbBWMDW9L4zq+qpU4aLRa/MqEpZxvFG4PiF7016EfGIgyOPz2JfS
+3c6Yn3/SaeGUraibqIG1tMDsWkVWCzif9qdlsyUumjn2S5YXyaX+S/8CAwEAAaAA
+MA0GCSqGSIb3DQEBBQUAA4IBAQBKcTQ/hjXhp8OgfRg5fmqqwv1/yCuPwN57N20T
+0LMbTmHvXNpPPN4aub3TVJWbRRZfTdr3UOr65OScLQliRArTH+tU9kw+A5bQrIbY
+TGvtlgfmpqEHSt0IovHwVh+2kxOw+GNNJK2eNv2dn83hHfByhy88Hg7JMWWlmiCj
+pAD+oOgLjJhuQgNo8puli5QgRYN2jogdHJn55dOBCQxuvvBHJ0x6MJ2pBxnWtxDd
+LYSo3SVW8bsQMOABfnIs1nYtjPBS0QUp2w2zvm94hwseoX+doyq8tHaai7n2oVev
+OFvxeU78a/5CTKBOntbRxj5I6ZX9Z9mkoir+zq7TYuDv42gW
+-----END CERTIFICATE REQUEST-----
diff --git a/TD/TD2/b.php b/TD/TD2/b.php
new file mode 100644
index 0000000..bd74ad8
--- /dev/null
+++ b/TD/TD2/b.php
@@ -0,0 +1,47 @@
+ "FR",
+ "stateOrProvinceName" => "Alpes Maritimes",
+ "localityName" => "Nice",
+ "organizationName" => "iut",
+ "organizationalUnitName" => "iotia",
+ "commonName" => "Pauline Srifi",
+ "emailAddress" => "pauline@srifi.fr"
+ );
+ $pk = openssl_pkey_new($config);
+ $req = openssl_csr_new($dn, $pk, $config);
+ $certif = openssl_csr_sign($req, null, $pk, (365), $config);
+ $exportCertif = openssl_x509_export_to_file($certif, "./b/certificat");
+ $exportReq = openssl_csr_export_to_file($req, "./b/requete");
+ $exportKey = openssl_pkey_export_to_file($pk, "./b/clePrivee", null, $config);
+
+ echo "Certificat exporté
";
+ echo "Requête exportée
";
+ echo "Clée privée exportée
";
+}
+
+
+
+?>
+
+
+