2 * Copyright (c) 2014 <copyright holder> <email>
4 * For license details, see the LICENSE file in the root of this project.
8 #include "GSSDisplayStatus.h"
12 static void disp_status(OM_uint32 status, int status_type, gss_OID mech, std::ostream &output_stream)
14 OM_uint32 disp_major, disp_minor, disp_context;
15 gss_buffer_desc disp_buf;
20 disp_major = gss_display_status(&disp_minor,
26 if (GSS_ERROR(disp_major))
28 output_stream << "Internal, unknown GSS error";
29 break; // Get out of this loop.
31 output_stream << (char *)disp_buf.value;
32 } while (disp_context != 0);
36 GSSDisplayStatus::GSSDisplayStatus(OM_uint32 major,
40 std::stringstream major_stream;
41 std::stringstream minor_stream;
45 disp_status(major, GSS_C_GSS_CODE, mech, major_stream);
46 majorMessage = major_stream.str();
48 disp_status(minor, GSS_C_MECH_CODE, mech, minor_stream);
49 minorMessage = minor_stream.str();
52 GSSDisplayStatus::~GSSDisplayStatus()