---
name: "globus_gsi_sysconfig_win32"
section: "3"
platform: "linux"
package: "libglobus-gsi-sysconfig-doc"
version: "9.6-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_gsi_sysconfig_win32"
---

# globus\_gsi\_sysconfig\_win32(3)

Functions for Win32 platforms - Functions for Win32 platforms.

## NAME

globus\_gsi\_sysconfig\_win32 - Functions for Win32 platforms

 \- Functions for Win32 platforms.

## SYNOPSIS

### Functions

globus\_result\_t **globus\_gsi\_sysconfig\_set\_key\_permissions\_win32** (char \*filename)\
 Win32 - Set Key Permissions.  globus\_result\_t **globus\_gsi\_sysconfig\_file\_exists\_win32** (const char \*filename)\
 Win32 - File Exists.  globus\_result\_t **globus\_gsi\_sysconfig\_dir\_exists\_win32** (const char \*filename)\
 Win32 - Directory Exists.  globus\_result\_t **globus\_gsi\_sysconfig\_get\_current\_working\_dir\_win32** (char \*\*working\_dir)\
 Win32 - Get Current Working Directory.  globus\_result\_t **globus\_gsi\_sysconfig\_make\_absolute\_path\_for\_filename\_win32** (char \*filename, char \*\*absolute\_path)\
 Win32 - Make Absolute Path.  globus\_result\_t **globus\_gsi\_sysconfig\_split\_dir\_and\_filename\_win32** (char \*full\_filename, char \*\*dir\_string, char \*\*filename\_string)\
 Win32 - Split Directory and Filename.  globus\_result\_t **globus\_gsi\_sysconfig\_get\_cert\_dir\_win32** (char \*\*cert\_dir)\
 Win32 - Get Trusted CA Cert Dir.  globus\_result\_t **globus\_gsi\_sysconfig\_get\_user\_cert\_filename\_win32** (char \*\*user\_cert, char \*\*user\_key)\
 Win32 - Get User Certificate Filename.  globus\_result\_t **globus\_gsi\_sysconfig\_get\_host\_cert\_filename\_win32** (char \*\*host\_cert, char \*\*host\_key)\
 Win32 - Get Host Certificate and Key Filenames.  globus\_result\_t **globus\_gsi\_sysconfig\_get\_service\_cert\_filename\_win32** (char \*service\_name, char \*\*service\_cert, char \*\*service\_key)\
 Win32 - Get Service Certificate and Key Filenames.  globus\_result\_t **globus\_gsi\_sysconfig\_get\_proxy\_filename\_win32** (char \*\*user\_proxy, **globus\_gsi\_proxy\_file\_type\_t** proxy\_file\_type)\
 Win32 - Get Proxy Filename.  globus\_result\_t **globus\_gsi\_sysconfig\_get\_ca\_cert\_files\_win32** (char \*ca\_cert\_dir, globus\_fifo\_t \*ca\_cert\_list)\
 Win32 - Get CA Cert Filenames.  globus\_result\_t **globus\_gsi\_sysconfig\_remove\_all\_owned\_files\_win32** (char \*default\_filename)\
 Win32 - Remove all proxies owned by current uid.  globus\_result\_t **globus\_gsi\_sysconfig\_get\_gridmap\_filename\_win32** (char \*\*filename)\
 Win32 - Get the path and file name of the grid map file.  globus\_result\_t **globus\_gsi\_sysconfig\_get\_authz\_conf\_filename\_win32** (char \*\*filename)\
 Win32 - Get the path and file name of the grid map file.  globus\_result\_t **globus\_gsi\_sysconfig\_get\_authz\_lib\_conf\_filename\_win32** (char \*\*filename)\
 Win32 - Get authorization configuration filename.  globus\_result\_t **globus\_gsi\_sysconfig\_get\_gaa\_conf\_filename\_win32** (char \*\*filename)\
 Win32 - Get the path and file name of the gaa config file.  globus\_result\_t **globus\_gsi\_sysconfig\_is\_superuser\_win32** (int \*is\_superuser)\
 Win32 - Check if the current user is root.  globus\_result\_t **globus\_gsi\_sysconfig\_get\_signing\_policy\_filename\_win32** (X509\_NAME \*ca\_name, char \*cert\_dir, char \*\*signing\_policy\_filename)\
 Win32 - Get Signing Policy Filename.

