Within the Globus GSI Proxy Library, all proxy operations require a handle parameter. Currently, only one proxy operation may be in progress at once per proxy handle.
This section defines operations to create, modify and destroy GSI Proxy handles.
GSI Proxy Handle. An GSI Proxy handle is used to associate state with a group of operations. Handles can have immutable attributes associated with them. All proxy operations take a handle pointer as a parameter.
Initialize a GSI Proxy handle. Initialize a proxy handle which can be used in subsequent operations. The handle may only be used in one sequence of operations at a time.
Parameters:
handle A pointer to the handle to be initialized. If the handle is originally NULL, space is allocated for it. Otherwise, the current values of the handle are overwritten.
handle_attrs Initial attributes to be used to create this handle.
Returns:
GLOBUS_SUCCESS unless an error occurred, in which case, a globus error object ID is returned
Get the certificate request from a GSI Proxy handle. Parameters:
handle The handle from which to get the certificate request
req Parameter used to return the request. It is the users responsibility to free the returned request.
Returns:
GLOBUS_SUCCESS unless an error occurred, in which case, a globus error object ID is returned
Get the private key from a GSI Proxy handle. Parameters:
handle The handle from which to get the private key
proxy_key Parameter used to return the key. It is the users responsibility to free the returned key.
Returns:
GLOBUS_SUCCESS unless an error occurred, in which case, a globus error object ID is returned
Determine the type of proxy that will be generated when using this handle. Parameters:
handle The handle from which to get the type
type Parameter used to return the type.
Returns:
GLOBUS_SUCCESS unless an error occurred, in which case, a globus error object ID is returned
See also:
globus_gsi_proxy_handle_set_type()
globus_result_t globus_gsi_proxy_handle_set_policy (globus_gsi_proxy_handle_t handle, unsigned char * policy_data, int policy_length, int policy_language_NID)
Set the policy to be used in the GSI Proxy handle. This function sets the policy to be used in the proxy cert info extension.
Parameters:
handle The handle to be modified.
policy_data The policy data.
policy_length The length of the policy data
policy_language_NID The NID of the policy language.
Returns:
GLOBUS_SUCCESS if the handle and its associated fields are valid otherwise an error is returned
See also:
globus_gsi_proxy_handle_get_policy()
globus_result_t globus_gsi_proxy_handle_set_pathlen (globus_gsi_proxy_handle_t handle, long pathlen)
Set the path length to be used in the GSI Proxy handle. This function sets the path length to be used in the proxy cert info extension.
Parameters:
handle The handle to be modified.
pathlen The maximum allowable path length
Returns:
GLOBUS_SUCCESS if the handle is valid, otherwise an error is returned
See also:
globus_gsi_proxy_handle_get_pathlen()
globus_result_t globus_gsi_proxy_handle_get_time_valid (globus_gsi_proxy_handle_t handle, int * time_valid)
Get the validity time of the proxy. Parameters:
handle The proxy handle to get the expiration date of
time_valid expiration date of the proxy handle
Returns:
GLOBUS_SUCCESS unless an error occurred, in which case, a globus error object ID is returned
Clear the proxy cert info extension stored in the GSI Proxy handle. This function clears proxy cert info extension related setting in the GSI Proxy handle.
Parameters:
handle The handle for which to clear the proxy cert info extension.
Returns:
GLOBUS_SUCCESS if the handle is valid, otherwise an error is returned
Get the proxy cert info extension stored in the GSI Proxy handle. This function retrieves the proxy cert info extension from the GSI Proxy handle.
Parameters:
handle The handle from which to get the proxy cert info extension.
pci Contains the proxy cert info extension upon successful return. If the handle does not contain a pci extension, this parameter will be NULL upon return.
Returns:
GLOBUS_SUCCESS upon success GLOBUS_GSI_PROXY_ERROR_WITH_HANDLE if handle is invalid GLOBUS_GSI_PROXY_ERROR_WITH_PROXYCERTINFO if the pci pointer is invalid or if the get failed.
Get the proxy common name stored in the GSI Proxy handle. This function retrieves the proxy common name from the GSI Proxy handle. The common name only impacts draft compliant proxies.
Parameters:
handle The handle from which to get the proxy common name.
common_name Contains the proxy common name upon successful return. If the handle does not contain a common name, this parameter will be NULL upon return.
Returns:
GLOBUS_SUCCESS upon success GLOBUS_GSI_PROXY_ERROR_WITH_HANDLE if handle is invalid
Set the type of proxy that will be generated when using this handle. Note that this will have no effect when generating a proxy from a proxy. In that case the generated proxy will inherit the type of the parent.
Parameters:
handle The handle for which to set the type
type Parameter used to pass the type.
Returns:
GLOBUS_SUCCESS unless an error occurred, in which case, a globus error object ID is returned
See also:
globus_gsi_proxy_handle_set_type()
globus_result_t globus_gsi_proxy_handle_get_policy (globus_gsi_proxy_handle_t handle, unsigned char ** policy_data, int * policy_length, int * policy_NID)
Get the policy from the GSI Proxy handle. This function gets the policy that is being used in the proxy cert info extension.
Parameters:
handle The handle to be interrogated.
policy_data The policy data.
policy_length The length of the returned policy
policy_NID The NID of the policy language.
Returns:
GLOBUS_SUCCESS if the handle is valid, otherwise an error is returned
See also:
globus_gsi_proxy_handle_set_policy()
globus_result_t globus_gsi_proxy_handle_get_pathlen (globus_gsi_proxy_handle_t handle, int * pathlen)
Get the path length from the GSI Proxy handle. This function gets the path length that is being used in the proxy cert info extension.
Parameters:
handle The handle to be interrogated.
pathlen The maximum allowable path length
Returns:
GLOBUS_SUCCESS if the handle is valid, otherwise an error is returned
See also:
globus_gsi_proxy_handle_set_pathlen()
globus_result_t globus_gsi_proxy_handle_set_time_valid (globus_gsi_proxy_handle_t handle, int time_valid)
Set the validity time of the proxy. Parameters:
handle The proxy handle to set the expiration date for
time_valid desired expiration date of the proxy
Returns:
GLOBUS_SUCCESS unless an error occurred, in which case, a globus error object ID is returned GLOBUS_SUCCESS
Set the proxy cert info extension stored in the GSI Proxy handle. This function sets the proxy cert info extension in the GSI Proxy handle.
Parameters:
handle The handle for which to set the proxy cert info extension.
pci The proxy cert info extension to set.
Returns:
GLOBUS_SUCCESS upon success GLOBUS_GSI_PROXY_ERROR_WITH_HANDLE if handle is invalid GLOBUS_GSI_PROXY_ERROR_WITH_PROXYCERTINFO if the pci pointer is invalid or if the set failed.
Set the proxy common name stored in the GSI Proxy handle. This function sets the proxy common name in the GSI Proxy handle. Note that the common name is only used for draft compliant proxies.
Parameters:
handle The handle for which to set the proxy common name.
common_name The proxy common name to set.
Returns:
GLOBUS_SUCCESS upon success GLOBUS_GSI_PROXY_ERROR_WITH_HANDLE if handle is invalid