git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35607 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2012-09-26 16:57:17 +00:00
parent 8bbbd4a946
commit 9661855ac5
4 changed files with 58 additions and 38 deletions

View file

@ -42,6 +42,14 @@
#include <gcrypt.h>
#undef id
extern NSString * const GSTLSCAFile;
extern NSString * const GSTLSCertificateFile;
extern NSString * const GSTLSCertificateKeyFile;
extern NSString * const GSTLSCertificateKeyPassword;
extern NSString * const GSTLSDebug;
extern NSString * const GSTLSCAVerify;
extern NSString * const GSTLSRemoteHosts;
/* This class is used to ensure that the GNUTLS system is initialised
* and thread-safe.
*/
@ -112,13 +120,11 @@ typedef ssize_t (*GSTLSIOW)(gnutls_transport_ptr_t, const void *, size_t);
/* This class encapsulates a session to a remote system.
* Sessions are created with a direction and an options dictionary,
* defining how they will operate. The handle, pushFunc and pullFunc
* provide the I/O mechanism, and the host specifies the host that the
* session is connected to.
* provide the I/O mechanism.
*/
@interface GSTLSSession : GSTLSObject
{
NSDictionary *opts;
NSHost *host;
GSTLSPrivateKey *key;
GSTLSCertificateList *list;
GSTLSDHParams *dhParams;
@ -134,15 +140,13 @@ typedef ssize_t (*GSTLSIOW)(gnutls_transport_ptr_t, const void *, size_t);
direction: (BOOL)isOutgoing
transport: (void*)handle
push: (GSTLSIOW)pushFunc
pull: (GSTLSIOR)pullFunc
host: (NSHost*)remote;
pull: (GSTLSIOR)pullFunc;
- (id) initWithOptions: (NSDictionary*)options
direction: (BOOL)isOutgoing
transport: (void*)handle
push: (GSTLSIOW)pushFunc
pull: (GSTLSIOR)pullFunc
host: (NSHost*)remote;
pull: (GSTLSIOR)pullFunc;
/* Return YES if the session is active (handshake has succeeded and the
* session has not been disconnected), NO otherwise.