C library for SOAP (Simple Object Access Protocol)


SSL wrapper
[nanoHTTP]


Modules

 SSL Errors

Defines

#define NHTTPD_ARG_HTTPS   "-NHTTPS"

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  ) 

This function cleans up an SSL socket.

See also:
hssl_client_ssl

httl_server_ssl

herror_t hssl_client_ssl ( struct hsocket_t *  sock  ) 

This function initializes an SSL client socket.

Returns:
H_OK on success.
See also:
hsl_cleanup()

void hssl_enable ( void   ) 

This function enables SSL in the nanoHTTP server. You have to call this function before calling httpd_run().

int hssl_enabled ( void   ) 

This function returns if SSL is enabled in the nanoHTTP server.

Returns:
1 if enabled, 0 otherwise.

void hssl_module_destroy ( void   ) 

This functions destroys the SSL module.

See also:
hssl_module_init()

herror_t hssl_module_init ( int  argc,
char **  argv 
)

This function initializes the SSL module.

Returns:
H_OK on success
See also:
hss_module_destroy()

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

This function reads from an SSL socket.

See also:
hsocket_read()

herror_t hssl_server_ssl ( struct hsocket_t *  sock  ) 

This function initializes an SSL server socket.

Returns:
H_OK on success.
See also:
hssl_cleanup()

void hssl_set_ca_list ( const char *  filename  ) 

This function sets the filename for a certification authority list.

void hssl_set_certificate ( const char *  filename  ) 

This function sets the SSL certificate to be used.

void hssl_set_certpass ( const char *  password  ) 

This function sets the password for the SSL certificate.

See also:
hssl_set_certificate()

void hssl_set_user_verify ( int   funcX509 *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 
)

This function writes to an 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


csoap project homepage: http://csoap.sourceforge.net