Topic: i got the server's public key

i got the server's public key like this :
-----BEGIN RSA PUBLIC KEY-----
MIGJAoGBANA0SPVdEgBMCBo4WMeKl6lEM8swJsu+8Rq0usMkdcq8GxsD445x+EtF
+Dmalx6rSR5M7mNARLdsALd2pr3HVLuSSe4bCC26u1PBsOVeszhEzdr7NWiGy3bI
fW6ddTCt0VMC75PrsVmCB2oavp8GKI09Y0TsegxiM6MN6bj33eJtAgMBAAE=
-----END RSA PUBLIC KEY-----

and how to pair with the server?

Share

Re: i got the server's public key

Hi zhbn,

You can load a server's RSA private key into a wolfSSL server using the following function:

int wolfSSL_CTX_use_PrivateKey_file(WOLFSSL_CTX* ctx, const char* file,int format)

This function is able to accept both PEM and DER formatted keys, using SSL_FILETYPE_PEM for the "format" argument with PEM encoded keys and SSL_FILETYPE_ASN1 for the "format" argument for DER encoded keys.

Best Regards,
Chris