t2 en cours
This commit is contained in:
parent
bd5367f3be
commit
141fd0f1ef
29
TD/TD2/b.php
29
TD/TD2/b.php
@ -1,18 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
$form = $_POST;
|
|
||||||
|
|
||||||
require('./config.php');
|
require('./config.php');
|
||||||
|
|
||||||
|
if( isset($_POST["Pays"]) && $_POST["Pays"] != '' &&
|
||||||
if(isset($_POST['Nom'])) {
|
isset($_POST["Département"]) && $_POST["Département"] != '' &&
|
||||||
|
isset($_POST["Ville"]) && $_POST["Ville"] != '' &&
|
||||||
|
isset($_POST["Organisation"]) && $_POST["Organisation"] != '' &&
|
||||||
|
isset($_POST["Unite"]) && $_POST["Unite"] != '' &&
|
||||||
|
isset($_POST["Nom"]) && $_POST["Nom"] != '' &&
|
||||||
|
isset($_POST["Prenom"]) && $_POST["Prenom"] != '' &&
|
||||||
|
isset($_POST["Email"]) && $_POST["Email"] != '' ) {
|
||||||
$dn = array(
|
$dn = array(
|
||||||
"countryName" => "FR",
|
"countryName" => $_POST["Pays"],
|
||||||
"stateOrProvinceName" => "Alpes Maritimes",
|
"stateOrProvinceName" => $_POST["Département"],
|
||||||
"localityName" => "Nice",
|
"localityName" => $_POST["Ville"],
|
||||||
"organizationName" => "iut",
|
"organizationName" => $_POST["Organisation"],
|
||||||
"organizationalUnitName" => "iotia",
|
"organizationalUnitName" => $_POST["Unite"],
|
||||||
"commonName" => "Pauline Srifi",
|
"commonName" => '$_POST["Nom"]' . ' ' .'$_POST["Prenom"]',
|
||||||
"emailAddress" => "pauline@srifi.fr"
|
"emailAddress" => $_POST["Email"]
|
||||||
);
|
);
|
||||||
$pk = openssl_pkey_new($config);
|
$pk = openssl_pkey_new($config);
|
||||||
$req = openssl_csr_new($dn, $pk, $config);
|
$req = openssl_csr_new($dn, $pk, $config);
|
||||||
@ -24,6 +29,8 @@ if(isset($_POST['Nom'])) {
|
|||||||
echo "Certificat exporté<br />";
|
echo "Certificat exporté<br />";
|
||||||
echo "Requête exportée<br />";
|
echo "Requête exportée<br />";
|
||||||
echo "Clée privée exportée<br />";
|
echo "Clée privée exportée<br />";
|
||||||
|
} else {
|
||||||
|
echo '<h1 style="color:#ff0000">Merci de rentez toutes les valeurs demandeés et corectement SVP </h1>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -39,6 +46,8 @@ if(isset($_POST['Nom'])) {
|
|||||||
<label for="Pays">Pays</label> <input type="text" name="Pays" id="Pays" value=""/><br />
|
<label for="Pays">Pays</label> <input type="text" name="Pays" id="Pays" value=""/><br />
|
||||||
<label for="Organisation">Organisation</label> <input type="text" name="Organisation" id="Organisation" value=""/><br />
|
<label for="Organisation">Organisation</label> <input type="text" name="Organisation" id="Organisation" value=""/><br />
|
||||||
<label for="Unite">Unite</label> <input type="text" name="Unite" id="Unite" value=""/><br />
|
<label for="Unite">Unite</label> <input type="text" name="Unite" id="Unite" value=""/><br />
|
||||||
|
<label for="Email">Email</label> <input type="email" name="Email" id="Email" value=""/><br />
|
||||||
|
|
||||||
<input type="submit" name="Envoyer" value="Envoyer" />
|
<input type="submit" name="Envoyer" value="Envoyer" />
|
||||||
</form>
|
</form>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,23 +1,24 @@
|
|||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIID6jCCAtKgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjTELMAkGA1UEBhMCRlIx
|
MIIEDDCCAvSgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBnjELMAkGA1UEBhMCRlIx
|
||||||
GDAWBgNVBAgMD0FscGVzIE1hcml0aW1lczENMAsGA1UEBwwETmljZTEMMAoGA1UE
|
GDAWBgNVBAgMD2FscGVzIG1hcml0aW1lczENMAsGA1UEBwwETmljZTEMMAoGA1UE
|
||||||
CgwDaXV0MQ4wDAYDVQQLDAVpb3RpYTEWMBQGA1UEAwwNUGF1bGluZSBTcmlmaTEf
|
CgwDaXV0MQ4wDAYDV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
9tl3lxUndwC4uJlTr9Zk9KbSX5CNnhEV31VpS/m799Kwse7s96pMCTY463vAiQZA
|
ty77cCFC6FZSDrNJSOZ4xxCkQhyf1MKKV9PejB+Oanno3hIm5MKkfF7NJfubmgvK
|
||||||
GtM/M280KJx+Xe2x2fWj+fH1EaOvjLH8EUkuaaxQxVt+mJatM+qiBUasL2rgrdF0
|
6jlLwu4tOB/1GhjK6ekhtDjdwseoOVHKlV8EGiaqVYG/Zid9jyuKKY0csRlLHplk
|
||||||
XGQU/zNT8we/6i4Y8wpBMoC7bkxrlUgU3IQyLcSe0JflLyXb3WPec1fSQPthxA==
|
UDE4/dXiz7mOhW1Hs1Alh0Al7yZLFMsF/cuex0XAQbA5lWSw8tg6d47P7gy4FbI3
|
||||||
|
Or7Mt35VokYFfs7ZHPf/pXI5ZGryEUHm9x67u8Sebs8=
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
-----BEGIN PRIVATE KEY-----
|
-----BEGIN PRIVATE KEY-----
|
||||||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDBFVrakcnS7owG
|
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDJ5LL7rzfcC+1r
|
||||||
st2NsfWy1DthRoAZov77VvuS2uOytF36DeJJlqYkjVJr/10kk4iKvDYQm1Ro7zeK
|
ndlJhIcq2shAY98HGQ1/+QqLSzcx2ZkrzRzcCKKRQBZ3LZyccFXJhlYzQo/NqKqx
|
||||||
Qd0ggNZRKk0dWfkHMsdqydZd4jnwJnQR9Xk8OgJlCNbhA2MWHDOTFwg7ylDjdRch
|
MOsp957QEI7PebMO1EhKP7uhpd8U7k55FxjnFOB+wwjO5eBOCWScuMGyid9V+Zks
|
||||||
t2feCRE54hTzNvioEt2uQA+5gNFQ6Lj7Bw3Abi35icit2eAK8G48CvVY9L+sr2pW
|
y8nB1YsqnvOqHnX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np+L1J2PJtmzmNUwjATMpdEiBm0kBNQhAB7y+RmVBMvE70JQKBgCBn
|
/ItRN9exoIVHJOWyGzLcQ9hZ8qIFmd6ue8CzJ+DkW3HbSOov5MFIuVYZAwKBgHhT
|
||||||
e8Sbr+9QUBruEVuHxC1Xaj+esrmZ5ZtLTTyv+V9sW80T5z57AAU7zbr7u386JQ/s
|
oWfYbqm+aAelSpJRly+Xl2ImibHDqOQRgiSkdmnFFht4PoCddnINmcAjOAYg7Ncg
|
||||||
7aSt3I5NGgd3jggsQv8+M5QPI6GUbI5M1QkaGKkjZFNEgBTd/BLDTVZxXjwYQ39b
|
VxA/1UmzK1GShxjzkk8II7VMhrdLz7tRO1u+escEuv0WkCYpHNRJhNHPUk2gbCPr
|
||||||
NVhwNInVdPtRQeHYH0ka4OMpjE5wAMC+nMraT9dPAoGARPQBfTozV5eV5AD44z2p
|
stCliCPAyhfbSPlDjwt10TC0HVVOylFL+Y6j7wOXAoGBALOt3oFhjgDO8bwLxvWe
|
||||||
Ryseg4FIWs99yPb7WT1ZcKBtZPgoy1OP/YOfzpHYRq/3oBnl1RfApMb9gAFh71DP
|
yRyGUCTg8HGZ2LXAh9IwYCCXpH9ppytCCmVgt21MbUWNu40BtMLnqVe6xWatszIC
|
||||||
Eqs5T6/pEOokbd4ED1u5CqD9gNcvRA1jg9G6cQK0D4/io6dy1gTLFOQ8AD2/Pzcd
|
1gnh+8rQfqVj0gdCY6JE3rouUBAVSgDHykIgLvtjCZmSnayxBYSo5lDuDYlz2tGH
|
||||||
HY8Io1Dw9BwCfQ0lwBcCaAU=
|
G/K1QWJ2AddsWljw2ypc0eni
|
||||||
-----END PRIVATE KEY-----
|
-----END PRIVATE KEY-----
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
-----BEGIN CERTIFICATE REQUEST-----
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
MIIC0zCCAbsCAQAwgY0xCzAJBgNVBAYTAkZSMRgwFgYDVQQIDA9BbHBlcyBNY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SWJCjuwcI3ORxrnWg0pD4wR164zIdAyYRceU1
|
15rmhO2rcCVIjpYGaI6Cd8OmvGyjI9/wVisGv8vVvErmppjVlA17EEVTLjSL2PXe
|
||||||
OnTJy5sq/pDIVqEpAgMBAAGgADANBgkqhkiG9w0BAQUFAAOCAQEAv3qcUfS5a8Sv
|
R5DkCrWvU+kR5g2gkGSq/V2wtFBu6EotzhfWt4UCAwEAAaAAMA0GCSqGSIb3DQEB
|
||||||
4At7d/nGDj3DAHr9BorRR3WRV6Ybv6c+2X5Ia66AhrnZrPhkgU/8Sf7YoB+ZAJ7s
|
BQUAA4IBAQCtTXsHh1L1XWNk6wTQtVJEudusIKuYrDeaFL67WNFzipADXDjBlVbm
|
||||||
OQyX/n7id/lqaTslXl6rimRqOIR/PaJKFHAZQQHiNC95P6C11N+7TXum75b20QtX
|
neNIbrjc5gnFRhOoL8a78wHs7WwN+hIDf2eisq8UwE3nwHowLAcWrtROct/X1+10
|
||||||
aC+rlgQOCPFsnkvdKgyexNLK0Jzyn61tE9N2/4I38FZAj1e6zfyLd32Ws+QIagBC
|
Mrn83Ym5U1gYjLf4Js6etCzGhKhjSGFgplmHk00pDO+3W80xjdlkZIO8ijsxLnQv
|
||||||
C4KNQwgLtY/1r64WsofiUUNa/SQXwFpaDTCPi359q/m5PAdxMCdj3rrIA8H24I15
|
IYdq+osSmDJ+mjmrBPNa76+lhFJIcfU+2+4YEFot+K0OQ8sYmMl/W3irKmSb7Ge8
|
||||||
+dtbBUNEbHPgYuwqIMP7GyJvzuTAdexUJU+ITS0ozl44MiOc6oQo4Q8rvv8QCm2U
|
gWYO9ac52uGo6jJixpPvMPPa0utPLhqjrqonZITmtSjc85iBspagk3BV5gnoEX5R
|
||||||
kxKX5T5EHw==
|
PvBMthvzCkv5SR1jIErExduzlt+NUlMu
|
||||||
-----END CERTIFICATE REQUEST-----
|
-----END CERTIFICATE REQUEST-----
|
||||||
|
22
TD/TD2/c.php
22
TD/TD2/c.php
@ -1,3 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require('./config.php');
|
require('./config.php');
|
||||||
|
|
||||||
|
$ret = "";
|
||||||
|
$deret = "";
|
||||||
|
if(isset($_POST["Code"]) && $_POST["Code"] != '') {
|
||||||
|
openssl_public_encrypt($_POST["Code"], $ret, openssl_csr_get_public_key(file_get_contents("./b/requete")));
|
||||||
|
openssl_private_decrypt($ret,$deret,file_get_contents("./b/clePrivee"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<form method="POST" action="c.php">
|
||||||
|
<label for="Code">Texte a chiffrer : </label> <input type="text" name="Code" id="Code" value=""/><br />
|
||||||
|
<input type="submit" name="Envoyer" value="Envoyer" />
|
||||||
|
</form>
|
||||||
|
<p>Texte chiffré : <?php echo $ret?></p>
|
||||||
|
<p>Texte déchiffré : <?php echo $deret?></p>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
15
TD/TD2/d.php
Normal file
15
TD/TD2/d.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require('./config.php');
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<form method="POST" action="c.php">
|
||||||
|
<label for="Code">Fichier</label> <input id="File" name="File" value=""/><br />
|
||||||
|
<input type="submit" name="Envoyer" value="Envoyer" />
|
||||||
|
</form>
|
||||||
|
<p>Texte chiffré : <?php echo $ret?></p>
|
||||||
|
<p>Texte déchiffré : <?php echo $deret?></p>
|
||||||
|
</html>
|
Loading…
x
Reference in New Issue
Block a user