Closed ludvigbartholdsson closed 3 months ago
Test:
Try to load the certificate-file to a memorystream like this:
` MemoryStream ms = new MemoryStream(); using ( FileStream fs = File.OpenRead( "TestCert//Swish_Merchant_TestCertificate_1234679304.p12" ) ) { fs.CopyTo(ms); }
var clientCertificate = new SwishApi.Models.ClientCertificate()
{
CertificateAsStream = ms,
UseMachineKeySet = true,
Password = "swish"
};
`
The test console application works fine for me on windows debuging in visual studio and if i chang ethe code to read in to memorystream like you write above then i getting error when it try to read the stream that it not find any certificate instead...
Still some problems or can i close this?
I closing this now without any comments over a year
I am unable to get Swish Merchant (mCommerce) to work with cert-load via memorystream.
Error:
2022-10-03T12:33:39.819817189Z Unable to start make Swish payment request with error: System.AggregateException: One or more errors occurred. (The SSL connection could not be established, see inner exception.) 2022-10-03T12:33:39.819833890Z ---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. 2022-10-03T12:33:39.819839990Z ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. 2022-10-03T12:33:39.819844790Z ---> Interop+OpenSsl+SslException: SSL Handshake failed with OpenSSL error - SSL_ERROR_SSL. 2022-10-03T12:33:39.819849390Z ---> Interop+Crypto+OpenSslCryptographicException: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure 2022-10-03T12:33:39.819854390Z --- End of inner exception stack trace ---