Hello
R81, API 1.7.1
add server-certificates for HPPTS-Inspection failed when using API , mgmt_cli or Web Service.
It functions only manually using the dashboard.
( on console not possible because the certificate p12 in base64 is too big for the console)
I always receive "Failed to create HTTPS inbound certificate with error -1"
as basic command used ( also with other user mgmt_cli --user .... )
mgmt_cli -r true add server-certificate name "NameCertificate" base64-certificate "MIIQEAIB...5489characters....ggA" base64-password "password_format_base64" comments "TESTING CERTIFICATE IMPORT"
What I did for converting and testing the formatted base64 certificate
converted to base64 using #base64 ...file.p12 > certificate_p12_formatbase64
tested way back using "base64 -d " and "openssl pkcs12"
What could be the issue ? do have someone else this issue ?
the --debug option do not give any further information
Thank you for your help
Jean-Michel
-----------------------------------------
#LOGIN
mgmt_cli --user "MYuser" -p *** login
uid: "9a4..MYuser..926"
sid: "W9ZG.MYuser.-RNw"
url: "https://127.0.0.1:443/web_api"
session-timeout: 600
last-login-was-at:
posix: 1643972043061
iso-8601: "2022-02-04T11:54+0100"
api-server-version: "1.7.1"
user-name: "MYuser"
user-uid: "f1c..MYuser..e4"
#ADD certificate
mgmt_cli --session-id W9Z..MYuser..-RNw add server-certificate name "CertificateXX base64-certificate "MIIQ....ggA" base64-password "Qi...K=" comments "TESTING CERTIFICATE IMPORT"
code: "err_server_certificate_operation_failed"
message: "Failed to create HTTPS inbound certificate with error '-1'"
#LOGOUT
mgmt_cli --session-id "W9Z..MYuser..-RNw" logout