Instructions for Windows
Install Windows SDK from https://www.microsoft.com/en-us/download/details.aspx?id=8279. The installer will show the following available options:
If .NET Development is not enabled, follow these steps to continue with the installation:
1. Check for the file makecert.exe in the path C:\Program Files (x86)\Windows Kits\8.1\bin\x64\makecert.exe
a. To generate a new certificate:
"C:\Program Files (x86)\Windows Kits\8.1\bin\x64\makecert.exe" r
-pe -sky exchange -n "CN=[www.42gears.com"](http://www.42gears.com/) -ss My -sy 24 -len 2048 a sha256
b. To view your certificate, execute the command (lists down the serial no of the certificate generated):
certutil -store -user my
c. To remove a certificate:
certutil -delstore -user my SERIALNUMBER
d. To generate CER file you need to first generate CRT file then convert it to CER.
certutil -user -store -split my SERIALNUMBER YOURDER.crt certutil -encode YOURDER.crt YOURPEM.cer
e. To generate PFX with Private key
certutil -exportpfx -user [www.42gears.com](http://www.42gears.com/) YOURPKCS.pfx NoChain
A certificate will be generated. For example, the certificate will be displayed as shown in the screenshot below:
The Provider here is Microsoft Enhancec RSA and AES Cryptographic Provider.
If you use OPENSSL to generate the certificate then the provider will be Base Cryptographic Provider v1.0 or RSA and AES Cryptographic Provider which will not work with Microsoft active directory.
Useful Links:
https://core.telegram.org/bots/self-signed https://msdn.microsoft.com/en-us/library/bfsktky3(VS.100).aspx