I wrote application client-server. Now I would like to add safe connection.
When client connect to server - server send certificate in
Now I want to extract from this file the public key and validate certificate - check it is safe.
I use Lazarus/Delphi/Free Pascal
Can you tell me how can I extract from this file public key ready for use in hexadecimal (byte) format?
I know that in this file is $p$, $q$ and rest but I want final public key ready to use.
Maybe if not in my programming language then I can do this on my computer? Linxu, Windows?
How can I do this with private key? I have key in file with header:
-----BEGIN RSA PRIVATE KEY-----