gsasl  1.10.0
About: GNU SASL is an implementation of the Simple Authentication and Security Layer (SASL). Development version.
  Fossies Dox: gsasl-1.10.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

gss-extra.c File Reference
#include "gss-extra.h"
#include <string.h>
#include <stdlib.h>
Include dependency graph for gss-extra.c:

Go to the source code of this file.

Functions

int gss_oid_equal (const gss_OID first_oid, const gss_OID second_oid)
 
OM_uint32 gss_inquire_mech_for_saslname (OM_uint32 *minor_status, const gss_buffer_t sasl_mech_name, gss_OID *mech_type)
 
static void _gss_asn1_length_der (size_t len, unsigned char *ans, size_t *ans_len)
 
static OM_uint32 _gss_encapsulate_token_prefix (const char *prefix, size_t prefixlen, const char *in, size_t inlen, const char *oid, OM_uint32 oidlen, void **out, size_t *outlen)
 
OM_uint32 gss_encapsulate_token (const gss_buffer_t input_token, const gss_OID token_oid, gss_buffer_t output_token)
 
static size_t _gss_asn1_get_length_der (const char *der, size_t der_len, size_t *len)
 
static int _gss_decapsulate_token (const char *in, size_t inlen, char **oid, size_t *oidlen, char **out, size_t *outlen)
 
OM_uint32 gss_decapsulate_token (const gss_buffer_t input_token, const gss_OID token_oid, gss_buffer_t output_token)
 

Variables

static gss_OID_desc tmp
 
gss_OID GSS_C_NT_HOSTBASED_SERVICE = &tmp
 

Function Documentation

◆ _gss_asn1_get_length_der()

static size_t _gss_asn1_get_length_der ( const char *  der,
size_t  der_len,
size_t len 
)
static

Definition at line 206 of file gss-extra.c.

Referenced by _gss_decapsulate_token().

◆ _gss_asn1_length_der()

static void _gss_asn1_length_der ( size_t  len,
unsigned char *  ans,
size_t ans_len 
)
static

Definition at line 103 of file gss-extra.c.

References NULL.

Referenced by _gss_encapsulate_token_prefix().

◆ _gss_decapsulate_token()

static int _gss_decapsulate_token ( const char *  in,
size_t  inlen,
char **  oid,
size_t oidlen,
char **  out,
size_t outlen 
)
static

Definition at line 250 of file gss-extra.c.

References _gss_asn1_get_length_der().

Referenced by gss_decapsulate_token().

◆ _gss_encapsulate_token_prefix()

static OM_uint32 _gss_encapsulate_token_prefix ( const char *  prefix,
size_t  prefixlen,
const char *  in,
size_t  inlen,
const char *  oid,
OM_uint32  oidlen,
void **  out,
size_t outlen 
)
static

Definition at line 136 of file gss-extra.c.

References _gss_asn1_length_der(), NULL, and p.

Referenced by gss_encapsulate_token().

◆ gss_decapsulate_token()

OM_uint32 gss_decapsulate_token ( const gss_buffer_t  input_token,
const gss_OID  token_oid,
gss_buffer_t  output_token 
)

Definition at line 302 of file gss-extra.c.

References _gss_decapsulate_token(), gss_oid_equal(), and NULL.

Referenced by token2output().

◆ gss_encapsulate_token()

OM_uint32 gss_encapsulate_token ( const gss_buffer_t  input_token,
const gss_OID  token_oid,
gss_buffer_t  output_token 
)

Definition at line 176 of file gss-extra.c.

References _gss_encapsulate_token_prefix(), NULL, and rc.

Referenced by _gsasl_gs2_server_step().

◆ gss_inquire_mech_for_saslname()

OM_uint32 gss_inquire_mech_for_saslname ( OM_uint32 *  minor_status,
const gss_buffer_t  sasl_mech_name,
gss_OID *  mech_type 
)

Definition at line 66 of file gss-extra.c.

References NULL.

Referenced by gs2_get_oid().

◆ gss_oid_equal()

int gss_oid_equal ( const gss_OID  first_oid,
const gss_OID  second_oid 
)

Definition at line 49 of file gss-extra.c.

Referenced by _gsasl_gs2_client_step(), and gss_decapsulate_token().

Variable Documentation

◆ GSS_C_NT_HOSTBASED_SERVICE

gss_OID GSS_C_NT_HOSTBASED_SERVICE = &tmp

◆ tmp