## Detailed Description

Functions for Win32 platforms.

These functions implement the Win32 version of the Globus GSI System Configuration API. **They should never be called directly, please use the provided platform independent defines.**

## Function Documentation

### globus\_result\_t globus\_gsi\_sysconfig\_dir\_exists\_win32 (const char \* filename)

Win32 - Directory Exists. Check that the directory exists

**Parameters**

*filename* the file to check

**Returns**

GLOBUS\_SUCCESS if the directory exists, otherwise an error object identifier.

### globus\_result\_t globus\_gsi\_sysconfig\_file\_exists\_win32 (const char \* filename)

Win32 - File Exists. Check that the file exists

**Parameters**

*filename* the file to check

**Returns**

GLOBUS\_SUCCESS (even if the file doesn't exist) - in some abortive cases an error object identifier is returned

### globus\_result\_t globus\_gsi\_sysconfig\_get\_authz\_conf\_filename\_win32 (char \*\* filename)

Win32 - Get the path and file name of the grid map file. Get the path and file name of the authorization callback configuration file

**Parameters**

*filename* Contains the location of the authorization callback configuration file upon successful return

**Returns**

GLOBUS\_SUCCESS if no error occurred, otherwise an error object ID is returned

### globus\_result\_t globus\_gsi\_sysconfig\_get\_authz\_lib\_conf\_filename\_win32 (char \*\* filename)

Win32 - Get authorization configuration filename. Get the path and file name of the authorization callback library configuration file

**Parameters**

*filename* Contains the location of the authorization callback library configuration file upon successful return

**Returns**

GLOBUS\_SUCCESS if no error occurred, otherwise an error object ID is returned

### globus\_result\_t globus\_gsi\_sysconfig\_get\_ca\_cert\_files\_win32 (char \* ca\_cert\_dir, globus\_fifo\_t \* ca\_cert\_list)

Win32 - Get CA Cert Filenames. Gets a list of trusted CA certificate filenames in a trusted CA certificate directory. \

**Parameters**

*ca\_cert\_dir* The trusted CA certificate directory to get the filenames from \
 *ca\_cert\_list* The resulting list of CA certificate filenames. This is a globus list structure. \

**See also**

globus\_fifo\_t

**Returns**

GLOBUS\_SUCCESS if no error occurred, otherwise an error object ID is returned

### globus\_result\_t globus\_gsi\_sysconfig\_get\_cert\_dir\_win32 (char \*\* cert\_dir)

Win32 - Get Trusted CA Cert Dir. Get the Trusted Certificate Directory containing the trusted Certificate Authority certificates. This directory is determined in the order shown below. Failure in one method results in attempting the next.

- 1\.

  **X509\_CERT\_DIR environment variable** - if this is set, the trusted certificates will be searched for in that directory. This variable allows the end user to specify the location of trusted certificates.

- 2\.

  **x509\_cert\_dir registry key** - If this registry key is set on windows, the directory it points to should contain the trusted certificates. The path to the registry key is software\\Globus\\GSI

- 3\.

  **\\\<user home directory\>\\.globus\\certificates** - If this directory exists, and the previous methods of determining the trusted certs directory failed, this directory will be used. \

- 4\.

  **Host Trusted Cert Dir** - This location is intended to be independent of the globus installation ($GLOBUS\_LOCATION), and is generally only writeable by the host system administrator. \

- 5\.

  **Globus Install Trusted Cert Dir** - this is $GLOBUS\_LOCATION\\share\\certificates. \

**Parameters**

*cert\_dir* The trusted certificates directory

**Returns**

GLOBUS\_SUCCESS if no error occurred, and a sufficient trusted certificates directory was found. Otherwise, an error object identifier returned.

### globus\_result\_t globus\_gsi\_sysconfig\_get\_current\_working\_dir\_win32 (char \*\* working\_dir)

Win32 - Get Current Working Directory. Get the current working directory on a windows system

**Parameters**

*working\_dir* The working directory to get

**Returns**

GLOBUS\_SUCCESS if no error occurred, otherwise an error object ID is returned

### globus\_result\_t globus\_gsi\_sysconfig\_get\_gaa\_conf\_filename\_win32 (char \*\* filename)

Win32 - Get the path and file name of the gaa config file. Get the path and file name of the gaa config configuration file .

**Parameters**

*filename* Contains the location of the authorization callback configuration file upon successful return

**Returns**

GLOBUS\_SUCCESS if no error occurred, otherwise an error object ID is returned

### globus\_result\_t globus\_gsi\_sysconfig\_get\_gridmap\_filename\_win32 (char \*\* filename)

Win32 - Get the path and file name of the grid map file. Get the path and file name of the grid map file.

**Parameters**

*filename* Contains the location of the grid map file upon successful return

**Returns**

GLOBUS\_SUCCESS if no error occurred, otherwise an error object ID is returned

### globus\_result\_t globus\_gsi\_sysconfig\_get\_host\_cert\_filename\_win32 (char \*\* host\_cert, char \*\* host\_key)

Win32 - Get Host Certificate and Key Filenames. Get the Host Certificate and Key Filenames based on the current user's environment. The host cert and key are searched for in the following locations (in order):

- 1\.

  X509\_USER\_CERT and X509\_USER\_KEY environment variables

- 2\.

  registry keys x509\_user\_cert and x509\_user\_key in software\\Globus\\GSI

- 3\.

  **\<GLOBUS\_LOCATION\>\\etc\\host\[cert\|key\].pem**

- 4\.

  **\<users home directory\>\\.globus\\host\[cert\|key\].pem**

**Parameters**

*host\_cert* pointer to the host certificate filename \
 *host\_key* pointer to the host key filename

**Returns**

GLOBUS\_SUCCESS if the host cert and key were found, otherwise an error object identifier is returned

### globus\_result\_t globus\_gsi\_sysconfig\_get\_proxy\_filename\_win32 (char \*\* user\_proxy, globus\_gsi\_proxy\_file\_type\_t proxy\_file\_type)

Win32 - Get Proxy Filename. Get the proxy cert filename based on the following search order:

- 1\.

  X509\_USER\_PROXY environment variable - This environment variable is set by the at run time for the specific application. If the proxy\_file\_type variable is set to GLOBUS\_PROXY\_OUTPUT (a proxy filename for writing is requested), and the X509\_USER\_PROXY is set, this will be the resulting value of the user\_proxy filename string passed in. If the proxy\_file\_type is set to GLOBUS\_PROXY\_INPUT and X509\_USER\_PROXY is set, but the file it points to does not exist, or has some other readability issues, the function will continue checking using the other methods available.

- 2\.

  check the registry key: x509\_user\_proxy. Just as with the environment variable, if the registry key is set, and proxy\_file\_type is GLOBUS\_PROXY\_OUTPUT, the string set to be the proxy filename will be this registry key's value. If proxy\_file\_type is GLOBUS\_PROXY\_INPUT, and the file doesn't exist, the function will check the next method for the proxy's filename.

- 3\.

  Check the default location for the proxy file. The default location should be set to reside in the temp directory on that host, with the filename taking the format: x509\_u\<user id\> where \<user id\> is some unique string for that user on the host

**Parameters**

*user\_proxy* the proxy filename of the user \
 *proxy\_file\_type* Switch for determining whether to return a existing proxy filename or if a filename suitable for creating a proxy should be returned

**Returns**

GLOBUS\_SUCCESS or an error object identifier

### globus\_result\_t globus\_gsi\_sysconfig\_get\_service\_cert\_filename\_win32 (char \* service\_name, char \*\* service\_cert, char \*\* service\_key)

Win32 - Get Service Certificate and Key Filenames. Get the Service Certificate Filename based on the current user's environment. The host cert and key are searched for in the following locations (in order):

- 1\.

  X509\_USER\_CERT and X509\_USER\_KEY environment variables

- 2\.

  registry keys x509\_user\_cert and x509\_user\_key in software\\Globus\\GSI

- 3\.

  GLOBUS\_LOCATION\\etc\\{service\_name}\\{service\_name}\[cert\|key\].pem So for example, if my service was named: myservice, the location of the certificate would be: **\<GLOBUS\_LOCATION\>\\etc\\myservice\\myservicecert.pem**

- 4\.

  **\<users home\>\\.globus\\{service\_name}\\{service\_name}\[cert\|key\].pem**

**Parameters**

*service\_name* The name of the service which allows us to determine the locations of cert and key files to look for \
 *service\_cert* pointer to the host certificate filename \
 *service\_key* pointer to the host key filename

**Returns**

GLOBUS\_SUCCESS if the service cert and key were found, otherwise an error object identifier

### globus\_result\_t globus\_gsi\_sysconfig\_get\_signing\_policy\_filename\_win32 (X509\_NAME \* ca\_name, char \* cert\_dir, char \*\* signing\_policy\_filename)

Win32 - Get Signing Policy Filename. Get the Signing Policy Filename on the current system, based on the CA's subject name, and the trusted certificates directory

**Parameters**

*ca\_name* The X.509 subject name of the CA to get the signing policy of. The hash of the CA is generated from this\
 *cert\_dir* The trusted CA certificates directory, containing the singing\_policy files of the trusted CAs.\
 *signing\_policy\_filename* The resulting singing\_policy filename

**Returns**

GLOBUS\_SUCCESS if no error occurred, otherwise an error object ID

### globus\_result\_t globus\_gsi\_sysconfig\_get\_user\_cert\_filename\_win32 (char \*\* user\_cert, char \*\* user\_key)

Win32 - Get User Certificate Filename. Get the User Certificate Filename based on the current user's environment. The following locations are searched for cert and key files in order:

- 1\.

  environment variables X509\_USER\_CERT and X509\_USER\_KEY

- 2\.

  registry keys x509\_user\_cert and x509\_user\_key in software\\Globus\\GSI

- 3\.

  **\<users home directory\>\\.globus\\usercert.pem** and **\<users home directory\>\\.globus\\userkey.pem**

- 4\.

  **\<users home directory\>\\.globus\\usercred.p12** - this is a PKCS12 credential

**Parameters**

*user\_cert* pointer the filename of the user certificate \
 *user\_key* pointer to the filename of the user key

**Returns**

GLOBUS\_SUCCESS if the cert and key files were found in one of the possible locations, otherwise an error object identifier is returned

### globus\_result\_t globus\_gsi\_sysconfig\_is\_superuser\_win32 (int \* is\_superuser)

Win32 - Check if the current user is root. Checks whether the current user is root.

**Parameters**

*is\_superuser* 1 if the user is the superuser 0 if not

**Returns**

GLOBUS\_SUCCESS if no error occurred, otherwise an error object ID is returned

### globus\_result\_t globus\_gsi\_sysconfig\_make\_absolute\_path\_for\_filename\_win32 (char \* filename, char \*\* absolute\_path)

Win32 - Make Absolute Path. Make the filename into an absolute path string based on the current working directory.

**Parameters**

*filename* the filename to get the absolute path of. \

*absolute\_path* The resulting absolute path

**Returns**

GLOBUS\_SUCCESS if no error occurred, otherwise an error object ID is returned

### globus\_result\_t globus\_gsi\_sysconfig\_remove\_all\_owned\_files\_win32 (char \* default\_filename)

Win32 - Remove all proxies owned by current uid. Removes all proxies (all delegated and grid-proxy-init generated proxies) found in the secure temp directory that are owned by the current user.

**Parameters**

*default\_filename* The filename of the default proxy

**Returns**

GLOBUS\_SUCCESS if no error occurred, otherwise an error object ID is returned

### globus\_result\_t globus\_gsi\_sysconfig\_set\_key\_permissions\_win32 (char \* filename)

Win32 - Set Key Permissions. Set the file permissions of a file to read only by the user which are the permissions that should be set for all private keys.

**Parameters**

*filename*

**Returns**

GLOBUS\_SUCCESS or an error object id

### globus\_result\_t globus\_gsi\_sysconfig\_split\_dir\_and\_filename\_win32 (char \* full\_filename, char \*\* dir\_string, char \*\* filename\_string)

Win32 - Split Directory and Filename. Split the directory and filename portions of a filename string into two separate strings

**Parameters**

*full\_filename* \
 *dir\_string* \
 *filename\_string*

**Returns**

## Author

Generated automatically by Doxygen for globus\_gsi\_sysconfig from the source code.
