OS Name/Version: Ubuntu
Product Name/Version: 2.4.7 - 20240109.1
Problem Description: converted Cert to PFX format and uploaded to /home/amp/.ampdata/certs and set the password in the config file but amp is still loading as HTTP and not HTTPS
this shows up in the console when i restart amp
Unable to load certificate from file, using HTTP instead.
CryptographicException
[0] (CryptographicException) : Unable to decode certificate.
at Framework.Btls.X509CertificateImplBtls..ctor (Byte[] data, Microsoft.Platform.SafeHandles.SafePasswordHandle password, Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) at Framework.Btls.FrameworkBtlsProvider.GetNativeCertificate (Byte[] data, Microsoft.Platform.SafeHandles.SafePasswordHandle password, Security.Cryptography.X509Certificates.X509KeyStorageFlags flags) at Framework.Btls.X509PalImplBtls.Import (Byte[] data, Microsoft.Platform.SafeHandles.SafePasswordHandle password, Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) at Framework.SystemCertificateProvider.Import (Byte[] data, Microsoft.Platform.SafeHandles.SafePasswordHandle password, Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags, Framework.CertificateImportFlags importFlags) at Framework.SystemCertificateProvider.Framework.ISystemCertificateProvider.Import (Byte[] data, Microsoft.Platform.SafeHandles.SafePasswordHandle password, Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags, Framework.CertificateImportFlags importFlags) at Security.Cryptography.X509Certificates.X509Helper.Import (Byte[] rawData, Microsoft.Platform.SafeHandles.SafePasswordHandle password, Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) at Security.Cryptography.X509Certificates.X509Certificate..ctor (String fileName, String password, Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) at Security.Cryptography.X509Certificates.X509Certificate..ctor (String fileName, String password) at Security.Cryptography.X509Certificates.X509Certificate2..ctor (String fileName, String password) at GSMyAdmin.WebServer.LocalWebServer.GetCertificate ()
CryptographicException
[1] (CryptographicException) : `MonoBtlsPkcs12.Import` failed.
at Framework.Btls.FrameworkBtlsObject.CheckError (Boolean ok, String callerName) at Framework.Btls.FrameworkBtlsObject.CheckError (Int32 ret, String callerName) at Framework.Btls.FrameworkBtlsPkcs12.Import (Byte[] buffer, Microsoft.Platform.SafeHandles.SafePasswordHandle password) at Framework.Btls.X509CertificateImplBtls.ImportPkcs12 (Byte[] data, Microsoft.Platform.SafeHandles.SafePasswordHandle password) at Framework.Btls.X509CertificateImplBtls..ctor (Byte[] data, Microsoft.Platform.SafeHandles.SafePasswordHandle password, Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags)
Webserver started on http://0.0.0.0:8081
Config settings
# Webserver.IPBinding - NEVER CHANGE THIS SETTING MANUALLY! Always use `ampinstmgr rebind` to alter IP/Port bindings. I>
Webserver.IPBinding=0.0.0.0
Webserver.SessionTimeout=5
Webserver.NoUI=False
Webserver.FilterEndpoints=False
Webserver.AllowedEndpointIPs=["127.0.0.1"]
Webserver.CertificatePath=/home/amp/.ampdata/certs/certificate.pfx
Webserver.CertificateSerial=
Webserver.CertificateDomain=
Webserver.CertificatePassword=mypasswordhere
Webserver.EnableWebSockets=True
Webserver.EnablePluginWSStreams=False
Webserver.EnableFetchPostEndpoints=True
Webserver.APIRateLimit=1000
Webserver.AllowGETForAPIEndpoints=False
Webserver.UsingReverseProxy=False
Webserver.ReverseProxyHost=127.0.0.1
Webserver.ReverseProxyHosts=["127.0.0.1"]
Webserver.CORSOrigin=
Webserver.DisableCompression=False
Steps to reproduce:
- Converted cert using ampinstmgr
- move cert to folder above
- updated ADS01 AMPConfig.conf with path and password
- restart amp and getting the above console output
Actions taken to resolve so far:
try to convert cert again and created a new PFX cert and password but still not reading the cert