Reputation: 1
I am attempting to create an SSL server with Polarssl. The program compiles and runs, however I encounter a segfault upon connecting to the server from a browser. It occurs in the loop in the following function. Thanks!
int db_read(SSL_STRUCT* ssl, size_t len, unsigned char* buffer){
int r;
memset(buffer, 0, len);
printf("memset successful\n");
do {
r = ssl_read(&((ssl)->ssl), buffer, len-1);
}while(r == POLARSSL_ERR_NET_WANT_READ);
if(r < 0){
printf("server forgot his reading glasses at home-- %d\n", r);
}
return r;
}
Upvotes: 0
Views: 235