Lab3 - Part5 - ConnectionResetErrot

Lab3 - Part5 - ConnectionResetErrot

by Ruizhi Luo -
Number of replies: 5

Hello,

I implemented the secure_pmu.py sever application. When testing it with the provided client program Part5_PDC.pyc in MininetVM, I get a ConnectionResetError on the output of both server and client.  Here's the traceback on the client side:

$ python3 secure_pmu.py certificate.crt CAMIPRO1_key.pem

Traceback (most recent call last):

  File "secure_pmu.py", line 27, in <module>

    data = conn.read(4096).decode()

  File "/usr/lib/python3.6/ssl.py", line 874, in read

    return self._sslobj.read(len, buffer)

  File "/usr/lib/python3.6/ssl.py", line 633, in read

    v = self._sslobj.read(len)

ConnectionResetError: [Errno 104] Connection reset by peer

Any idea of this error?  

Another question is that are the key file and certificate file correspond to each other. I got messed because I type the command to generate the key file several times and each time I erased the last key file. Thanks a lot.


In reply to Ruizhi Luo

Re: Lab3 - Part5 - ConnectionResetErrot

by Alaeddine El Fawal -

Hello,

 

Actually, the certificate is used to certify that a given public key does belong to a given identity (private key). The certificate contains the public key of the identity, it is signed by the certificate authority. So, if you generate a new key and do not update the certificate accordingly, the connection will not work.

 

So, I suggest to you to restart with a clean key and certificate generation and try again your code. If the problem persists, please send me your code BY EMAIL.

 

Good luck,

Alaeddine


In reply to Alaeddine El Fawal

Re: Lab3 - Part5 - ConnectionResetErrot

by Ruizhi Luo -

Hello,


Thanks for your answering. I indeed want to restart with a clean key and certificate. But it seems that I cannot generate a new certificate file in the scoring system when I submit a new .csr certificate request file cause it said  ''You have already reached the highest score for that test.''


Thanks again

Ruizhi Luo

In reply to Ruizhi Luo

Re: Lab3 - Part5 - ConnectionResetErrot

by Manuel Leone -

Hello,

please upload here on Moodle your .csr and we'll sign it for you.

Best,

Manuel