Different realms

Imanuel Greenfeld imanuel.greenfeld1 at ntlworld.com
Sun Jan 28 15:54:16 EST 2018


Thank you Robbie.

Appreciated.

The problem is that we're 6 months into the project and we'll have to start
again using libcurl instead of gSoap.

So I'm re-sending you the existing code.  Any ideas how this needs to change
so that I can authenticate ?


struct SOAP_ENV__Header
{
    struct ns3__Header *ns3__MyHeader;  
};

struct ns3__Header
{
    char *Username;    
    char *Password;
};

soap * mysoap = soap_new1(SOAP_C_UTFSTRING);  
soap_init(&mysoap);
mysoap.header = (SOAP_ENV__Header *)soap_malloc(&mysoap,
sizeof(SOAP_ENV__Header));
mysoap.header->ns3__MyHeader = (ns3__Header*)malloc(sizeof(ns3__Header));


/******  I know that hard coding username and password is contrary to
Kerberos but I'm just trying to see if I can pass the authentication.
******/

mysoap.header->ns3__MyHeader->Username = (char*)malloc(10 * sizeof(char));
strcpy(mysoap.header->ns3__MyHeader-> Username,  "<username>");


mysoap.header->ns3__MyHeader-> Password = (char*)malloc(10 * sizeof(char));
strcpy(mysoap.header->ns3__MyHeader-> Password,  "<password>");

const char *endpointURL = "http://...";
value request(mysoap), response(mysoap);   

... // now populate the request data to send
request[0] = ...;                
request[1] = ...;                

if (json_call(mysoap, endpointURL, request, response))
{
  ... // use response value
}


Thank you.

Imanuel.

-----Original Message-----
From: Robbie Harwood [mailto:rharwood at redhat.com] 
Sent: 28 January 2018 19:46
To: Imanuel Greenfeld <imanuel.greenfeld1 at ntlworld.com>; kerberos at mit.edu
Cc: 'Simo Sorce' <simo at redhat.com>
Subject: RE: Different realms

"Imanuel Greenfeld" <imanuel.greenfeld1 at ntlworld.com> writes:

> You are right using a script calling curl I managed to send the 
> request and all ok, but it's horrible idea to call curl from C++ and 
> how will I do it ?  system call ?

Curl has a library (libcurl) with bindings you can use:
https://curl.haxx.se/libcurl/

Thanks,
--Robbie



More information about the Kerberos mailing list