I generated a certificate with developer.apple.com for publishing my app in Apple App Store and downloaded .cer file. Doubly clicked on .cer file, selected "System" at the bottom-right corner and pressed "Apply" button:
entered admin password and clicked "Modify Keychain".
My understanding was that by doing so I made the certificate trusted, but when I doubly clicked on the .cer file again I saw this:
and was unable to add the certificate to iCloud keychain getting error Error: -25294.
I do not understand well enough what is iCloud keychain for, I have some manual telling me that I need to add the certificate to iCloud to sing my app with it and publish my app.
I did some further Google search and selected "Always Trust":
and pressed "OK" button, but it did not have an effect.