Skip to content
Snippets Groups Projects
Commit 69307b9f authored by Niels Möller's avatar Niels Möller
Browse files

Fixed broken decoding of strings.

Rev: lib/modules/SSL.pmod/asn1.pmod:1.2
parent d516ef19
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* *
* Rudimentary support for decoding ASN.1 encoded data. * Rudimentary support for decoding ASN.1 encoded data.
* *
* $Id: asn1.pmod,v 1.1 1997/04/17 14:26:24 nisse Exp $ * $Id: asn1.pmod,v 1.2 1997/08/26 05:48:13 nisse Exp $
*/ */
/* BER decoder /* BER decoder
...@@ -39,6 +39,7 @@ class ber_decode { ...@@ -39,6 +39,7 @@ class ber_decode {
#ifdef SSL3_DEBUG #ifdef SSL3_DEBUG
werror(sprintf("contents: %O\n", contents)); werror(sprintf("contents: %O\n", contents));
#endif #endif
value = contents; /* Default is no conversion */
if (tag & 0x20) if (tag & 0x20)
{ {
object seq = object_program(this_object())(contents); object seq = object_program(this_object())(contents);
...@@ -75,6 +76,8 @@ class ber_decode { ...@@ -75,6 +76,8 @@ class ber_decode {
case 5: /* Null */ case 5: /* Null */
if (strlen(contents)) if (strlen(contents))
throw( ({ "SSL.asn1: Invalid NULL value.\n", backtrace() }) ); throw( ({ "SSL.asn1: Invalid NULL value.\n", backtrace() }) );
tag = "NULL";
value = 0;
break; break;
case 6: /* Object id */ case 6: /* Object id */
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment