Up

# GSTLS documentation

### Authors

Richard Frith-Macdonald (`rfm@gnu.org`)

Date: Generated at 2025-02-13 06:02:40 +0000

Copyright: (C) 2012 Free Software Foundation, Inc.

### Contents -

1. Software documentation for the GSTLSCertificateList class
2. Software documentation for the GSTLSCredentials class
3. Software documentation for the GSTLSDHParams class
4. Software documentation for the GSTLSObject class
5. Software documentation for the GSTLSPrivateKey class
6. Software documentation for the GSTLSSession class

# Software documentation for the GSTLSCertificateList class

## GSTLSCertificateList : GSTLSObject

> Declared in:
>   GNUstepBase/GSTLS.h

Availability: OpenStep
Description forthcoming.

Instance Variables
Method summary

- +listFromFile:
- -certificateList
- -count
- -expiresAt
- -expiresAt:

### listFromFile:

+ (GSTLSCertificateList*) listFromFile: (NSString*)f;
Availability: OpenStep
Description forthcoming.

### certificateList

- (gnutls_x509_crt_t*) certificateList;
Availability: OpenStep
Description forthcoming.

### count

- (unsigned int) count;
Availability: OpenStep
Description forthcoming.

### expiresAt

- (NSDate*) expiresAt;
Availability: OpenStep
Description forthcoming.

### expiresAt:

- (NSDate*) expiresAt: (unsigned int)index;
Availability: OpenStep
Description forthcoming.

## Instance Variables for GSTLSCertificateList Class

### count

@protected unsigned int count;
Availability: OpenStep
Description forthcoming.

### crts

@protected gnutls_x509_crt_t* crts;
Availability: OpenStep
Description forthcoming.

### path

@protected NSString* path;
Availability: OpenStep
Description forthcoming.

### when

@protected NSTimeInterval when;
Availability: OpenStep
Description forthcoming.

# Software documentation for the GSTLSCredentials class

## GSTLSCredentials : GSTLSObject

> Declared in:
>   GNUstepBase/GSTLS.h

Availability: OpenStep
Description forthcoming.

Instance Variables
Method summary

- +credentialsFromCAFile:defaultCAFile:revokeFile:defaultRevokeFile:certificateFile:certificateKeyFile:certificateKeyPassword:asClient:debug:
- +selfSigned:
- -credentials
- -key
- -list
- -trust

### credentialsFromCAFile: defaultCAFile: revokeFile: defaultRevokeFile: certificateFile: certificateKeyFile: certificateKeyPassword: asClient: debug:

+ (GSTLSCredentials*) credentialsFromCAFile: (NSString*)ca defaultCAFile: (NSString*)dca revokeFile: (NSString*)rv defaultRevokeFile: (NSString*)drv certificateFile: (NSString*)cf certificateKeyFile: (NSString*)ck certificateKeyPassword: (NSString*)cp asClient: (BOOL)client debug: (BOOL)debug;
Availability: OpenStep
Description forthcoming.

### selfSigned:

+ (GSTLSCredentials*) selfSigned: (BOOL)debug;
Availability: OpenStep
Description forthcoming.

### credentials

- (gnutls_certificate_credentials_t) credentials;
Availability: OpenStep
Description forthcoming.

### key

- (GSTLSPrivateKey*) key;
Availability: OpenStep
Description forthcoming.

### list

- (GSTLSCertificateList*) list;
Availability: OpenStep
Description forthcoming.

### trust

- (BOOL) trust;
Availability: OpenStep
Description forthcoming.

## Instance Variables for GSTLSCredentials Class

### certcred

@protected gnutls_certificate_credentials_t certcred;
Availability: OpenStep
Description forthcoming.

### dhParams

@protected GSTLSDHParams* dhParams;
Availability: OpenStep
Description forthcoming.

### freeCred

@protected BOOL freeCred;
Availability: OpenStep
Description forthcoming.

### key

@protected GSTLSPrivateKey* key;
Availability: OpenStep
Description forthcoming.

### list

@protected GSTLSCertificateList* list;
Availability: OpenStep
Description forthcoming.

### name

@protected NSString* name;
Availability: OpenStep
Description forthcoming.

### trust

@protected BOOL trust;
Availability: OpenStep
Description forthcoming.

### when

@protected NSTimeInterval when;
Availability: OpenStep
Description forthcoming.

# Software documentation for the GSTLSDHParams class

## GSTLSDHParams : GSTLSObject

> Declared in:
>   GNUstepBase/GSTLS.h

Availability: OpenStep
Description forthcoming.

Instance Variables
Method summary

- +current
- +generate
- +paramsFromFile:
- -params

### current

+ (GSTLSDHParams*) current;
Availability: OpenStep
Description forthcoming.

### generate

+ (void) generate;
Availability: OpenStep
Description forthcoming.

### paramsFromFile:

+ (GSTLSDHParams*) paramsFromFile: (NSString*)f;
Availability: OpenStep
Description forthcoming.

### params

- (gnutls_dh_params_t) params;
Availability: OpenStep
Description forthcoming.

## Instance Variables for GSTLSDHParams Class

### params

@protected gnutls_dh_params_t params;
Availability: OpenStep
Description forthcoming.

### path

@protected NSString* path;
Availability: OpenStep
Description forthcoming.

### when

@protected NSTimeInterval when;
Availability: OpenStep
Description forthcoming.

# Software documentation for the GSTLSObject class

## GSTLSObject : NSObject

> Declared in:
>   GNUstepBase/GSTLS.h

Availability: OpenStep
Description forthcoming.
Method summary

- +dataForTLSFile:
- +setData:forTLSFile:

### dataForTLSFile:

