Hi @Андрей Михалевский,
Welcome to the Microsoft Q&A platform!
According to your description, you want to issue a wildcard certificate for Exchange, but the owa\ecp web interface does not trust this certificate and displays an error.
After my research, I suggest that you can follow the steps below to issue a wildcard certificate:
1.Purchase or generate a wildcard certificate from a certificate authority (CA). Wildcard certificates usually cover all subdomains of a domain (for example, "*.yourdomain.com").
2.When creating a certificate signing request (CSR), make sure to specify the wildcard domain (for example, "*.yourdomain.com") as the common name (CN). To create a Base64-encoded request file for a wildcard certificate, run the following command:
$txtrequest = New-ExchangeCertificate -PrivateKeyExportable $True -GenerateRequest -FriendlyName "Contoso.com Wildcard Cert" -SubjectName "C=US,CN=*.contoso.com"
[System.IO.File]::WriteAllBytes('\FileServer01\Data\Contoso Wildcard Cert.req', [System.Text.Encoding]::Unicode.GetBytes($txtrequest))
3.Submit the CSR to the CA of your choice to obtain a wildcard certificate.
certreq -submit -attrib CertificateTemplate:Webserver
4.Import the certificate using the Exchange Management Shell (EMS):
Import-ExchangeCertificate -FileData ([Byte[]]$(Get-Content -Path “C:\Path\To\Your\Certificate.pfx” -Encoding Byte -ReadCount 0)) -password (ConvertTo-SecureString -String 'YourPfxPassword' -AsPlainText -force)
5.Assign the new wildcard certificate to the desired Exchange services (SMTP, IMAP, POP, IIS):
Enable-ExchangeCertificate -Thumbprint [YourCertificateThumbprint] -Services “SMTP, IMAP, POP, IIS”
6.Use the EMC (Exchange Management Console) or ECP (Exchange Admin Center) to verify that the services are assigned and the wildcard certificate is being used.
7.In DNS Manager, make sure the DNS records are correctly pointing to the servers for the services you are using.
Please feel free to contact me if you have any queries.
Best,
Jake Zhang