Server shall use it's own private key to sign the cert req. Your code is
trying to use public key from the certificate request.

Use
*X509_sign(m_req_reply, m_pukey, EVP_md5()); *
instead of
*X509_sign(m_req_reply, pkey, EVP_md5());*

Your notation is little confusing. When an RSA structure is assigned to
EVP_PKEY structure, EVP_PKEY holds both public and private components. So,
naming it m_pukey is not justified.

In Client's SetCert function, where are you writing out the cert? out is
pointing to NULL.

Thanks,
Thulasi.

On 30 September 2014 23:24, Amir Reda <amirale...@gmail.com> wrote:

> dear all
> hope all are well. i have made a client server code the server is the
> certificate authority and the client send a certificate request the server
> got the request and reply with a certificate i have tried to put the
> certificate in a file in a pem format in order to make sure the certificate
> has been created but nothing created. and there are no compilation error
>
> please just try the code i can't see anything wrong with it please help
>
> 2- if i want to send the generated certificate to another client and make
> a verification code for that how can i made something like that i have
> searched in crypto
> https://www.openssl.org/docs/crypto/x509.html#
> but i couldn't find any function to do that
>
> thx allot for help
>
>
>
> --
> Warmest regards and best wishes for a good health,*urs sincerely *
> *mero*
>
  • certificates Amir Reda
    • Re: certificates Thulasi Goriparthi

Reply via email to