The behaviour is undefined when calling SSL_write() with num=0.