== SSL Practical, Week 9 == The purpose of this practical is to provide a secure way to communicate with our website. We will use SSL over HTTP for this purpose. At this end of the practical, we should be able to avoid any attempt of intercepting or altering our communications with our website when using the SSL layer. === Problem 1: Passing the certificate out of band === Using HTTP in order to send our certificate seems to be a very bad idea. Indeed, if a user is tampering our connection at the time the certificate is sent, he will be able to send to replace our certificate with a rogue crafted one. Since the purpose of using SSL over HTTP is exactly to avoid this king of attack, it seems very important to use a secure channel to send our certificate. ==== Resolution ==== Instead of using HTTP to send our certificate, we will use a trusted channel. Since we use SSH to access our virtual machine, we will use it to retrieve the certificate as well. $ rsync csvm2c4e.kent.ac.uk:rootCA.crt . > rootCA.crt > 1,415 100% 1.35MB/s 0:00:00 (xfr#1, to-chk=0/1) Now we can add our 'rootCA.crt' file to the list of trusted CA of our web browser. Otherwise, we can use 'curl' directly: .trying to access the secure website without giving the CA certificate ====== $ curl https://csvm2c4e.kent.ac.uk > curl: (60) SSL certificate problem: self signed certificate ====== .trying to access the secure website using the CA certificate ====== $ curl https://csvm2c4e.kent.ac.uk --cacert rootCA.crt >