crypt32/tests: Demonstrate that CryptStringToBinary can take arbitrary key headers and trailers.
This commit is contained in:
parent
a5cfae6db3
commit
812d647705
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue