private void SetSecurityTokenReference(X509Certificate2 signingCertificate, X509ReferenceType securityTokenType) { var securityTokenReference = SecurityTokenReferenceProvider.Create(signingCertificate, securityTokenType); SigningKey = GetSigningKeyFromCertificate(signingCertificate); KeyInfo = new KeyInfo(); KeyInfo.AddClause(securityTokenReference); }
/// <summary> /// Creates the <see cref="SecurityTokenReference"/> instance that must be used. /// </summary> /// <returns></returns> public SecurityTokenReference BuildSecurityTokenReference() { return(SecurityTokenReferenceProvider.Create(EncryptionCertificate, _securityTokenReferenceType)); }