hello honorable doctor all members ".." C Fu geeks and lady 

I try to use the functions correctly made ​​in native base64 openssl
i managed a simple client mail with openssl base64 encoding

I use the test client
https://github.com/fakessh/openprojectssl/blob/master/smtp_openssl.c

I try to realize as base64 encoding 
char *base64(char *input, int length)
{
  BIO *bmem, *b64;
  BUF_MEM *bptr;

  b64 = BIO_new(BIO_f_base64());
  bmem = BIO_new(BIO_s_mem());
  b64 = BIO_push(b64, bmem);
  BIO_write(b64, input, length);
  BIO_flush(b64);
  BIO_get_mem_ptr(b64, &bptr);

  char *buff = (char *)malloc(bptr->length+1);
  memcpy(buff, bptr->data, bptr->length);
  buff[bptr->length] = 0;

  BIO_free_all(b64);

  return buff;
}
but it does not work can you help me

sincerely
-- 
  http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC2626742
  gpg --keyserver pgp.mit.edu --recv-key C2626742

  http://urlshort.eu fakessh @
  http://gplus.to/sshfake
  http://gplus.to/sshswilting
  http://gplus.to/john.swilting
  https://lists.fakessh.eu/mailman/
  This list is moderated by me, but all applications will be accepted
  provided they receive a note of presentation

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée

Reply via email to