Joel Christner wrote: > dataRead=recvfrom(connfd,readBuffer,sizeof(readBuffer),0,NULL,NULL); > for (i=0;i<strlen(readBuffer);i++) {
Umm, you just stored the number of bytes read in 'dataRead'. Why are you passing 'readBuffer' to strlen? The 'readBuffer' contains the array of bytes read from the link, it is not a C-style string. Only a C-style string may be passed to 'strlen'. > readBufferClear=decrypt(&context,readBuffer+i,1); You are passing characters one-at-a-time to your decryption function. Depending on exactly what this function does, this may indicate that you are not getting the security you expected. > if (readBufferClear!=0) strncat(readBufferFinal,readBufferClear,strlen > (readBufferClear)); > } Your 'decrypt' function takes as input a single character and returns a C-style string? Either your code is *truly* weird, or you have some basic misunderstandings about C-style strings. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]