Replies: 3 comments 4 replies
-
Maybe you should not use the certificate on the client side. Try without this: |
Beta Was this translation helpful? Give feedback.
-
I also tried this with a Let's Encrypt certificate (so presumed valid), same results. |
Beta Was this translation helpful? Give feedback.
-
Hey @ayende, I'm not sure if you've already resolved the issue, but I recently encountered a similar problem. It turns out that I was doing something wrong with the way I obtained the certificate. I switched to using certificates created with OpenSSL, and that solved the problem. If you have OpenSSL installed, you can generate the certificate and export it to a PKCS12 file: openssl genrsa 2048 > private.key
openssl req -new -x509 -nodes -sha1 -days 1000 -key private.key > public.cer
openssl pkcs12 -export -in public.cer -inkey private.key -out cert_key.p12 Then you can then use the file in your code: private static X509Certificate CreateCertificate()
{
var certFile = Path.Combine(Directory.GetCurrentDirectory(), "cert_key.p12");
return X509Certificate.CreateFromCertFile(certFile);
} At least, this approach worked for me. |
Beta Was this translation helpful? Give feedback.
-
I'm trying out how the
QuicListener
API to see how suitable it is, but so far I've been unable to even get it past the hello world stage.Here is my code:
When I'm trying to run that, I'm getting this error:
I'm passing the certificate, obviously, but I believe that this is related to (unstated) requirements in the certificate.
I found that this is likely the command to generate an appropriate certificate:
https://github.com/microsoft/msquic/blob/3e89ddcf94210edd2fe21b7c15310922de55142f/src/tools/sample/sample.c#L26
Using that (with):
Gives a different error:
At this point, I'm not sure what is going on and looking at the Quic tests, it looks like I'm doing the right thing.
Beta Was this translation helpful? Give feedback.
All reactions