diff --git a/bindings/Config.in b/bindings/Config.in index 5af0c0ce5..bf916b13d 100644 --- a/bindings/Config.in +++ b/bindings/Config.in @@ -10,7 +10,7 @@ config CONFIG_BINDINGS help axTLS supports language bindings in C#, VB.NET, Java and Perl. - Select Y here if you want to build the various bindings. + Select Y here if you want to build the various language bindings. config CONFIG_CSHARP_BINDINGS bool "Create C# bindings" @@ -78,8 +78,8 @@ config CONFIG_PERL_CORE string "Location of Perl CORE" default "c:\\perl\\lib\\CORE" help: - I'm testing with: - "http://www.activestate.com/Products/ActivePerl" at the moment. + works with ActiveState + "http://www.activestate.com/Products/ActivePerl" config CONFIG_PERL_LIB string "Name of Perl Library" diff --git a/bindings/generate_interface.pl b/bindings/generate_interface.pl index 4f0fc25fa..fee6eb4c5 100755 --- a/bindings/generate_interface.pl +++ b/bindings/generate_interface.pl @@ -200,7 +200,7 @@ sub parseFile #=============================================================== -# Determine which module to build from cammand-line options +# Determine which module to build from command-line options use strict; use Getopt::Std; diff --git a/samples/perl/axssl.pl b/samples/perl/axssl.pl index 562d4747c..e0200ea0b 100755 --- a/samples/perl/axssl.pl +++ b/samples/perl/axssl.pl @@ -424,11 +424,7 @@ sub do_client $res = axtlsp::ssl_handshake_status($ssl); if ($res != $axtlsp::SSL_OK) { - if (!$quiet) - { - axtlsp::ssl_display_error($res); - } - + axtlsp::ssl_display_error($res) if !$quiet; axtlsp::ssl_free($ssl); exit 1; } @@ -456,11 +452,7 @@ sub do_client $res = axtlsp::ssl_handshake_status($ssl); if ($res != $axtlsp::SSL_OK) { - if (!$quiet) - { - axtlsp::ssl_display_error($res); - } - + axtlsp::ssl_display_error($res) if not $quiet; exit 1; } diff --git a/ssl/p12.c b/ssl/p12.c index 4f37d08bc..f88594f19 100644 --- a/ssl/p12.c +++ b/ssl/p12.c @@ -268,7 +268,9 @@ int pkcs12_decode(SSLCTX *ssl_ctx, SSLObjLoader *ssl_obj, const char *password) /* work out the MAC start/end points (done on AuthSafes) */ auth_safes_start = offset; auth_safes_end = offset; - asn1_skip_obj(buf, &auth_safes_end, ASN1_SEQUENCE); + if (asn1_skip_obj(buf, &auth_safes_end, ASN1_SEQUENCE) < 0) + goto error; + auth_safes_len = auth_safes_end - auth_safes_start; auth_safes = malloc(auth_safes_len); memcpy(auth_safes, &buf[auth_safes_start], auth_safes_len); @@ -315,9 +317,8 @@ int pkcs12_decode(SSLCTX *ssl_ctx, SSLObjLoader *ssl_obj, const char *password) { int cert_offset = key_offset; - asn1_skip_obj(cert, &cert_offset, ASN1_SEQUENCE); - - if (asn1_next_obj(cert, &key_offset, ASN1_SEQUENCE) < 0 || + if (asn1_skip_obj(cert, &cert_offset, ASN1_SEQUENCE) < 0 || + asn1_next_obj(cert, &key_offset, ASN1_SEQUENCE) < 0 || asn1_skip_obj(cert, &key_offset, ASN1_OID) < 0 || asn1_next_obj(cert, &key_offset, ASN1_EXPLICIT_TAG) < 0 || asn1_next_obj(cert, &key_offset, ASN1_SEQUENCE) < 0 || @@ -421,8 +422,9 @@ static int get_pbe_params(uint8_t *buf, int *offset, static const uint8_t pbeSH1RC4[] = /* pbeWithSHAAnd128BitRC4 */ { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x0c, 0x01, 0x01 }; - int i, len, ret = SSL_NOT_OK; + int i, len; uint8_t *iter = NULL; + int error_code = SSL_ERROR_NOT_SUPPORTED; /* Get the PBE type */ if (asn1_next_obj(buf, offset, ASN1_SEQUENCE) < 0 || @@ -437,7 +439,6 @@ static int get_pbe_params(uint8_t *buf, int *offset, #ifdef CONFIG_SSL_FULL_MODE printf("Error: pkcs8/pkcs12 must use \"PBE-SHA1-RC4-128\"\n"); #endif - ret = SSL_ERROR_NOT_SUPPORTED; goto error; } @@ -462,10 +463,10 @@ static int get_pbe_params(uint8_t *buf, int *offset, } free(iter); - ret = SSL_OK; /* got here - we are ok */ + error_code = SSL_OK; /* got here - we are ok */ error: - return ret; + return error_code; } #endif diff --git a/ssl/test/axTLS.withoutCA.ya b/ssl/test/axTLS.withoutCA.ya deleted file mode 100644 index 9e1bd632a..000000000 Binary files a/ssl/test/axTLS.withoutCA.ya and /dev/null differ