nanohttp-ssl.h File Reference

Go to the source code of this file.

Defines

#define NHTTPD_ARG_HTTPS   "-NHTTPS"
#define HSSL_ERROR   1700
#define HSSL_ERROR_CA_LIST   (HSSL_ERROR + 10)
#define HSSL_ERROR_CONTEXT   (HSSL_ERROR + 20)
#define HSSL_ERROR_CERTIFICATE   (HSSL_ERROR + 30)
#define HSSL_ERROR_PEM   (HSSL_ERROR + 40)
#define HSSL_ERROR_CLIENT   (HSSL_ERROR + 50)
#define HSSL_ERROR_SERVER   (HSSL_ERROR + 60)
#define HSSL_ERROR_CONNECT   (HSSL_ERROR + 70)

Functions

herror_t hssl_module_init (int argc, char **argv)
void hssl_module_destroy (void)
void hssl_set_certificate (const char *filename)
void hssl_set_certpass (const char *password)
void hssl_set_ca_list (const char *filename)
void hssl_enable (void)
int hssl_enabled (void)
herror_t hssl_client_ssl (struct hsocket_t *sock)
herror_t hssl_server_ssl (struct hsocket_t *sock)
void hssl_cleanup (struct hsocket_t *sock)
int verify_sn (X509 *cert, int who, int nid, char *str)
void hssl_set_user_verify (int func(X509 *cert))
herror_t hssl_read (struct hsocket_t *sock, char *buf, size_t len, size_t *received)
herror_t hssl_write (struct hsocket_t *sock, const char *buf, size_t len, size_t *sent)


Define Documentation

#define NHTTPD_ARG_HTTPS   "-NHTTPS"
 

Commandline argument to enabled SSL in the nanoHTTP server.


Function Documentation

void hssl_cleanup struct hsocket_t sock  ) 
 

SSL socket cleanup.

herror_t hssl_client_ssl struct hsocket_t sock  ) 
 

SSL client socket initialization.

Returns:
H_OK on success.

void hssl_enable void   ) 
 

Enabled SSL in the nanoHTTP server. You have to call this function before calling httpd_run.

See also:
httpd_run

int hssl_enabled void   ) 
 

Check if SSL is enabled in the nanoHTTP server.

Returns:
1 if enabled, 0 if disabled.

void hssl_module_destroy void   ) 
 

Shutdown of the SSL module.

herror_t hssl_module_init int  argc,
char **  argv
 

Initialization of the SSL module

Returns:
H_OK on success

herror_t hssl_read struct hsocket_t sock,
char *  buf,
size_t  len,
size_t *  received
 

Read from a SSL socket.

See also:
hsocket_read

herror_t hssl_server_ssl struct hsocket_t sock  ) 
 

SSL server socket initialization.

Returns:
H_OK on success.

void hssl_set_ca_list const char *  filename  ) 
 

Sets the filename for a certification authority list.

void hssl_set_certificate const char *  filename  ) 
 

Sets the SSL certificate to be used.

void hssl_set_certpass const char *  password  ) 
 

Sets the password for the SSL certificate.

See also:
hssl_set_certificate

void hssl_set_user_verify int   func(X509 *cert)  ) 
 

Called by framework for verification of client or server supplied certificate.

herror_t hssl_write struct hsocket_t sock,
const char *  buf,
size_t  len,
size_t *  sent
 

Write to a SSL socket.

See also:
hsocket_write

int verify_sn X509 *  cert,
int  who,
int  nid,
char *  str
 

Quick function for verifying a portion of the cert nid is any NID_ defined in <openssl/objects.h> returns non-zero if everything went ok


Generated on Thu Jan 25 23:36:00 2007 for csoap by  doxygen 1.4.6