The cl-sasl Reference Manual

This is the cl-sasl Reference Manual, version 0.3.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Nov 06 12:34:41 2023 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-sasl

SASL library

Author

Magnus Henoch <>

License

BSD-style

Version

0.3.2

Dependency

ironclad (system).

Source

cl-sasl.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-sasl/cl-sasl.asd

Source

cl-sasl.asd.

Parent Component

cl-sasl (system).

ASDF Systems

cl-sasl.

Packages

cl-sasl-system.


3.1.2 cl-sasl/packages.lisp

Source

cl-sasl.asd.

Parent Component

cl-sasl (system).

Packages

sasl.


3.1.3 cl-sasl/util.lisp

Dependency

packages.lisp (file).

Source

cl-sasl.asd.

Parent Component

cl-sasl (system).

Internals

3.1.4 cl-sasl/client.lisp

Dependencies
Source

cl-sasl.asd.

Parent Component

cl-sasl (system).

Public Interface
Internals

3.1.5 cl-sasl/plain.lisp

Dependency

client.lisp (file).

Source

cl-sasl.asd.

Parent Component

cl-sasl (system).

Public Interface
Internals

3.1.6 cl-sasl/digest-md5.lisp

Dependency

client.lisp (file).

Source

cl-sasl.asd.

Parent Component

