Is SSL data still encrypted if there is a certificate error?
Solution 1:
The data is still encrypted. However, the endpoint has not been verified. So, the data is "secure" in that it's encrypted over the wire. However, you might be sending it to the wrong person if the certificate doesn't match up properly...
Solution 2:
What is the value of an encrypted connection if you haven't identified the party on the other end?
Say you want to send your credit card information to Amazon. Say you have a secure connection, but you don't know if it's to Amazon or to an attacker who is impersonating Amazon. Sure, you could send the credit card, and it would be encrypted, but you have no idea what party holds the keys to the encrypted data. So the encryption is of minimal value.
It will, however, protect you against a purely passive attacker. Nobody who is merely listening could decrypt the data.