3#ifndef __GHTTPENCRYPTION_H__
4#define __GHTTPENCRYPTION_H__
17 GHIEncryptionMethod_None,
18 GHIEncryptionMethod_Encrypt,
19 GHIEncryptionMethod_Decrypt
25 GHIEncryptionResult_None,
26 GHIEncryptionResult_Success,
27 GHIEncryptionResult_BufferTooSmall,
28 GHIEncryptionResult_Error
38typedef GHIEncryptionResult (*GHTTPEncryptorInitFunc) (
struct GHIConnection * theConnection,
42typedef GHIEncryptionResult (*GHTTPEncryptorConnectFunc)(
struct GHIConnection * theConnection,
46typedef GHIEncryptionResult (*GHTTPEncryptorStartFunc)(
struct GHIConnection * theConnection,
50typedef GHIEncryptionResult (*GHTTPEncryptorCleanupFunc)(
struct GHIConnection * theConnection,
55typedef GHIEncryptionResult (*GHTTPEncryptorEncryptFunc)(
struct GHIConnection * theConnection,
57 const char * thePlainTextBuffer,
58 int thePlainTextLength,
59 char * theEncryptedBuffer,
60 int * theEncryptedLength);
65typedef GHIEncryptionResult (*GHTTPEncryptorDecryptFunc)(
struct GHIConnection * theConnection,
67 const char * theEncryptedBuffer,
68 int * theEncryptedLength,
69 char * theDecryptedBuffer,
70 int * theDecryptedLength);
78 GHTTPEncryptionEngine mEngine;
79 GHTTPBool mInitialized;
80 GHTTPBool mSessionStarted;
81 GHTTPBool mSessionEstablished;
86 GHTTPBool mEncryptOnBuffer;
87 GHTTPBool mEncryptOnSend;
90 GHTTPBool mLibSendsHandshakeMessages;
93 GHTTPEncryptorInitFunc mInitFunc;
94 GHTTPEncryptorCleanupFunc mCleanupFunc;
95 GHTTPEncryptorStartFunc mStartFunc;
96 GHTTPEncryptorEncryptFunc mEncryptFunc;
97 GHTTPEncryptorDecryptFunc mDecryptFunc;
104GHIEncryptionResult ghiEncryptorSslInitFunc(
struct GHIConnection * connection,
106GHIEncryptionResult ghiEncryptorSslCleanupFunc(
struct GHIConnection * connection,
109GHIEncryptionResult ghiEncryptorSslStartFunc(
struct GHIConnection * connection,
112GHIEncryptionResult ghiEncryptorSslEncryptFunc(
struct GHIConnection * connection,
114 const char * thePlainTextBuffer,
115 int thePlainTextLength,
116 char * theEncryptedBuffer,
117 int * theEncryptedLength);
118GHIEncryptionResult ghiEncryptorSslDecryptFunc(
struct GHIConnection * connection,
120 const char * theEncryptedBuffer,
121 int * theEncryptedLength,
122 char * theDecryptedBuffer,
123 int * theDecryptedLength);
124GHIEncryptionResult ghiEncryptorSslEncryptSend(
struct GHIConnection * connection,
126 const char * thePlainTextBuffer,
127 int thePlainTextLength,
129GHIEncryptionResult ghiEncryptorSslDecryptRecv(
struct GHIConnection * connection,
131 char * theDecryptedBuffer,
132 int * theDecryptedLength);
Definition ghttpConnection.h:84
Definition ghttpEncryption.h:76