Okay so excerpt code shown below.
1) Load the RSA public key
2) Load the x509
3) Create an PKEY

4) But the life of me cannot find how to set the public and verify?
    I did try a number of functions to set public key with core dump of
course.

This is just a test sample.


  testrsa = RSA_new();
  FILE *fp = fopen("x509public.pem", "r"); 
  if(PEM_read_RSAPublicKey(fp, &testrsa, NULL, NULL) == NULL) {
      printf("\n%s\n", "Error Reading public key x509public.pem");
      return; 
   }
  fclose(fp);
  printf("TEST KEY OKAY \n");

  fp =fopen("my.x509", "rb");
  if (fp==NULL){
      printf( "Error Reading x509 file\n");
     return;
 }

 X509 * x=NULL; .
 x=  PEM_read_X509(fp,&x, NULL, NULL); 
  if (x==NULL){
     fprintf(stderr,"null x509 reading\n");
     return;
  }
  fclose(fp);

printf("read x509 nicely\n");

 EVP_PKEY *pk; 

  if ((pk=EVP_PKEY_new()) == NULL){
      fprintf(stderr,"err 1\n");
      return;
    }




--
View this message in context: 
http://openssl.6102.n7.nabble.com/verify-self-signed-x-509-tp45026p45031.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to