credential_net_auth_scope_create_from_server()

Create a new network-based authentication scope.

Synopsis:

#include <sys/credential/credential_net.h>
 
int credential_net_auth_scope_create_from_server(credential_net_protocol_mask_t protocols,
                                                 const char *server_name,
                                                 int server_port,
                                                 const char *resource_path,
                                                 credential_net_host_mask_t host_types,
                                                 credential_auth_scheme_mask_t auth_schemes,
                                                 credential_auth_scope_t **auth_scope)

Since:

BlackBerry 10.3.1

Arguments:

protocols

Protocols allowed in this authentication scope.

server_name

An ASCII encoded string that contains the server name (null-terminated).

server_port

Server port, or CREDENTIAL_NETWORK_PORT_ANY if any server port is allowed.

resource_path

An ASCII string that contains the resource path (null-terminated). (Optional) If set to NULL, then any resource path is allowed.

host_types

The types of network host that are allowed in this authentication scope.

auth_schemes

Authentication schemes allowed in this authentication scope. If the authentication scheme is unknown use CREDENTIAL_AUTH_SCHEME_ANY or CREDENTIAL_AUTH_SCHEME_ANY_SECURE.

auth_scope

On return, a pointer to the network-based authentication scope structure, You must call credential_auth_scope_release() to release this structure when you're done using it. This is an optional parameter. If set to 0, then no return value is assigned.

Library:

libcredential (For the qcc command, use the -l bps option to link against this library)

Description:

This function allocates and initializes a new credential_auth_scope_t structure.

Returns:

0 if operation was successful, error code otherwise.