#if SECURITY_DEP
-#if MONOTOUCH
+#if MONOTOUCH || MONODROID
using Mono.Security.Protocol.Tls;
#else
extern alias MonoSecurity;
Exception connect_exception;
static object classLock = new object ();
static Type sslStream;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MONODROID
static PropertyInfo piClient;
static PropertyInfo piServer;
static PropertyInfo piTrustFailure;
throw new NotSupportedException (msg);
}
#endif
-#if !MONOTOUCH
+#if !MONOTOUCH && !MONODROID
piClient = sslStream.GetProperty ("SelectedClientCertificate");
piServer = sslStream.GetProperty ("ServerCertificate");
piTrustFailure = sslStream.GetProperty ("TrustFailure");
return false;
}
#if SECURITY_DEP
-#if MONOTOUCH
+#if MONOTOUCH || MONODROID
nstream = new HttpsClientStream (serverStream, request.ClientCertificates, request, buffer);
#else
object[] args = new object [4] { serverStream,
internal void GetCertificates (Stream stream)
{
// here the SSL negotiation have been done
-#if SECURITY_DEP && MONOTOUCH
+#if SECURITY_DEP && (MONOTOUCH || MONODROID)
HttpsClientStream s = (stream as HttpsClientStream);
X509Certificate client = s.SelectedClientCertificate;
X509Certificate server = s.ServerCertificate;
// if SSL is in use then check for TrustFailure
if (ssl) {
-#if SECURITY_DEP && MONOTOUCH
+#if SECURITY_DEP && (MONOTOUCH || MONODROID)
HttpsClientStream https = (s as HttpsClientStream);
if (https.TrustFailure) {
#else