Module: wine Branch: master Commit: 812d6477058a0f27a9542c602eebe282d552eee7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=812d6477058a0f27a9542c602e...
Author: Andrew Bogott Andrew@CodeWeavers.com Date: Sat Apr 23 10:18:40 2011 -0500
crypt32/tests: Demonstrate that CryptStringToBinary can take arbitrary key headers and trailers.
---
dlls/crypt32/tests/base64.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/crypt32/tests/base64.c b/dlls/crypt32/tests/base64.c index 39fa2e1..c5c436b 100644 --- a/dlls/crypt32/tests/base64.c +++ b/dlls/crypt32/tests/base64.c @@ -28,7 +28,9 @@ #include "wine/test.h"
#define CERT_HEADER "-----BEGIN CERTIFICATE-----\r\n" +#define ALT_CERT_HEADER "-----BEGIN This is some arbitrary text that goes on and on-----\r\n" #define CERT_TRAILER "-----END CERTIFICATE-----\r\n" +#define ALT_CERT_TRAILER "-----END More arbitrary text------\r\n" #define CERT_REQUEST_HEADER "-----BEGIN NEW CERTIFICATE REQUEST-----\r\n" #define CERT_REQUEST_TRAILER "-----END NEW CERTIFICATE REQUEST-----\r\n" #define X509_HEADER "-----BEGIN X509 CRL-----\r\n" @@ -360,6 +362,9 @@ static void testStringToBinaryA(void) decodeAndCompareBase64_A(tests[i].base64, CERT_HEADER, CERT_TRAILER, CRYPT_STRING_BASE64HEADER, CRYPT_STRING_BASE64HEADER, tests[i].toEncode, tests[i].toEncodeLen); + decodeAndCompareBase64_A(tests[i].base64, ALT_CERT_HEADER, ALT_CERT_TRAILER, + CRYPT_STRING_BASE64HEADER, CRYPT_STRING_BASE64HEADER, + tests[i].toEncode, tests[i].toEncodeLen); decodeAndCompareBase64_A(tests[i].base64, CERT_REQUEST_HEADER, CERT_REQUEST_TRAILER, CRYPT_STRING_BASE64REQUESTHEADER, CRYPT_STRING_BASE64REQUESTHEADER, tests[i].toEncode,