django-pyas2 icon indicating copy to clipboard operation
django-pyas2 copied to clipboard

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

Open StevenHunt opened this issue 4 years ago • 1 comments

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." )

StevenHunt avatar Sep 10 '21 21:09 StevenHunt

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?

abhishek-ram avatar Sep 13 '21 04:09 abhishek-ram