Hi i am creating an encrypted chat program and its going well.

Is there any way for the client to save the servers certificate? The warning "The certificate is self-signed and untrusted" is kinda annoying...

Some code examples would be great.