Blame docs/reference/gio/html/GTlsPassword.html

Packit ae235b
Packit ae235b
<html>
Packit ae235b
<head>
Packit ae235b
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit ae235b
<title>GTlsPassword: GIO Reference Manual</title>
Packit ae235b
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit ae235b
<link rel="home" href="index.html" title="GIO Reference Manual">
Packit ae235b
<link rel="up" href="tls.html" title="TLS (SSL) support">
Packit ae235b
<link rel="prev" href="GTlsInteraction.html" title="GTlsInteraction">
Packit ae235b
<link rel="next" href="resolver.html" title="DNS resolution">
Packit ae235b
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit ae235b
<link rel="stylesheet" href="style.css" type="text/css">
Packit ae235b
</head>
Packit ae235b
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit ae235b
Packit ae235b
Packit ae235b
Top  | 
Packit ae235b
                  Description  | 
Packit ae235b
                  Object Hierarchy  | 
Packit ae235b
                  Properties
Packit ae235b
Packit ae235b
Home
Packit ae235b
Up
Packit ae235b
Prev
Packit ae235b
Next
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

GTlsPassword

Packit ae235b

GTlsPassword — TLS Passwords for prompting

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GTlsPassword *
Packit ae235b
Packit ae235b
Packit ae235b
g_tls_password_new ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
const guchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_tls_password_get_value ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_tls_password_set_value ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_tls_password_set_value_full ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
const gchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_tls_password_get_description ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_tls_password_set_description ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GTlsPasswordFlags
Packit ae235b
Packit ae235b
Packit ae235b
g_tls_password_get_flags ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_tls_password_set_flags ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
const gchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_tls_password_get_warning ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_tls_password_set_warning ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Properties

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar *
Packit ae235b
description
Packit ae235b
Read / Write
Packit ae235b
Packit ae235b
Packit ae235b
GTlsPasswordFlags
Packit ae235b
flags
Packit ae235b
Read / Write
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar *
Packit ae235b
warning
Packit ae235b
Read / Write
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
 
Packit ae235b
GTlsPassword
Packit ae235b
Packit ae235b
Packit ae235b
struct
Packit ae235b
GTlsPasswordClass
Packit ae235b
Packit ae235b
Packit ae235b
enum
Packit ae235b
GTlsPasswordFlags
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Object Hierarchy

Packit ae235b
    GObject
Packit ae235b
    ╰── GTlsPassword
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Includes

Packit ae235b
#include <gio/gio.h>
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Description

Packit ae235b

Holds a password used in TLS.

Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b

g_tls_password_new ()

Packit ae235b
GTlsPassword *
Packit ae235b
g_tls_password_new (GTlsPasswordFlags flags,
Packit ae235b
                    const gchar *description);
Packit ae235b

Create a new GTlsPassword object.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

flags

Packit ae235b

the password flags

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

description

Packit ae235b

description of what the password is for

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

The newly allocated password object.

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_tls_password_get_value ()

Packit ae235b
const guchar *
Packit ae235b
g_tls_password_get_value (GTlsPassword *password,
Packit ae235b
                          gsize *length);
Packit ae235b

Get the password value. If length

Packit ae235b
 is not NULL then it will be
Packit ae235b
filled in with the length of the password value. (Note that the
Packit ae235b
password value is not nul-terminated, so you can only pass NULL
Packit ae235b
for length
Packit ae235b
 in contexts where you know the password will have a
Packit ae235b
certain fixed length.)

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

password

Packit ae235b

a GTlsPassword object

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

length

Packit ae235b

location to place the length of the password.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

The password value (owned by the password object).

Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_tls_password_set_value ()

Packit ae235b
void
Packit ae235b
g_tls_password_set_value (GTlsPassword *password,
Packit ae235b
                          const guchar *value,
Packit ae235b
                          gssize length);
Packit ae235b

Set the value for this password. The value

Packit ae235b
 will be copied by the password
Packit ae235b
object.

Packit ae235b

Specify the length

Packit ae235b
, for a non-nul-terminated password. Pass -1 as
Packit ae235b
length
Packit ae235b
 if using a nul-terminated password, and length
Packit ae235b
 will be
Packit ae235b
calculated automatically. (Note that the terminating nul is not
Packit ae235b
considered part of the password in this case.)

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

password

Packit ae235b

a GTlsPassword object

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

value

Packit ae235b

the new password value.

Packit ae235b
[array length=length]
Packit ae235b
Packit ae235b
Packit ae235b

length

Packit ae235b

the length of the password, or -1

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_tls_password_set_value_full ()

Packit ae235b
void
Packit ae235b
g_tls_password_set_value_full (GTlsPassword *password,
Packit ae235b
                               guchar *value,
Packit ae235b
                               gssize length,
Packit ae235b
                               GDestroyNotify destroy);
Packit ae235b

Provide the value for this password.

Packit ae235b

The value

Packit ae235b
 will be owned by the password object, and later freed using
Packit ae235b
the destroy
Packit ae235b
 function callback.

Packit ae235b

Specify the length

Packit ae235b
, for a non-nul-terminated password. Pass -1 as
Packit ae235b
length
Packit ae235b
 if using a nul-terminated password, and length
Packit ae235b
 will be
Packit ae235b
calculated automatically. (Note that the terminating nul is not
Packit ae235b
considered part of the password in this case.)

