Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Security.Cryptography;
using System.IO;
@@ -145,4 +144,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Xml;
@@ -90,4 +89,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Xml;
@@ -59,4 +58,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Security.Cryptography.X509Certificates;
using System.Xml;
@@ -139,4 +138,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Xml;
@@ -216,4 +215,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Xml;
@@ -153,7 +152,6 @@ namespace System.Security.Cryptography.Xml {
case XmlSignature.AlgorithmNamespaces.XmlDsigXsltTransform:
t = new XmlDsigXsltTransform ();
break;
#if NET_2_0
case XmlSignature.AlgorithmNamespaces.XmlDsigExcC14NTransform:
t = new XmlDsigExcC14NTransform ();
break;
@@ -163,7 +161,6 @@ namespace System.Security.Cryptography.Xml {
case XmlSignature.AlgorithmNamespaces.XmlDecryptionTransform:
t = new XmlDecryptionTransform ();
break;
#endif
default:
continue;
}
@@ -184,4 +181,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Xml;
@@ -116,4 +115,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Collections;
using System.IO;
@@ -506,4 +505,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Xml;
@@ -122,4 +121,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Collections;
using System.Runtime.CompilerServices;
@@ -174,4 +173,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Xml;
@@ -111,4 +110,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.IO;
@@ -38,4 +37,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -135,11 +135,9 @@ namespace System.Security.Cryptography.Xml {
case XmlSignature.ElementNames.RSAKeyValue:
kic = (KeyInfoClause) new RSAKeyValue ();
break;
#if NET_2_0
case XmlSignature.ElementNames.EncryptedKey:
kic = (KeyInfoClause) new KeyInfoEncryptedKey ();
break;
#endif
default:
kic = (KeyInfoClause) new KeyInfoNode ();
break;

View File

@@ -33,11 +33,7 @@ namespace System.Security.Cryptography.Xml {
public abstract class KeyInfoClause {
#if NET_2_0
protected KeyInfoClause ()
#else
public KeyInfoClause ()
#endif
{
}

View File

@@ -29,7 +29,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Xml;
@@ -89,4 +88,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -42,12 +42,10 @@ namespace System.Security.Cryptography.Xml {
{
}
#if NET_2_0
public KeyInfoName (string keyName)
{
name = keyName;
}
#endif
public string Value {
get { return name; }

View File

@@ -38,9 +38,7 @@ namespace System.Security.Cryptography.Xml {
private string URI;
private XmlElement element;
#if NET_2_0
private string type;
#endif
public KeyInfoRetrievalMethod ()
{
@@ -51,7 +49,6 @@ namespace System.Security.Cryptography.Xml {
URI = strUri;
}
#if NET_2_0
public KeyInfoRetrievalMethod (string strUri, string strType)
: this (strUri)
{
@@ -66,7 +63,6 @@ namespace System.Security.Cryptography.Xml {
type = value;
}
}
#endif
public string Uri {
get { return URI; }
@@ -84,15 +80,10 @@ namespace System.Security.Cryptography.Xml {
XmlDocument document = new XmlDocument ();
XmlElement xel = document.CreateElement (XmlSignature.ElementNames.RetrievalMethod, XmlSignature.NamespaceURI);
#if NET_2_0
if ((URI != null) && (URI.Length > 0))
xel.SetAttribute (XmlSignature.AttributeNames.URI, URI);
if (Type != null)
xel.SetAttribute (XmlSignature.AttributeNames.Type, Type);
#else
if (URI != null)
xel.SetAttribute (XmlSignature.AttributeNames.URI, URI);
#endif
return xel;
}
@@ -105,10 +96,8 @@ namespace System.Security.Cryptography.Xml {
URI = ""; // not null - so we return URI="" as attribute !!!
} else {
URI = value.Attributes [XmlSignature.AttributeNames.URI].Value;
#if NET_2_0
if (value.HasAttribute (XmlSignature.AttributeNames.Type))
Type = value.Attributes [XmlSignature.AttributeNames.Type].Value;
#endif
element = value;
}
}

View File

@@ -59,7 +59,7 @@ namespace System.Security.Cryptography.Xml {
AddCertificate (cert);
}
#if NET_2_0 && SECURITY_DEP
#if SECURITY_DEP
public KeyInfoX509Data (X509Certificate cert, X509IncludeOption includeOption)
{
if (cert == null)
@@ -125,10 +125,8 @@ namespace System.Security.Cryptography.Xml {
public void AddCertificate (X509Certificate certificate)
{
#if NET_2_0
if (certificate == null)
throw new ArgumentNullException ("certificate");
#endif
if (X509CertificateList == null)
X509CertificateList = new ArrayList ();
X509CertificateList.Add (certificate);
@@ -136,10 +134,8 @@ namespace System.Security.Cryptography.Xml {
public void AddIssuerSerial (string issuerName, string serialNumber)
{
#if NET_2_0
if (issuerName == null)
throw new ArgumentException ("issuerName");
#endif
if (IssuerSerialList == null)
IssuerSerialList = new ArrayList ();
@@ -155,7 +151,6 @@ namespace System.Security.Cryptography.Xml {
SubjectKeyIdList.Add (subjectKeyId);
}
#if NET_2_0
[ComVisible (false)]
public void AddSubjectKeyId (string subjectKeyId)
{
@@ -167,7 +162,6 @@ namespace System.Security.Cryptography.Xml {
id = Convert.FromBase64String (subjectKeyId);
SubjectKeyIdList.Add (id);
}
#endif
public void AddSubjectName (string subjectName)
{
@@ -179,20 +173,6 @@ namespace System.Security.Cryptography.Xml {
public override XmlElement GetXml ()
{
#if !NET_2_0
// sanity check
int count = 0;
if (IssuerSerialList != null)
count += IssuerSerialList.Count;
if (SubjectKeyIdList != null)
count += SubjectKeyIdList.Count;
if (SubjectNameList != null)
count += SubjectNameList.Count;
if (X509CertificateList != null)
count += X509CertificateList.Count;
if ((x509crl == null) && (count == 0))
throw new CryptographicException ("value");
#endif
XmlDocument document = new XmlDocument ();
XmlElement xel = document.CreateElement (XmlSignature.ElementNames.X509Data, XmlSignature.NamespaceURI);
// FIXME: hack to match MS implementation

View File

@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Xml;
@@ -59,4 +58,3 @@ namespace System.Security.Cryptography.Xml {
}
}
#endif

View File

@@ -89,10 +89,8 @@ namespace System.Security.Cryptography.Xml {
public TransformChain TransformChain {
get { return chain; }
#if NET_2_0
[ComVisible (false)]
set { chain = value; }
#endif
}
public string Type {

Some files were not shown because too many files have changed in this diff Show More