Python VICI connection request pass certificate #2053
-
Hi all, I hope you are doing well, I tried to setup host-to-host IPSec tunnel using strongswan. I followed the quickstart guide from strongswan documentation, which worked as expected.
But how do I do the same using python VICI interface I had previously used python VICI to load connections with pre-shared key, but could not figure out how to load certificates. Note: I loaded the essential credentials from using
this code throws the following error Traceback (most recent call last): What is the correct way to pass certs |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Certificates are passed as binary blobs (either PEM or DER encoded). So you have to open the file and pass its contents as value. Alternatively, you could use the |
Beta Was this translation helpful? Give feedback.
-
I also faced the same issue, but even after changing this to cert.file like below still facing issue like "vici.exception.CommandException: Command failed: unknown option: cert1.file, config discarded"
|
Beta Was this translation helpful? Give feedback.
Certificates are passed as binary blobs (either PEM or DER encoded). So you have to open the file and pass its contents as value. Alternatively, you could use the
cert<suffix>.file
syntax to pass an absolute path to the certificate file so the daemon loads it.