crypt32(2/6): Get rid of bogus check and improve traces for unexpected alt name entry types

Juan Lang juan.lang at gmail.com
Thu Aug 2 11:53:06 CDT 2007


--Juan
-------------- next part --------------
From 2caaf0ee0f5f4dd8650799b3f7b052d598c88679 Mon Sep 17 00:00:00 2001
From: Juan Lang <juanlang at juan.corp.google.com>
Date: Thu, 2 Aug 2007 09:47:19 -0700
Subject: [PATCH] Get rid of bogus check and improve traces for unexpected alt name entry types
---
 dlls/crypt32/decode.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c
index 022c912..7d7634a 100644
--- a/dlls/crypt32/decode.c
+++ b/dlls/crypt32/decode.c
@@ -2111,11 +2111,6 @@ static BOOL WINAPI CRYPT_AsnDecodeAltNam
         SetLastError(CRYPT_E_ASN1_CORRUPT);
         return FALSE;
     }
-    if ((pbEncoded[0] & ASN_FLAGS_MASK) != ASN_CONTEXT)
-    {
-        SetLastError(CRYPT_E_ASN1_BADTAG);
-        return FALSE;
-    }
     lenBytes = GET_LEN_BYTES(pbEncoded[1]);
     if (1 + lenBytes > cbEncoded)
     {
@@ -2138,16 +2133,18 @@ static BOOL WINAPI CRYPT_AsnDecodeAltNam
             /* FIXME: decode as OID */
         case 0: /* otherName */
         case 4: /* directoryName */
-            FIXME("stub\n");
+            FIXME("%d: stub\n", pbEncoded[0] & ASN_TYPE_MASK);
             SetLastError(CRYPT_E_ASN1_BADTAG);
             ret = FALSE;
             break;
         case 3: /* x400Address, unimplemented */
         case 5: /* ediPartyName, unimplemented */
+            TRACE("type %d unimplemented\n", pbEncoded[0] & ASN_TYPE_MASK);
             SetLastError(CRYPT_E_ASN1_BADTAG);
             ret = FALSE;
             break;
         default:
+            TRACE("type %d bad\n", pbEncoded[0] & ASN_TYPE_MASK);
             SetLastError(CRYPT_E_ASN1_CORRUPT);
             ret = FALSE;
         }
-- 
1.4.1


More information about the wine-patches mailing list