Quantcast
Channel: Gemalto Sentinel Customer Discussions
Viewing all articles
Browse latest Browse all 1619

Re : sntl_admin_context_new_scope How login Master Key local only

$
0
0
Dear Giordano,

Please use the following code sequence:
  1. sntl_admin_status_t status;
  2. sntl_admin_context_t *context = NULL;
  3. const char* hostname = "localhost";
  4. const char* password = "";
  5. sntl_admin_u16_t port = 1947;
  6. status = sntl_admin_context_new( &context, hostname, port, password);

  7. const char* scope =
  8. "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
  9. "<haspscope>"
  10. " <hasp id=\"xxxxxxxxxxxxx\" />"     //here xxxxxxxxxxx is the key id of your master key
  11. "</haspscope>";

  12. const char* format =
  13. "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
  14. "<admin>"
  15. " <hasp>"
  16. " <element name=\"typename\" />"
  17. " <element name=\"islocal\" />"
  18. " </hasp>"
  19. "</admin>";

  20. char* info = 0;

  21. 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


Viewing all articles
Browse latest Browse all 1619

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>