I'm trying to encrypt data on client side using WCF service certificate (public key) and decrypt it on server side using certificate private key. Do anyone know how to get access to current certificate in WCF service?
On client side it was easy to implement, I needed only to handle ServerCertificateValidationCallback
.
I tried to access it by OperationContext.Current.ServiceSecurityContext.AuthorizationContext.ClaimSets
, but everytime it is null in my service.