Module: wine
Branch: master
Commit: e747f706b1d7f87d12c48ed49d2f465e1b2f1537
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e747f706b1d7f87d12c48ed49…
Author: Juan Lang <juan.lang(a)gmail.com>
Date: Mon Sep 17 15:01:29 2007 -0700
crypt32: Correct GET_LEN_BYTES for the indefinite-length form.
---
dlls/crypt32/decode.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c
index 9d4c5c8..ef95a34 100644
--- a/dlls/crypt32/decode.c
+++ b/dlls/crypt32/decode.c
@@ -124,7 +124,7 @@ static BOOL WINAPI CRYPT_AsnDecodeUnsignedIntegerInternal(
void *pvStructInfo, DWORD *pcbStructInfo);
/* Gets the number of length bytes from the given (leading) length byte */
-#define GET_LEN_BYTES(b) ((b) <= 0x7f ? 1 : 1 + ((b) & 0x7f))
+#define GET_LEN_BYTES(b) ((b) <= 0x80 ? 1 : 1 + ((b) & 0x7f))
/* Helper function to get the encoded length of the data starting at pbEncoded,
* where pbEncoded[0] is the tag. If the data are too short to contain a
Module: wine
Branch: master
Commit: 716a7405e47c1f4019a6286d723e5611e00d5a9b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=716a7405e47c1f4019a6286d7…
Author: Juan Lang <juan.lang(a)gmail.com>
Date: Mon Sep 17 15:00:30 2007 -0700
crypt32: Update comments.
---
dlls/crypt32/decode.c | 9 ++++-----
dlls/crypt32/encode.c | 9 ++++-----
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c
index 7349f5e..9d4c5c8 100644
--- a/dlls/crypt32/decode.c
+++ b/dlls/crypt32/decode.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Juan Lang
+ * Copyright 2005-2007 Juan Lang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -17,8 +17,8 @@
*
* This file implements ASN.1 DER decoding of a limited set of types.
* It isn't a full ASN.1 implementation. Microsoft implements BER
- * encoding of many of the basic types in msasn1.dll, but that interface is
- * undocumented, so I implement them here.
+ * encoding of many of the basic types in msasn1.dll, but that interface isn't
+ * implemented, so I implement them here.
*
* References:
* "A Layman's Guide to a Subset of ASN.1, BER, and DER", by Burton Kaliski
@@ -27,8 +27,7 @@
*
* RFC3280, http://www.faqs.org/rfcs/rfc3280.html
*
- * MSDN, especially:
- * http://msdn.microsoft.com/library/en-us/seccrypto/security/constants_for_cr…
+ * MSDN, especially "Constants for CryptEncodeObject and CryptDecodeObject"
*/
#include <assert.h>
diff --git a/dlls/crypt32/encode.c b/dlls/crypt32/encode.c
index 05c52e6..1963eb7 100644
--- a/dlls/crypt32/encode.c
+++ b/dlls/crypt32/encode.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Juan Lang
+ * Copyright 2005-2007 Juan Lang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -17,8 +17,8 @@
*
* This file implements ASN.1 DER encoding of a limited set of types.
* It isn't a full ASN.1 implementation. Microsoft implements BER
- * encoding of many of the basic types in msasn1.dll, but that interface is
- * undocumented, so I implement them here.
+ * encoding of many of the basic types in msasn1.dll, but that interface isn't
+ * implemented, so I implement them here.
*
* References:
* "A Layman's Guide to a Subset of ASN.1, BER, and DER", by Burton Kaliski
@@ -27,8 +27,7 @@
*
* RFC3280, http://www.faqs.org/rfcs/rfc3280.html
*
- * MSDN, especially:
- * http://msdn.microsoft.com/library/en-us/seccrypto/security/constants_for_cr…
+ * MSDN, especially "Constants for CryptEncodeObject and CryptDecodeObject"
*/
#include <assert.h>