Movatterモバイル変換


[0]ホーム

URL:


Go to main content
oracle home

Developer's Guide to Oracle® Solaris 11.4 Security

Exit Print View

 
Search Scope:
  »  ...Documentation Home  »  Oracle Solaris 11.4 Information Library  »  Developer's Guide to Oracle® ...  »  Specifying an OID  »  Specifying a Non-Default Mechanism
Updated: November 2020
 
 

Specifying a Non-Default Mechanism

parse_oid() converts the name of a security mechanismon the command line to a compatible OID.

Example 31  Usingparse_oid() to Create a Non-Default Mechanism OID
static void parse_oid(char *mechanism, gss_OID *oid){    char        *mechstr = 0, *cp;    gss_buffer_desc tok;    OM_uint32 maj_stat, min_stat;       if (isdigit(mechanism[0])) {        mechstr = malloc(strlen(mechanism)+5);        if (!mechstr) {            printf("Couldn't allocate mechanism scratch!\n");            return;        }        sprintf(mechstr, "{ %s }", mechanism);        for (cp = mechstr; *cp; cp++)            if (*cp == '.')                *cp = ' ';        tok.value = mechstr;    } else        tok.value = mechanism;    tok.length = strlen(tok.value);    maj_stat = gss_str_to_oid(&min_stat, &tok, oid);    if (maj_stat != GSS_S_COMPLETE) {        display_status("str_to_oid", maj_stat, min_stat);        return;    }    if (mechstr)        free(mechstr);}
Copyright © 2000, 2020, Oracle and/or its affiliates. 
Previous
Next

[8]ページ先頭

©2009-2025 Movatter.jp