1. http://www.mono-project.com/FAQ:_Security
1,Inux itself does not carry any certificates when it is released, which seems to be the opposite of windows. However, there are tools that allow us to install certificates on our own.
Mozrots -- import/# import a certificate
-- Ask-Remove/# confirm the deletion only
-- Machine # Save it to the global environment
Mozrots -- import -- sync
Or manually add the certificate
Certmgr-SSL https://T.open.com
2.ProgramJoinCodeThe HTTPS protocol is correct by default.
Using System; Using System. Security. cryptography. x509certificates; Namespace Ssltest { Class Mainclass { // Callback used to validate the Certificate in an SSL conversation Private Static Bool Validateremotecertificate ( Object Sender, x509certificate certificate, x509chain chain, system. net. Security. sslpolicyerrors policyerrors ){ Return True ; /* If (convert. toboolean (configurationmanager. appsettings ["ignoresslerrors"]) {// allow any old dodgy certificate... return true;} else {return policyerrors = sslpolicyerrors. none ;} */ } // End function validateremotecertificate Public Static Void Main ( String [] ARGs ){ // System. net. servicepointmanager. servercertificatevalidationcallback + = validateremotecertificate; System. net. servicepointmanager. servercertificatevalidationcallback + = (S, Ce, Ca, P) => True ; String Strresponse = Null ; Try {System. net. webrequest request = System. net. httpwebrequest. Create ( " Https://encrypted.google.com/ " ); System. net. httpwebresponse response = (System. net. httpwebresponse) request. getresponse (); system. Io. Stream stream = Response. getresponsestream (); system. Io. streamreader SR = New System. Io. streamreader (Stream); strresponse =Sr. readtoend (); Sr. Close (); Sr. Dispose (); stream. Dispose ();} Catch (System. Io. ioexception ex) {console. writeline ( " Failed to connect to Uri " ); Console. writeline ( " Reason: " ); Console. writeline (ex. Message); console. writeline (environment. newline); console. writeline ( " Stacktrace: " ); Console. writeline (ex. stacktrace );} Catch (System. uriformatexception ex) {console. writeline ( " Bad URI format " ); Console. writeline ( " Reason: " ); Console. writeline (ex. Message); console. writeline (environment. newline); console. writeline ( " Stacktrace: " ); Console. writeline (ex. stacktrace);} console. writeline ( " Read the following stream: " ); Console. writeline (strresponse); console. writeline (environment. newline); console. writeline ( " --- Press any key to continue --- " ); Console. readkey ();} // End sub main } // End Class mainclass } // End namespace ssltest