For backward compatibility with earlier versions of the GSS-API, this implementation of the GSS-API supports the function gss_str_to_oid(). gss_str_to_oid() converts a string representing a mechanism or QOP (either as a number or a word) to an OID.
gss_str_to_oid(), gss_oid_to_str(), and gss_release_oid() are not supported by some implementations of the GSS-API in order to discourage the use of explicit, non-default mechanisms and QOPs.
The string can be hard-coded in the application, or come from user input. However, not all implementations of the GSS-API support this function, so applications shouldn't rely on it.
Note that the number representing a mechanism can have two different formats. The first
{ 1 2 3 4 }
1.2.3.4
Because gss_str_to_oid() allocates GSS-API dataspace, the gss_release_oid() function exists, to remove the allocated OID when you've finished with it. Like gss_str_to_oid(), gss_release_oid() is not a generally supported function and should not be relied upon in programs that aspire to universal portability.