+ (NSData*) dataForTLSFile: (NSString*)fileName;
Availability: OpenStep
Returns either the cached data for this file name (if any), or the result of calling [NSData +dataWithContentsOfFile:] if there is no cached data.
This method is used internally to load certificates and keys.

### setData: forTLSFile:

+ (void) setData: (NSData*)data forTLSFile: (NSString*)fileName;
Availability: OpenStep
Sets the known (cached) data content for the specified file name.
Calling this with a `nil` data object will remove any existing value from the cache.
You may use this method to control what data is used for specified file names.

# Software documentation for the GSTLSPrivateKey class

## GSTLSPrivateKey : GSTLSObject

> Declared in:
>   GNUstepBase/GSTLS.h

Availability: OpenStep
Description forthcoming.

Instance Variables
Method summary

- +keyFromFile:withPassword:
- -key

### keyFromFile: withPassword:

+ (GSTLSPrivateKey*) keyFromFile: (NSString*)f withPassword: (NSString*)p;
Availability: OpenStep
Description forthcoming.

### key

- (gnutls_x509_privkey_t) key;
Availability: OpenStep
Description forthcoming.

## Instance Variables for GSTLSPrivateKey Class

### key

@protected gnutls_x509_privkey_t key;
Availability: OpenStep
Description forthcoming.

### password

@protected NSString* password;
Availability: OpenStep
Description forthcoming.

### path

@protected NSString* path;
Availability: OpenStep
Description forthcoming.

### when

@protected NSTimeInterval when;
Availability: OpenStep
Description forthcoming.

# Software documentation for the GSTLSSession class

## GSTLSSession : GSTLSObject

> Declared in:
>   GNUstepBase/GSTLS.h

Availability: OpenStep
Description forthcoming.

Instance Variables
Method summary

- +sessionWithOptions:direction:transport:push:pull:
- -active
- -age
- -credentials
- -debug
- -disconnect:
- -handshake
- -initWithOptions:direction:transport:push:pull:
- -issuer
- -owner
- -pending
- -problem
- -read:length:
- -sessionInfo
- -verify
- -write:length:

### sessionWithOptions: direction: transport: push: pull:

+ (GSTLSSession*) sessionWithOptions: (NSDictionary*)options direction: (BOOL)isOutgoing transport: (void*)ioHandle push: (GSTLSIOW)pushFunc pull: (GSTLSIOR)pullFunc;
Availability: OpenStep
Description forthcoming.

### active

- (BOOL) active;
Availability: OpenStep
Description forthcoming.

### age

- (NSTimeInterval) age;
Availability: OpenStep
Returns the age of this instance (how long since it was created).

### credentials

- (GSTLSCredentials*) credentials;
Availability: OpenStep
Description forthcoming.

### debug

- (BOOL) debug;
Availability: OpenStep
Description forthcoming.

### disconnect:

- (BOOL) disconnect: (BOOL)reusable;
Availability: OpenStep
Description forthcoming.

### handshake

- (BOOL) handshake;
Availability: OpenStep
Description forthcoming.

### initWithOptions: direction: transport: push: pull:

- (id) initWithOptions: (NSDictionary*)options direction: (BOOL)isOutgoing transport: (void*)ioHandle push: (GSTLSIOW)pushFunc pull: (GSTLSIOR)pullFunc;
Availability: OpenStep
Description forthcoming.

### issuer

- (NSString*) issuer;
Availability: OpenStep
If the session verified a certificate from the remote end, returns the name of the certificate issuer in the form "C=xxxx,O=yyyy,CN=zzzz" as described in RFC4514. Otherwise returns `nil`.

### owner

- (NSString*) owner;
Availability: OpenStep
If the session verified a certificate from the remote end, returns the name of the certificate owner in the form "C=xxxx,O=yyyy,CN=zzzz" as described in RFC4514. Otherwise returns `nil`.

### pending

- (size_t) pending;
Availability: OpenStep
Returns the number of bytes of data available to be read from the TLS buffers (using the -read:length: method). If this returns zero the TLS software needs to perform a network read before any more data can be returned.

### problem

- (NSString*) problem;
Availability: OpenStep
Description forthcoming.

### read: length:

- (NSInteger) read: (void*)buf length: (NSUInteger)len;
Availability: OpenStep
Description forthcoming.

### sessionInfo

- (NSString*) sessionInfo;
Availability: OpenStep
Get a report of the SSL/TLS status of the current session.

### verify

- (int) verify;
Availability: OpenStep
Description forthcoming.

### write: length:

- (NSInteger) write: (const void*)buf length: (NSUInteger)len;
Availability: OpenStep
Description forthcoming.

## Instance Variables for GSTLSSession Class

### active

@protected BOOL active;
Availability: OpenStep
Description forthcoming.

### created

@protected NSTimeInterval created;
Availability: OpenStep
Description forthcoming.

### credentials

@protected GSTLSCredentials* credentials;
Availability: OpenStep
Description forthcoming.

### debug

@protected BOOL debug;
Availability: OpenStep
Description forthcoming.

### handle

@protected void* handle;
Availability: OpenStep
Description forthcoming.

### handshake

@protected BOOL handshake;
Availability: OpenStep
Description forthcoming.

### issuer

@protected NSString* issuer;
Availability: OpenStep
Description forthcoming.

### opts

@protected NSDictionary* opts;
Availability: OpenStep
Description forthcoming.

### outgoing

@protected BOOL outgoing;
Availability: OpenStep
Description forthcoming.

### owner

@protected NSString* owner;
Availability: OpenStep
Description forthcoming.

### problem

@protected NSString* problem;
Availability: OpenStep
Description forthcoming.

### session

@public gnutls_session_t session;
Availability: OpenStep
Description forthcoming.

### setup

@protected BOOL setup;
Availability: OpenStep
Description forthcoming.

Up