From 396d3407781c49dc38302901124526d256f333a7 Mon Sep 17 00:00:00 2001 From: cameronrich Date: Tue, 5 Dec 2006 04:21:08 +0000 Subject: [PATCH] Make our cert/key more compact + fix small typo git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@50 9a5d90b5-6617-0410-8a86-bb477d3ed2e3 --- bindings/csharp/axTLS.cs | 2 +- bindings/java/SSL.java | 2 +- ssl/bigint.c | 2 +- ssl/rc4.c | 5 +++-- ssl/ssl.h | 4 ++-- ssl/tls1.c | 2 ++ 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/bindings/csharp/axTLS.cs b/bindings/csharp/axTLS.cs index 78734e436..9362fbae2 100644 --- a/bindings/csharp/axTLS.cs +++ b/bindings/csharp/axTLS.cs @@ -88,7 +88,7 @@ namespace axTLS /** * @brief Get the session id for a handshake. * - * This will be a 32 byte sequence and is availabile after the first + * This will be a 32 byte sequence and is available after the first * handshaking messages are sent. * @return The session id as a 32 byte sequence. * @note A SSLv23 handshake may have only 16 valid bytes. diff --git a/bindings/java/SSL.java b/bindings/java/SSL.java index 53ddd95a2..a2dfd370b 100644 --- a/bindings/java/SSL.java +++ b/bindings/java/SSL.java @@ -88,7 +88,7 @@ public class SSL /** * @brief Get the session id for a handshake. * - * This will be a 32 byte sequence and is availabile after the first + * This will be a 32 byte sequence and is available after the first * handshaking messages are sent. * @return The session id as a 32 byte sequence. * @note A SSLv23 handshake may have only 16 valid bytes. diff --git a/ssl/bigint.c b/ssl/bigint.c index b525069a3..55482f0a8 100644 --- a/ssl/bigint.c +++ b/ssl/bigint.c @@ -134,7 +134,7 @@ void bi_terminate(BI_CTX *ctx) * @brief Increment the number of references to this object. * It does not do a full copy. * @param bi [in] The bigint to copy. - * @return A referent to the same bigint. + * @return A reference to the same bigint. */ bigint *bi_copy(bigint *bi) { diff --git a/ssl/rc4.c b/ssl/rc4.c index 884bcb534..471e15ffc 100644 --- a/ssl/rc4.c +++ b/ssl/rc4.c @@ -69,8 +69,9 @@ void RC4_crypt(RC4_CTX *ctx, const uint8_t *msg, uint8_t *out, int length) for (i = 0; i < length; i++) { - x =(uint8_t)(x + 1); a = m[x]; - y =(uint8_t)(y + a); + x = (uint8_t)(x + 1); + a = m[x]; + y = (uint8_t)(y + a); m[x] = b = m[y]; m[y] = a; out[i] ^= m[(uint8_t)(a + b)]; diff --git a/ssl/ssl.h b/ssl/ssl.h index b9dbb8320..d8ff953b1 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -165,7 +165,7 @@ extern "C" { * call to ssl_verify_cert(). * - SSL_CLIENT_AUTHENTICATION (server only): Enforce client authentication * i.e. each handshake will include a "certificate request" message from the - * server. Only availabile if verification has been enabled. + * server. Only available if verification has been enabled. * - SSL_NO_DEFAULT_KEY: Don't use the default key/certificate. The user will * load the key/certificate explicitly. * - SSL_DISPLAY_BYTES (full mode build only): Display the byte sequences @@ -272,7 +272,7 @@ EXP_FUNC SSL * STDCALL ssl_find(SSLCTX *ssl_ctx, int client_fd); /** * @brief Get the session id for a handshake. * - * This will be a 32 byte sequence and is availabile after the first + * This will be a 32 byte sequence and is available after the first * handshaking messages are sent. * @param ssl [in] An SSL object reference. * @return The session id as a 32 byte sequence. diff --git a/ssl/tls1.c b/ssl/tls1.c index e27d91198..b6ba0c68b 100644 --- a/ssl/tls1.c +++ b/ssl/tls1.c @@ -28,7 +28,9 @@ /* Don't import the default key/certificate if not used */ #if defined(CONFIG_SSL_USE_DEFAULT_KEY) || defined(CONFIG_SSL_SKELETON_MODE) +static const /* saves a few bytes and RAM */ #include "cert.h" +static const /* saves a few more bytes */ #include "private_key.h" #endif