pidgin: PurpleSslOps Struct Reference

pidgin 2.14.4

Loading...
Searching...
No Matches
Data Fields
PurpleSslOps Struct Reference

SSL implementation operations structure. More...

`#include <sslconn.h>`

## Data Fields
gboolean(* | init )(void)
| Initializes the SSL system provided.
void(* | uninit )(void)
| Unloads the SSL system.
void(* | connectfunc )(PurpleSslConnection *gsc)
| Sets up the SSL connection for a PurpleSslConnection once the TCP connection has been established.
void(* | close )(PurpleSslConnection *gsc)
| Destroys the internal data of the SSL connection provided.
size_t(* | read )(PurpleSslConnection *gsc, void *data, size_t len)
| Reads data from a connection (like POSIX read())
size_t(* | write )(PurpleSslConnection *gsc, const void *data, size_t len)
| Writes data to a connection (like POSIX send())
GList *(* | get_peer_certificates )(PurpleSslConnection *gsc)
| Obtains the certificate chain provided by the peer.
void(* | _purple_reserved2 )(void)
void(* | _purple_reserved3 )(void)
void(* | _purple_reserved4 )(void)

## Detailed Description

SSL implementation operations structure.

Every SSL implementation must provide all of these and register it via purple_ssl_set_ops() These should not be called directly! Instead, use the purple_ssl_* functions.

Definition at line 88 of file sslconn.h.

## Field Documentation

## ◆ _purple_reserved2

void(* PurpleSslOps::_purple_reserved2) (void)

Definition at line 138 of file sslconn.h.

## ◆ _purple_reserved3

void(* PurpleSslOps::_purple_reserved3) (void)

Definition at line 139 of file sslconn.h.

## ◆ _purple_reserved4

void(* PurpleSslOps::_purple_reserved4) (void)

Definition at line 140 of file sslconn.h.

## ◆ close

void(* PurpleSslOps::close) (PurpleSslConnection *gsc)

Destroys the internal data of the SSL connection provided.

Freeing gsc itself is left to purple_ssl_close()

See also
  purple_ssl_close

Definition at line 108 of file sslconn.h.

## ◆ connectfunc

void(* PurpleSslOps::connectfunc) (PurpleSslConnection *gsc)

Sets up the SSL connection for a PurpleSslConnection once the TCP connection has been established.

See also
  purple_ssl_connect

Definition at line 103 of file sslconn.h.

## ◆ get_peer_certificates

GList *(* PurpleSslOps::get_peer_certificates) (PurpleSslConnection *gsc)

Obtains the certificate chain provided by the peer.

Parameters

  gsc | Connection context

Returns
  A newly allocated list containing the certificates the peer provided.

See also
  PurpleCertificate

Todo:
  Decide whether the ordering of certificates in this list can be guaranteed.

Definition at line 136 of file sslconn.h.

## ◆ init

gboolean(* PurpleSslOps::init) (void)

Initializes the SSL system provided.

Returns
  TRUE if initialization succeeded

See also
  purple_ssl_init

Definition at line 94 of file sslconn.h.

## ◆ read

size_t(* PurpleSslOps::read) (PurpleSslConnection *gsc, void *data, size_t len)

Reads data from a connection (like POSIX read())

Parameters

  gsc | Connection context
  data | Pointer to buffer to drop data into
  len | Maximum number of bytes to read

Returns
  Number of bytes actually written into data (which may be less than len), or <0 on error

See also
  purple_ssl_read

Definition at line 117 of file sslconn.h.

## ◆ uninit

void(* PurpleSslOps::uninit) (void)

Unloads the SSL system.

Inverse of PurpleSslOps::init.

See also
  purple_ssl_uninit

Definition at line 98 of file sslconn.h.

## ◆ write

size_t(* PurpleSslOps::write) (PurpleSslConnection *gsc, const void *data, size_t len)

Writes data to a connection (like POSIX send())

Parameters

  gsc | Connection context
  data | Data buffer to send data from
  len | Number of bytes to send from buffer

Returns
  The number of bytes written to data (may be less than len) or <0 on error

See also
  purple_ssl_write

Definition at line 126 of file sslconn.h.

The documentation for this struct was generated from the following file:

- sslconn.h