-
Notifications
You must be signed in to change notification settings - Fork 683
Description
I'm trying to figure out how to use self signed certificates to prevent MITM. I managed to create a cert via the certtool (the output includes other metadata and shows the cert in base64 - why doesn't it just export to a binary file as that's what SetCertificate() expects anyway? Or am I wrong here?) and then hardcoding the key with STEAMNETWORKINGSOCKETS_HARDCODED_ROOT_CA_KEY (this is required because it's self signed right?). But now it's complaining about it missing a private key. I can't really find how to set this to be honest. It seems like the private key could either be part of the cert (I can't find how to embed this) or setting it manually, but I can't find the API for this.
Any guidance is much appreciated. Perhaps some documentation on the subject wouldn't be a bad idea either. The documentation in isteamnetworkingsockets.h is pretty good in general, but there's very little about setting up encryption using self signed keys, which is pretty necessary for any serious game. Unless I'm just looking in the wrong place.
A basic example on how to set this up would be absolutely fantastic.