Mono.CompilerServices.SymbolWriter \
System \
System.XML \
+ Mono.Security \
+ System \
System.Core \
System.Json \
System.Xml.Linq
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../mono.pub")]
+
+#if MONOTOUCH
+[assembly: InternalsVisibleTo ("System, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
+#endif
{
if (!isInitialized)
{
+#if !MONOTOUCH
Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
// Debug.Listeners.Add(new TextWriterTraceListener(@"c:\ssl.log"));
Debug.AutoFlush = true;
Debug.Indent();
+#endif
isInitialized = true;
}
int count = (length - i) >= 16 ? 16 : (length - i);
for (int j = 0; j < count; j++)
{
+#if !MONOTOUCH
Debug.Write(buffer[i + j].ToString("x2") + " ");
+#endif
}
Debug.WriteLine("");
}
ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 -unsafe $(RESOURCE_FILES:%=-resource:%)
TEST_MCS_FLAGS += -r:System.Configuration
-PROFILE_2_OR_4 := $(filter net_2_0 net_4_0, $(PROFILE))
+PROFILE_2_OR_4 := $(filter net_2_0 net_4_0, $(PROFILE))
+NOT_SL := $(filter net_2_0 net_4_0 monotouch, $(PROFILE))
endif
EXTRA_DISTFILES = \
lib_file := $(wildcard ../lib/$(PROFILE)/System.dll)
ifdef lib_file
-ifdef PROFILE_2_OR_4
+ifdef NOT_SL
LIB_MCS_FLAGS += -r:PrebuiltSystem=$(lib_file)
endif
else
endif
-ifdef PROFILE_2_OR_4
+ifdef NOT_SL
# $(eval $(call cyclic-dep,Mono.Security.dll,SECURITY_DEP))
CYCLIC_DEPS += Mono.Security.dll
ifndef USE_BOOT_COMPILE
namespace System.Net.Security
{
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
public
#endif
delegate bool RemoteCertificateValidationCallback (
object sender,
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
X509Certificate certificate,
X509Chain chain,
#else
set { _securityProtocol = value; }
}
-#if NET_2_0 && !MONOTOUCH
+#if NET_2_0
public static RemoteCertificateValidationCallback ServerCertificateValidationCallback
{
get {
if (sslStream != null)
return;
+#if MONOTOUCH && SECURITY_DEP
+ sslStream = typeof (Mono.Security.Protocol.Tls.HttpsClientStream);
+#else
// HttpsClientStream is an internal glue class in Mono.Security.dll
sslStream = Type.GetType ("Mono.Security.Protocol.Tls.HttpsClientStream, " +
Consts.AssemblyMono_Security, false);
throw new NotSupportedException (msg);
}
+#endif
piClient = sslStream.GetProperty ("SelectedClientCertificate");
piServer = sslStream.GetProperty ("ServerCertificate");
piTrustFailure = sslStream.GetProperty ("TrustFailure");
}
}
}
-#elif NET_2_0 && !NET_2_1
+#elif NET_2_0 && (!NET_2_1 || MONOTOUCH)
namespace System.Security.Cryptography.X509Certificates {
public class X509Chain {
public bool Build (X509Certificate2 cert)
System.Diagnostics/ThreadState.cs
System.Diagnostics/ThreadWaitReason.cs
System.IO/MonoSyncFileStream.cs
+System.IO/MonoIO.cs
+System.IO/MonoIOError.cs
System.IO.Compression/CompressionMode.cs
System.IO.Compression/DeflateStream.cs
System.Net/UploadStringCompletedEventHandler.cs
System.Net/DownloadStringCompletedEventHandler.cs
+System.Security.Cryptography/AsnEncodedDataCollection.cs
+System.Security.Cryptography/AsnEncodedData.cs
+System.Security.Cryptography/AsnEncodedDataEnumerator.cs
+System.Security.Cryptography/OidCollection.cs
+System.Security.Cryptography/Oid.cs
+System.Security.Cryptography/OidEnumerator.cs
+
System.Security.Cryptography.X509Certificates/OpenFlags.cs
System.Security.Cryptography.X509Certificates/PublicKey.cs
System.Security.Cryptography.X509Certificates/StoreLocation.cs
[assembly: TypeLibVersion (1, 10)]
#endif
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
[assembly: InternalsVisibleTo ("System, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
[assembly: InternalsVisibleTo ("System.Windows, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
[assembly: InternalsVisibleTo ("System.Windows.Browser, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System;
using System.IO;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System;
using System.IO;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System;
using System.Globalization;
return emptySHA1;
else if (hash is SHA256)
return emptySHA256;
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
else if (hash is SHA384)
return emptySHA384;
else if (hash is SHA512)
private byte[] temp2;
private byte[] workBuff;
private byte[] workout;
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
// Silverlight 2.0 does not support any feedback mode
private int FeedBackByte;
private int FeedBackIter;
temp = new byte [BlockSizeByte];
Buffer.BlockCopy (rgbIV, 0, temp, 0, System.Math.Min (BlockSizeByte, rgbIV.Length));
temp2 = new byte [BlockSizeByte];
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
FeedBackByte = (algo.FeedbackSize >> 3);
if (FeedBackByte != 0)
FeedBackIter = (int) BlockSizeByte / FeedBackByte;
}
}
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
// Cipher-FeedBack (CFB)
protected virtual void CFB (byte[] input, byte[] output)
{
return total;
}
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
RandomNumberGenerator _rng;
private void Random (byte[] buffer, int start, int length)
get {
if (rsa == null)
return false;
-#if INSIDE_CORLIB && !NET_2_1
+#if INSIDE_CORLIB && (!NET_2_1 || MONOTOUCH)
// the easy way
if (RSA is RSACryptoServiceProvider) {
// available as internal for corlib
}
#endif
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
// Code Access Security
internal void Resolve ()
#if NET_2_0
using System.Runtime.Serialization;
#endif
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using Mono.Security.Authenticode;
#endif
return new X509Certificate (data);
}
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
[MonoTODO ("Incomplete - minimal validation in this version")]
public static X509Certificate CreateFromSignedFile (string filename)
{
#endif
}
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
[SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
private void InitFromHandle (IntPtr handle)
{
[ComVisible (true)]
[MonoTODO ("X509ContentType.SerializedCert isn't supported (anywhere in the class)")]
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
public partial class X509Certificate {
#else
public partial class X509Certificate : IDeserializationCallback, ISerializable {
switch (contentType) {
case X509ContentType.Cert:
return x509.RawData;
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
case X509ContentType.Pfx: // this includes Pkcs12
// TODO
throw new NotSupportedException ();
byte[] rawData = Load (fileName);
Import (rawData, (string)null, keyStorageFlags);
}
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
void IDeserializationCallback.OnDeserialization (object sender)
{
}
enum X509ContentType {
Unknown,
Cert,
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
// not supported by Silverlight 2.0 (NET_2_1)
SerializedCert,
Pfx,
[ComVisible (true)]
public enum X509KeyStorageFlags {
DefaultKeySet = 0,
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
// not supported by Silverlight 2.0 (NET_2_1)
UserKeySet = 1,
MachineKeySet = 2,
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Collections;
using System.Globalization;
}
return num;
}
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
// we need SHA1 support to verify the codecs binary integrity
public static string MapNameToOID (string name)
{
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Globalization;
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
using Mono.Security.Cryptography;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.IO;
using System.Globalization;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Globalization;
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.IO;
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
\r
using System.Runtime.InteropServices;
\r
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
using Mono.Security.Cryptography;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !NET_2_1
+#if NET_2_0 && !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
}
}
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
#if NET_2_0
[ComVisible (true)]
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
\r
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
\r
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
protected byte[] KeyValue;
protected KeySizes[] LegalBlockSizesValue;
protected KeySizes[] LegalKeySizesValue;
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
// Silverlight 2.0 only supports CBC
internal int FeedbackSizeValue;
internal CipherMode ModeValue;
m_disposed = false;
}
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
// No Finalizer or IDisposable.Dispose in Silverlight 2.0
// Documentation makes it "clear" that Clear MUST BE CALLED to zero out sensitive information
#else
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Globalization;
using System.Runtime.InteropServices;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
using Mono.Security.Cryptography;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Runtime.InteropServices;
using SSCX = System.Security.Cryptography.X509Certificates;
using System.Security.Permissions;
using System.Security.Cryptography.X509Certificates;
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using Mono.Security.Authenticode;
#endif
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.IO;
using System.Reflection;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Collections;
using System.Globalization;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Collections; // for IList
using System.Globalization;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
using System.Reflection;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.IO;
using System.Globalization;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Collections;
using System.Globalization;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
using System.Collections;
using System.Globalization;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_1
+#if NET_2_1 && !MONOTOUCH
using System.Reflection;
using System.Security.Policy;
namespace System.Security {
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
[MonoTODO ("Only supported by the runtime when CoreCLR is enabled")]
#endif
[AttributeUsage (AttributeTargets.All, AllowMultiple=false, Inherited=false)]
namespace System.Security {
-#if !NET_2_1
+#if !NET_2_1 || MONOTOUCH
[MonoTODO ("Only supported by the runtime when CoreCLR is enabled")]
#endif
[AttributeUsage (AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]