In this post I am going to show how to compare X509 distinguished name using BouncyCastle. Distinguished names are used to specify the subject and issuer identity in X509 certificate. Distinguished name(DN) is like a LDAP directory name and contains one or more relative distinguished name(RDN) separated by comma. The...
[Read More]
Exporting RSA public key in PKCS#1 format
Recently I was working on task in which I had to generate a RSA key pair and export the public key to another application in PEM format. I implemented the task with help of BouncyCastle(code below) but the exported public key is not accepted by the other application. ```c# static...
[Read More]
Constructing .NET RSACryptoServiceProvider from DER bytes
In my current task I have to construct private key object from its DER bytes. In OpenSSL I can easily do this with d2i_RSAPrivateKey function but in .NET this doesn’t seems to be an easy task. I hoped in BouncyCastle this can be done in single method call but it...
[Read More]
Scripting Notepad++ with Python
In this post I am going explain how Notepad++ can be scripted with Python. I came to know about this as I wanted to analyse huge amount of console logs.
[Read More]
Handling pre-shutdown notification in C# Windows service
In this post I am going to explain how pre-shutdown notification can be enabled and handled in C# Windows service.
[Read More]