Enc stop uploading if private key is missing

If no private key exists we throw a exception instead of continue silently.


fix #11926