Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative to SecurityBindingElement.CreateUserNameForCertificateBindingElement() #5636

Closed
dr-matthews opened this issue Aug 26, 2024 · 1 comment
Labels

Comments

@dr-matthews
Copy link

dr-matthews commented Aug 26, 2024

Hi, I'm trying to migrate the following code from .NET Framework 4.8 to .NET 6.0/WCF 6.2. It appears that the SecurityBindingElement.CreateUserNameForCertificateBindingElement() method and its return type (SymmetricSecurityBindingElement) are not available in WCF. Is there another way I can achieve the same thing using functinality available in WCF 6.2? If not are there any 3rd party NuGet packages that may support it? Any help would be much appreciated

private static BindingElement CreateSecurityBindingElement()
{
	var bootstrapSecurity = SecurityBindingElement.CreateUserNameForCertificateBindingElement();
	
	var security = SecurityBindingElement.CreateSecureConversationBindingElement(bootstrapSecurity);
	security.DefaultAlgorithmSuite = SecurityAlgorithmSuite.Default;
	security.IncludeTimestamp = true;
	security.MessageSecurityVersion = MessageSecurityVersion.WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10;

	return security;
}
@HongGit HongGit added the triaged label Sep 4, 2024
@HongGit
Copy link
Contributor

HongGit commented Sep 4, 2024

@dr-matthews this is not supported yet. See #5641, which tracks this class of issues.

@HongGit HongGit closed this as completed Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants