示例#1
0
		public GenericXmlSecurityToken ToObject (NativeInfocardCryptoHandle proofTokenHandle, SecurityTokenSerializer serializer)
		{
			XmlDocument doc = new XmlDocument ();
			doc.LoadXml (xml_token);
			XmlElement token = doc.DocumentElement;
			SecurityToken proof = new CardSpaceProofToken (DateTime.FromFileTime (proofTokenHandle.Expiration), proofTokenHandle.GetAsymmetricKey ());

			DateTime effective = DateTime.FromFileTime (created);
			DateTime expiration = DateTime.FromFileTime (expired);

			SecurityKeyIdentifierClause intref =
				serializer.ReadKeyIdentifierClause (Create (internal_ref));
			SecurityKeyIdentifierClause extref =
				serializer.ReadKeyIdentifierClause (Create (external_ref));
			return new GenericXmlSecurityToken (token, proof, effective, expiration, intref, extref, null);
		}
        public GenericXmlSecurityToken ToObject(NativeInfocardCryptoHandle proofTokenHandle, SecurityTokenSerializer serializer)
        {
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(xml_token);
            XmlElement    token = doc.DocumentElement;
            SecurityToken proof = new CardSpaceProofToken(DateTime.FromFileTime(proofTokenHandle.Expiration), proofTokenHandle.GetAsymmetricKey());

            DateTime effective  = DateTime.FromFileTime(created);
            DateTime expiration = DateTime.FromFileTime(expired);

            SecurityKeyIdentifierClause intref =
                serializer.ReadKeyIdentifierClause(Create(internal_ref));
            SecurityKeyIdentifierClause extref =
                serializer.ReadKeyIdentifierClause(Create(external_ref));

            return(new GenericXmlSecurityToken(token, proof, effective, expiration, intref, extref, null));
        }
示例#3
0
		static extern int GetToken (int cPolicyChain,
			NativePolicyElement [] pPolicyChain,
			out NativeGenericXmlToken securityToken,
			out NativeInfocardCryptoHandle phProofTokenCrypto);
 static extern int GetToken(int cPolicyChain,
                            NativePolicyElement [] pPolicyChain,
                            out NativeGenericXmlToken securityToken,
                            out NativeInfocardCryptoHandle phProofTokenCrypto);
示例#5
0
 public AsymmetricProofTokenSecurityKey(NativeAsymmetricCryptoParameters parameters, NativeInfocardCryptoHandle handle)
 {
     this.parameters = parameters;
     this.handle     = handle;
 }
示例#6
0
 static extern void CloseCryptoHandle(NativeInfocardCryptoHandle handle);
		public AsymmetricProofTokenSecurityKey (NativeAsymmetricCryptoParameters parameters, NativeInfocardCryptoHandle handle)
		{
			this.parameters = parameters;
			this.handle = handle;
		}
		static extern void CloseCryptoHandle (NativeInfocardCryptoHandle handle);