Packit ae235b

Virtual: set_value

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

password

Packit ae235b

a GTlsPassword object

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

value

Packit ae235b

the value for the password.

Packit ae235b
[array length=length]
Packit ae235b
Packit ae235b
Packit ae235b

length

Packit ae235b

the length of the password, or -1

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

destroy

Packit ae235b

a function to use to free the password.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_tls_password_get_description ()

Packit ae235b
const gchar *
Packit ae235b
g_tls_password_get_description (GTlsPassword *password);
Packit ae235b

Get a description string about what the password will be used for.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

password

Packit ae235b

a GTlsPassword object

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

The description of the password.

Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_tls_password_set_description ()

Packit ae235b
void
Packit ae235b
g_tls_password_set_description (GTlsPassword *password,
Packit ae235b
                                const gchar *description);
Packit ae235b

Set a description string about what the password will be used for.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

password

Packit ae235b

a GTlsPassword object

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

description

Packit ae235b

The description of the password

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_tls_password_get_flags ()

Packit ae235b
GTlsPasswordFlags
Packit ae235b
g_tls_password_get_flags (GTlsPassword *password);
Packit ae235b

Get flags about the password.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

password

Packit ae235b

a GTlsPassword object

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

The flags about the password.

Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_tls_password_set_flags ()

Packit ae235b
void
Packit ae235b
g_tls_password_set_flags (GTlsPassword *password,
Packit ae235b
                          GTlsPasswordFlags flags);
Packit ae235b

Set flags about the password.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

password

Packit ae235b

a GTlsPassword object

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

flags

Packit ae235b

The flags about the password

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_tls_password_get_warning ()

Packit ae235b
const gchar *
Packit ae235b
g_tls_password_get_warning (GTlsPassword *password);
Packit ae235b

Get a user readable translated warning. Usually this warning is a

Packit ae235b
representation of the password flags returned from
Packit ae235b
g_tls_password_get_flags().

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

password

Packit ae235b

a GTlsPassword object

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

The warning.

Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_tls_password_set_warning ()

Packit ae235b
void
Packit ae235b
g_tls_password_set_warning (GTlsPassword *password,
Packit ae235b
                            const gchar *warning);
Packit ae235b

Set a user readable translated warning. Usually this warning is a

Packit ae235b
representation of the password flags returned from
Packit ae235b
g_tls_password_get_flags().

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

password

Packit ae235b

a GTlsPassword object

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

warning

Packit ae235b

The user readable warning

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b

GTlsPassword

Packit ae235b
typedef struct _GTlsPassword GTlsPassword;
Packit ae235b

An abstract interface representing a password used in TLS. Often used in

Packit ae235b
user interaction such as unlocking a key storage token.

Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

struct GTlsPasswordClass

Packit ae235b
struct GTlsPasswordClass {
Packit ae235b
  GObjectClass parent_class;
Packit ae235b
Packit ae235b
  /* methods */
Packit ae235b
Packit ae235b
  const guchar *    ( *get_value)            (GTlsPassword  *password,
Packit ae235b
                                              gsize         *length);
Packit ae235b
Packit ae235b
  void              ( *set_value)            (GTlsPassword  *password,
Packit ae235b
                                              guchar        *value,
Packit ae235b
                                              gssize         length,
Packit ae235b
                                              GDestroyNotify destroy);
Packit ae235b
Packit ae235b
  const gchar*      ( *get_default_warning)  (GTlsPassword  *password);
Packit ae235b
};
Packit ae235b
Packit ae235b

Class structure for GTlsPassword.

Packit ae235b
Packit ae235b

Members

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

get_value ()

Packit ae235b

virtual method for g_tls_password_get_value()

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

set_value ()

Packit ae235b

virtual method for g_tls_password_set_value()

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

get_default_warning ()

Packit ae235b

virtual method for g_tls_password_get_warning() if no

Packit ae235b
value has been set using g_tls_password_set_warning()

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

enum GTlsPasswordFlags

Packit ae235b

Various flags for the password.

Packit ae235b
Packit ae235b

Members

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

G_TLS_PASSWORD_NONE

Packit ae235b
Packit ae235b

No flags

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_TLS_PASSWORD_RETRY

Packit ae235b
Packit ae235b

The password was wrong, and the user should retry.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_TLS_PASSWORD_MANY_TRIES

Packit ae235b
Packit ae235b

Hint to the user that the password has been

Packit ae235b
   wrong many times, and the user may not have many chances left.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_TLS_PASSWORD_FINAL_TRY

Packit ae235b
Packit ae235b

Hint to the user that this is the last try to get

Packit ae235b
   this password right.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Property Details

Packit ae235b
Packit ae235b

The “description” property

Packit ae235b
  “description”              gchar *
Packit ae235b

Description of what the password is for.

Packit ae235b

Flags: Read / Write

Packit ae235b

Default value: NULL

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

The “flags” property

Packit ae235b
  “flags”                    GTlsPasswordFlags
Packit ae235b

Flags about the password.

Packit ae235b

Flags: Read / Write

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

The “warning” property

Packit ae235b
  “warning”                  gchar *
Packit ae235b

Warning about the password.

Packit ae235b

Flags: Read / Write

Packit ae235b

Default value: NULL

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Generated by GTK-Doc V1.27
Packit ae235b
</body>
Packit ae235b
</html>