abhishek-ram / django-pyas2

AS2 file transfer Server built on Python and Django.
https://django-pyas2.readthedocs.io
GNU General Public License v3.0
78 stars 31 forks source link

Encryption of messages is enabled but encrypt key is not set for the receiver. #67

Open StevenHunt opened 2 years ago

StevenHunt commented 2 years ago

Is this an issue with the Partner's certificate (public certificate)?

A partner sent over two .cer files (cert.cer and ca.cer), I'm getting a 'Partner Certificate Invalid: unable to get local issuer certificate' when attempted to validate the two.

If I do not validate them when adding the certs, and attempt to send a message to that Partner, an exception is thrown when building the message:

as2.Message.build ->

if self.receiver.encrypt and not self.receiver.encrypt_cert: raise ImproperlyConfigured( "Encryption of messages is enabled but encrypt key is not set for the receiver." )

abhishek-ram commented 2 years ago

That is interesting, it should not be throwing an exception. It should not have allowed you create the partner.

When creating the public cert with validation what all did you set?