Operate on opaque authinfo_data_t type instead of char * buffer.
Add missing retval value.