Dear Giordano,
Please use the following code sequence:
- sntl_admin_status_t status;
- sntl_admin_context_t *context = NULL;
- const char* hostname = "localhost";
- const char* password = "";
- sntl_admin_u16_t port = 1947;
- status = sntl_admin_context_new( &context, hostname, port, password);
-
- const char* scope =
- "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
- "<haspscope>"
- " <hasp id=\"xxxxxxxxxxxxx\" />" //here xxxxxxxxxxx is the key id of your master key
- "</haspscope>";
-
- const char* format =
- "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
- "<admin>"
- " <hasp>"
- " <element name=\"typename\" />"
- " <element name=\"islocal\" />"
- " </hasp>"
- "</admin>";
-
- char* info = 0;
-
- status = sntl_admin_get( context, scope, format, &info);
Now you can check the value of <islocal> tag in the XML returned in "info".
If the key is local then its value will be 1, otherwise it will be 0.
Hope this solves your purpose.
Thanks,
Ashish