我在使用 gss_export_name 导出名称时遇到问题,虽然一旦名称被导出,我应该能够打印它,但我打开了一个空白字面导出名称:,导出名称长度:47
这是我的代码
OM_uint32 major_status;
gss_cred_usage_t usage;
OM_uint32 lifetime;
gss_name_t inquired_name;
major_status = gss_inquire_cred(&minor_status, GSS_C_NO_CREDENTIAL, &inquired_name,
&lifetime, &usage, &oid_set);
gss_buffer_desc exported_name_buffer;
major_status = gss_export_name(&minor_status, inquired_name, &exported_name_buffer);
printf("EXPORTED NAME: %s, EXPORTED NAME LENGTH: %d\n",
exported_name_buffer.value, exported_name_buffer.length);
为了清楚起见,我决定不包括检查,但我也注意确保 major_status 始终 == GSS_S_COMPLETE 感谢任何想法