Backup-DbaDbCertificate: Don't use decryption password if certificate is encrypted by the database master key#10329
Conversation
|
@claude Can you help me find a way to create the certificate that it can be used in the test for |
|
Claude finished @andreasjordan's task in 9m 6s —— View job Analyzing the Certificate Compatibility Issue
Root causeBoth The conflict:
Solution (3 files changed)
|
…assword is also provided Restores dbatoolsci_AGCert to DMK encryption (required for AG endpoint auth). Fixes Backup-DbaDbCertificate to check PrivateKeyEncryptionType: when a cert's private key is encrypted by the database master key, skip DecryptionPassword and use the 3-param export overload instead of the 4-param one that SQL Server rejects. Updates the "all instance" backup test to use containment checks instead of an exact count, since the DMK cert will now be backed up successfully. Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
Currently we get this output in the AppVeyor tests:
To avoid this output we now create the certificate with a password.