cl-sasl (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-sasl-system

Source

cl-sasl.asd.

Use List
  • asdf/interface.
  • common-lisp.

4.2 sasl

Source

packages.lisp.

Nickname

cl-sasl

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Ordinary functions

Function: choose-mechanism (available &key cleartext anonymous)

Choose an SASL mechanism from AVAILABLE.
Return the class implementing the mechanism, or nil if no mechanism is suitable.
AVAILABLE is a list of strings, naming the mechanisms offered by the server.
If CLEARTEXT is true, accept mechanisms that send passwords in clear text or with weak encryption.
If ANONYMOUS is true, use mechanisms that acquire anonymous access.

Package

sasl.

Source

client.lisp.

Function: get-mechanism (name)

Return the class name for the mechanism called NAME, or nil if not implemented.

Package

sasl.

Source

client.lisp.


5.1.2 Generic functions

Generic Reader: authc-id (object)
Generic Writer: (setf authc-id) (object)
Package

sasl.

Methods
Reader Method: authc-id ((client client))
Writer Method: (setf authc-id) ((client client))

The authentication id.
This is the user whose credentials you are providing to the server.

Source

client.lisp.

Target Slot

authc-id.

Generic Reader: authz-id (object)
Generic Writer: (setf authz-id) (object)
Package

sasl.

Methods
Reader Method: authz-id ((client client))
Writer Method: (setf authz-id) ((client client))

The authorization id.
This is the user you want to act as. You don’t need to provide it unless it is different from the authentication id.

Source

client.lisp.

Target Slot

authz-id.

Generic Function: client-step (client server-input)

Perform a step in the SASL authentication.
SERVER-INPUT is a byte vector containing the response from the server, or NIL if the client should start the exchange, or the keyword :SUCCESS if the server reported successful authentication.

Returns a byte vector to be sent in response to the server, or :SUCCESS if the client should consider authentication successful, or :FAILURE if the client should consider authentication failed. Obeying this result is important, as some mechanisms provide mutual authentication.

Package

sasl.

Source

client.lisp.

Methods
Method: client-step ((c digest-md5) server-input)
Source

digest-md5.lisp.

Method: client-step ((c plain) server-input)
Source

plain.lisp.

Generic Reader: host (object)
Generic Writer: (setf host) (object)
Package

sasl.

Methods
Reader Method: host ((client client))
Writer Method: (setf host) ((client client))

The hostname of the service.

Source

client.lisp.

Target Slot

host.

Generic Reader: mechanism-name (object)
Package

sasl.

Methods
Reader Method: mechanism-name ((client client))

automatically generated reader method

Source

client.lisp.

Target Slot

mechanism-name.

Generic Reader: password (object)
Generic Writer: (setf password) (object)
Package

sasl.

Methods
Reader Method: password ((client client))
Writer Method: (setf password) ((client client))

The password.
This is either a string, or a function taking no arguments and returning the password.

Source

client.lisp.

Target Slot

password.

Generic Reader: realm (object)
Generic Writer: (setf realm) (object)
Package

sasl.

Methods
Reader Method: realm ((digest-md5 digest-md5))
Writer Method: (setf realm) ((digest-md5 digest-md5))

The realm to which the user’s account belongs.
If it is not specified, the first realm that the server advertises will be chosen. Many servers don’t use realms.

Source

digest-md5.lisp.

Target Slot

realm.

Generic Reader: serv-name (object)
Generic Writer: (setf serv-name) (object)
Package

sasl.

Methods
Reader Method: serv-name ((client client))
Writer Method: (setf serv-name) ((client client))

The specific server you are connecting to (if different from the hostname).

Source

client.lisp.

Target Slot

serv-name.

Generic Reader: service (object)
Generic Writer: (setf service) (object)
Package

sasl.

Methods
Reader Method: service ((client client))
Writer Method: (setf service) ((client client))

The service name.
Common values include "xmpp" and "imap".

Source

client.lisp.

Target Slot

service.


5.1.3 Classes

Class: client

Abstract base class for SASL clients using various mechanisms.

Package

sasl.

Source

client.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: authc-id

The authentication id.
This is the user whose credentials you are providing to the server.

Initargs

:authentication-id

Readers

authc-id.

Writers

(setf authc-id).

Slot: authz-id

The authorization id.
This is the user you want to act as. You don’t need to provide it unless it is different from the authentication id.

Initargs

:authorization-id

Readers

authz-id.

Writers

(setf authz-id).

Slot: password

The password.
This is either a string, or a function taking no arguments and returning the password.

Type

(or string function)

Initargs

:password

Readers

password.

Writers

(setf password).

Slot: service

The service name.
Common values include "xmpp" and "imap".

Initargs

:service

Readers

service.

Writers

(setf service).

Slot: host

The hostname of the service.

Initargs

:host

Readers

host.

Writers

(setf host).

Slot: serv-name

The specific server you are connecting to (if different from the hostname).

Initargs

:serv-name

Readers

serv-name.

Writers

(setf serv-name).

Slot: mechanism-name
Allocation

:class

Readers

mechanism-name.

Writers

This slot is read-only.

Class: digest-md5

Client-side implementation of the SASL DIGEST-MD5 mechanism, as specified in RFC 2831.

Package

sasl.

Source

digest-md5.lisp.

Direct superclasses

client.

Direct methods
Direct slots
Slot: realm

The realm to which the user’s account belongs.
If it is not specified, the first realm that the server advertises will be chosen. Many servers don’t use realms.

Initargs

:realm

Readers

realm.

Writers

(setf realm).

Slot: state
Initform

:start

Readers

state.

Writers

(setf state).

Slot: nonce
Readers

nonce.

Writers

(setf nonce).

Slot: cnonce
Readers

cnonce.

Writers

(setf cnonce).

Slot: digest-uri-value
Readers

digest-uri-value.

Writers

(setf digest-uri-value).

Slot: mechanism-name
Initform

"digest-md5"

Class: plain

Client-side implementation of the SASL PLAIN mechanism, as specified in RFC 2595, section 6.

Package

sasl.

Source

plain.lisp.

Direct superclasses

client.

Direct methods
Direct slots
Slot: state
Initform

:start

Readers

state.

Writers

(setf state).

Slot: mechanism-name
Initform

"plain"


5.2 Internals


5.2.1 Special variables

Special Variable: mechanisms

List of SASL mechanisms in order of preference.
Each element is a list describing a mechanism. The first item is the name of the mechanism. The second item is the class implementing it. The remaining items are properties of the mechanism:

:CLEARTEXT Password is sent in clear text or with weak encryption :ANONYMOUS Mechanism negotiates anonymous access

Package

sasl.

Source

client.lisp.


5.2.2 Ordinary functions

Function: get-password (password)
Package

sasl.

Source

client.lisp.

Function: in-latin1-p (char)

Return non-nil if CHAR is in the ISO 8859-1 character set.

Package

sasl.

Source

util.lisp.

Function: parse-challenge (challenge &optional start accumulated)

Parse CHALLENGE and return it as an alist. Start at index START.

Package

sasl.

Source

digest-md5.lisp.

Function: response (authc-id authz-id realm password digest-uri nonce cnonce nc qop request)
Package

sasl.

Source

digest-md5.lisp.

Function: string-to-latin1-or-utf8 (string)

Convert STRING to ISO 8859-1 if possible, else to UTF-8. Return a byte vector.

Package

sasl.

Source

digest-md5.lisp.

Function: string-to-utf8 (string)

Convert STRING to UTF-8. Return a vector of unsigned-bytes.

Package

sasl.

Source

util.lisp.

Function: string-to-utf8-lisp (string)

Convert STRING to UTF-8. Return a vector of unsigned-bytes.

Package

sasl.

Source

util.lisp.


5.2.3 Generic functions

Generic Reader: cnonce (object)
Package

sasl.

Methods
Reader Method: cnonce ((digest-md5 digest-md5))

automatically generated reader method

Source

digest-md5.lisp.

Target Slot

cnonce.

Generic Writer: (setf cnonce) (object)
Package

sasl.

Methods
Writer Method: (setf cnonce) ((digest-md5 digest-md5))

automatically generated writer method

Source

digest-md5.lisp.

Target Slot

cnonce.

Generic Reader: digest-uri-value (object)
Package

sasl.

Methods
Reader Method: digest-uri-value ((digest-md5 digest-md5))

automatically generated reader method

Source

digest-md5.lisp.

Target Slot

digest-uri-value.

Generic Writer: (setf digest-uri-value) (object)
Package

sasl.

Methods
Writer Method: (setf digest-uri-value) ((digest-md5 digest-md5))

automatically generated writer method

Source

digest-md5.lisp.

Target Slot

digest-uri-value.

Generic Reader: nonce (object)
Package

sasl.

Methods
Reader Method: nonce ((digest-md5 digest-md5))

automatically generated reader method

Source

digest-md5.lisp.

Target Slot

nonce.

Generic Writer: (setf nonce) (object)
Package

sasl.

Methods
Writer Method: (setf nonce) ((digest-md5 digest-md5))

automatically generated writer method

Source

digest-md5.lisp.

Target Slot

nonce.

Generic Function: response-value (c request)
Package

sasl.

Methods
Method: response-value ((c digest-md5) request)
Source

digest-md5.lisp.

Generic Reader: state (object)
Package

sasl.

Methods
Reader Method: state ((digest-md5 digest-md5))

automatically generated reader method

Source

digest-md5.lisp.

Target Slot

state.

Reader Method: state ((plain plain))

automatically generated reader method

Source

plain.lisp.

Target Slot

state.

Generic Writer: (setf state) (object)
Package

sasl.

Methods
Writer Method: (setf state) ((digest-md5 digest-md5))

automatically generated writer method

Source

digest-md5.lisp.

Target Slot

state.

Writer Method: (setf state) ((plain plain))

automatically generated writer method

Source

plain.lisp.

Target Slot

state.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   C   D   F   G   H   I   M   N   P   R   S  
Index Entry  Section

(
(setf authc-id): Public generic functions
(setf authc-id): Public generic functions
(setf authz-id): Public generic functions
(setf authz-id): Public generic functions
(setf cnonce): Private generic functions
(setf cnonce): Private generic functions
(setf digest-uri-value): Private generic functions
(setf digest-uri-value): Private generic functions
(setf host): Public generic functions
(setf host): Public generic functions
(setf nonce): Private generic functions
(setf nonce): Private generic functions
(setf password): Public generic functions
(setf password): Public generic functions
(setf realm): Public generic functions
(setf realm): Public generic functions
(setf serv-name): Public generic functions
(setf serv-name): Public generic functions
(setf service): Public generic functions
(setf service): Public generic functions
(setf state): Private generic functions
(setf state): Private generic functions
(setf state): Private generic functions

A
authc-id: Public generic functions
authc-id: Public generic functions
authz-id: Public generic functions
authz-id: Public generic functions

C
choose-mechanism: Public ordinary functions
client-step: Public generic functions
client-step: Public generic functions
client-step: Public generic functions
cnonce: Private generic functions
cnonce: Private generic functions

D
digest-uri-value: Private generic functions
digest-uri-value: Private generic functions

F
Function, choose-mechanism: Public ordinary functions
Function, get-mechanism: Public ordinary functions
Function, get-password: Private ordinary functions
Function, in-latin1-p: Private ordinary functions
Function, parse-challenge: Private ordinary functions
Function, response: Private ordinary functions
Function, string-to-latin1-or-utf8: Private ordinary functions
Function, string-to-utf8: Private ordinary functions
Function, string-to-utf8-lisp: Private ordinary functions

G
Generic Function, (setf authc-id): Public generic functions
Generic Function, (setf authz-id): Public generic functions
Generic Function, (setf cnonce): Private generic functions
Generic Function, (setf digest-uri-value): Private generic functions
Generic Function, (setf host): Public generic functions
Generic Function, (setf nonce): Private generic functions
Generic Function, (setf password): Public generic functions
Generic Function, (setf realm): Public generic functions
Generic Function, (setf serv-name): Public generic functions
Generic Function, (setf service): Public generic functions
Generic Function, (setf state): Private generic functions
Generic Function, authc-id: Public generic functions
Generic Function, authz-id: Public generic functions
Generic Function, client-step: Public generic functions
Generic Function, cnonce: Private generic functions
Generic Function, digest-uri-value: Private generic functions
Generic Function, host: Public generic functions
Generic Function, mechanism-name: Public generic functions
Generic Function, nonce: Private generic functions
Generic Function, password: Public generic functions
Generic Function, realm: Public generic functions
Generic Function, response-value: Private generic functions
Generic Function, serv-name: Public generic functions
Generic Function, service: Public generic functions
Generic Function, state: Private generic functions
get-mechanism: Public ordinary functions
get-password: Private ordinary functions

H
host: Public generic functions
host: Public generic functions

I
in-latin1-p: Private ordinary functions

M
mechanism-name: Public generic functions
mechanism-name: Public generic functions
Method, (setf authc-id): Public generic functions
Method, (setf authz-id): Public generic functions
Method, (setf cnonce): Private generic functions
Method, (setf digest-uri-value): Private generic functions
Method, (setf host): Public generic functions
Method, (setf nonce): Private generic functions
Method, (setf password): Public generic functions
Method, (setf realm): Public generic functions
Method, (setf serv-name): Public generic functions
Method, (setf service): Public generic functions
Method, (setf state): Private generic functions
Method, (setf state): Private generic functions
Method, authc-id: Public generic functions
Method, authz-id: Public generic functions
Method, client-step: Public generic functions
Method, client-step: Public generic functions
Method, cnonce: Private generic functions
Method, digest-uri-value: Private generic functions
Method, host: Public generic functions
Method, mechanism-name: Public generic functions
Method, nonce: Private generic functions
Method, password: Public generic functions
Method, realm: Public generic functions
Method, response-value: Private generic functions
Method, serv-name: Public generic functions
Method, service: Public generic functions
Method, state: Private generic functions
Method, state: Private generic functions

N
nonce: Private generic functions
nonce: Private generic functions

P
parse-challenge: Private ordinary functions
password: Public generic functions
password: Public generic functions

R
realm: Public generic functions
realm: Public generic functions
response: Private ordinary functions
response-value: Private generic functions
response-value: Private generic functions

S
serv-name: Public generic functions
serv-name: Public generic functions
service: Public generic functions
service: Public generic functions
state: Private generic functions
state: Private generic functions
state: Private generic functions
string-to-latin1-or-utf8: Private ordinary functions
string-to-utf8: Private ordinary functions
string-to-utf8-lisp: Private ordinary functions