DrayTek UK Users' Community Forum

Help, Advice and Solutions from DrayTek Users

mngt cert_import local_cert

  • dapper1052
  • Topic Author
  • Offline
  • New Member
  • New Member
More
21 Aug 2022 17:24 #101623 by dapper1052
mngt cert_import local_cert was created by dapper1052
Hello,

I am unable to import a PKCS12 cert at the telnet command line.

Has anyone been successful?

mngt cert_import local_cert URL(http://example.com/certfile.p12) thepassword
Local Certificate Import File wrong URL format!

Grateful for any help..

Please Log in or Create an account to join the conversation.

More
29 Nov 2024 06:38 - 29 Nov 2024 09:35 #104226 by Dominic
Replied by Dominic on topic mngt cert_import local_cert
I had the same problem, the certificate could be installed from the web interface fine but when trying to install from CLI I saw this message with Vigor 2762 and with Vigor 2766:
Maybe the imported file format is worng or password is wrong!
(the typo is in the original!)

I rebuilt the certificate file using openssl -legacy option and then the certificate could be installed fine via CLI. Example for Letsencrypt with password TestPass:
openssl pkcs12 -export -legacy -out "/var/www/html/$DOMAIN.p12" -inkey "/etc/letsencrypt/live/$DOMAIN/privkey.pem" -in "/etc/letsencrypt/live/$DOMAIN/cert.pem" -certfile "/etc/letsencrypt/live/$DOMAIN/chain.pem" -passout pass:TestPass

Then in Draytek CLI (assuming the p12 file can be obtained from local webserver):
> mngt cert_import local_cert http://192.168.1.34/my.domain.p12 TestPass
 Local Certificate Import File success!

I also managed to upload /etc/letsencrypt/live/$DOMAIN/fullchain.pem as the trusted CA certificate file, when renamed as my.domain.crt and made available on a local webserver, thus:
> mngt cert_import trusted_ca http://192.168.1.34/my.domain.crt
 Trusted CA Import File success!
Last edit: 29 Nov 2024 09:35 by Dominic.

Please Log in or Create an account to join the conversation.

Moderators: ChrisSami