Module Name: othersrc
Committed By: agc
Date: Thu Sep 8 04:37:47 UTC 2011
Added Files:
othersrc/external/bsd/axtls/dist/docsrc: libaxtls.3
Log Message:
add a very rudimentary manual page for the axtls library - the web-based
documentation of the C API is much better than this.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/axtls/dist/docsrc/libaxtls.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: othersrc/external/bsd/axtls/dist/docsrc/libaxtls.3
diff -u /dev/null othersrc/external/bsd/axtls/dist/docsrc/libaxtls.3:1.1
--- /dev/null Thu Sep 8 04:37:47 2011
+++ othersrc/external/bsd/axtls/dist/docsrc/libaxtls.3 Thu Sep 8 04:37:47 2011
@@ -0,0 +1,188 @@
+.\" $NetBSD: libaxtls.3,v 1.1 2011/09/08 04:37:47 agc Exp $
+.\"
+.\" Copyright (c) 2011 Alistair Crooks <[email protected]>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"/
+.Dd September 3, 2011
+.Dt LIBAXTLS 3
+.Os
+.Sh NAME
+.Nm libaxtls
+.Nd minimalist secure socket library
+.Sh LIBRARY
+.Lb libaxtls
+.Sh SYNOPSIS
+.In axtls/ssl.h
+.Ft SSL_CTX *
+.Fo ssl_ctx_new
+.Fa "uint32_t options" "int num_sessions"
+.Fc
+.Ft void
+.Fo ssl_ctx_free
+.Fa "SSL_CTX *ssl_ctx"
+.Fc
+.Ft SSL *
+.Fo ssl_server_new
+.Fa "SSL_CTX *ssl_ctx" "int client_fd"
+.Fc
+.Ft SSL *
+.Fo ssl_client_new
+.Fa "SSL_CTX *ssl_ctx" "int client_fd" "const uint8_t *session_id" "uint8_t sess_id_size"
+.Fc
+.Ft void
+.Fo ssl_free
+.Fa "SSL *ssl"
+.Fc
+.Ft int
+.Fo ssl_read
+.Fa "SSL *ssl" "uint8_t **in_data"
+.Fc
+.Ft int
+.Fo ssl_write
+.Fa "SSL *ssl" "const uint8_t *out_data" "int out_len"
+.Fc
+.Ft SSL *
+.Fo ssl_find
+.Fa "SSL_CTX *ssl_ctx" "int client_fd"
+.Fc
+.Ft const uint8_t *
+.Fo ssl_get_session_id
+.Fa "const SSL *ssl"
+.Fc
+.Ft uint8_t
+.Fo ssl_get_session_id_size
+.Fa "const SSL *ssl"
+.Fc
+.Ft uint8_t
+.Fo ssl_get_cipher_id
+.Fa "const SSL *ssl"
+.Fc
+.Ft int
+.Fo ssl_handshake_status
+.Fa "const SSL *ssl"
+.Fc
+.Ft int
+.Fo ssl_get_config
+.Fa "int offset"
+.Fc
+.Ft void
+.Fo ssl_display_error
+.Fa "int error_code"
+.Fc
+.Ft int
+.Fo ssl_verify_cert
+.Fa "const SSL *ssl"
+.Fc
+.Ft const char *
+.Fo ssl_get_cert_dn
+.Fa "const SSL *ssl" "int component"
+.Fc
+.Ft const char *
+.Fo ssl_get_cert_subject_alt_dnsname
+.Fa "const SSL *ssl" "int dnsindex"
+.Fc
+.Ft int
+.Fo ssl_renegotiate
+.Fa "SSL *ssl"
+.Fc
+.Ft int
+.Fo ssl_obj_load
+.Fa "SSL_CTX *ssl_ctx" "int obj_type" "const char *filename" "const char *password"
+.Fc
+.Ft int
+.Fo ssl_obj_memory_load
+.Fa "SSL_CTX *ssl_ctx" "int obj_type" "const uint8_t *data" "int len" "const char *password"
+.Fc
+.Ft int
+.Fo ssl_x509_create
+.Fa "SSL_CTX *ssl_ctx" "uint32_t options" "const char *dn[]" "uint8_t **cert_data"
+.Fc
+.Ft const char *
+.Fo ssl_version
+.Fa "void"
+.Fc
+.Sh DESCRIPTION
+The
+.Nm
+library
+is a highly configurable client/server TLSv1 SSL library designed for platforms with small memory requirements.
+It comes with a small HTTP/HTTPS server and additional test tools.
+.Pp
+The following functions are defined:
+.Bl -tag -width XCXssl_get_session_id_sizeXX
+.It Ar ssl_ctx_new
+Establish a new client/server context.
+.It Ar ssl_ctx_free
+Remove a client/server context.
+.It Ar ssl_server_new
+(server only) Establish a new SSL connection to an SSL client.
+.It Ar ssl_client_new
+(client only) Establish a new SSL connection to an SSL server.
+.It Ar ssl_free
+Free any used resources on this connection.
+.It Ar ssl_read
+Read the SSL data stream. If the socket is non-blocking and data is blocked then SSO_OK will be returned.
+.It Ar ssl_write
+Write to the SSL data stream. if the socket is non-blocking and data is blocked then a check is made to ensure that all data is sent (i.e. blocked mode is forced).
+.It Ar ssl_find
+Find an ssl object based on a file descriptor.
+.It Ar ssl_get_session_id
+Get the session id for a handshake.
+.It Ar ssl_get_session_id_size
+Get the session id size for a handshake.
+.It Ar ssl_get_cipher_id
+Return the cipher id (in the SSL form).
+.It Ar ssl_handshake_status
+Return the status of the handshake.
+.It Ar ssl_get_config
+Retrieve various parameters about the axTLS engine.
+.It Ar ssl_display_error
+Display why the handshake failed.
+.It Ar ssl_verify_cert
+Authenticate a received certificate.
+.It Ar ssl_get_cert_dn
+Retrieve an X.509 distinguished name component.
+.It Ar ssl_get_cert_subject_alt_dnsname
+Retrieve a Subject Alternative DNSName.
+.It Ar ssl_renegotiate
+Force the client to perform its handshake again.
+.It Ar ssl_obj_load
+Process a file that is in binary DER or ASCII PEM format.
+.It Ar ssl_obj_memory_load
+Process binary data.
+.It Ar ssl_x509_create
+Create an X.509 certificate.
+.It Ar ssl_version
+Return the axTLS library version as a string.
+.El
+.Sh HISTORY
+The
+.Nm
+library first appeared in
+.Nx 6.0 .
+.Sh AUTHORS
+.An Cameron Rich Aq [email protected]
+wrote the axTLS
+library.
+.An Alistair Crooks Aq [email protected]
+wrote this manual page.