2 # Copyright 2001-2017 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the OpenSSL license (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
9 # Tests start with one of these keywords
10 # Cipher Decrypt Derive Digest Encoding KDF MAC PBE
11 # PrivPubKeyPair Sign Verify VerifyRecover
12 # and continue until a blank line. Lines starting with a pound sign,
13 # like this prolog, are ignored.
29 Input = "hello world!"
30 Output = "aGVsbG8gd29ybGQh\n"
33 Input = 00010203040506070809a0b0c0d0e0f000
34 Output = "AAECAwQFBgcICaCwwNDg8AA=\n"
43 # Tolerate missing newline
48 # Don't tolerate extra trailing '='
51 Output = "aGVsbG8==\n"
54 Output = "aGVsbG8===\n"
56 # Don't tolerate data after '='
58 Output = "aGV=sbG8=\n"
60 # Newlines are ignored
63 Output = "aGV\nsbG8=\n"
67 Output = 614756736247383d0a
71 Output = 614756736247383d0a00
74 Output = 61475600736247383d0a
77 Output = 61475601736247383d0a
80 Output = 61475680736247383d0a
83 Output = e14756736247383d0a
86 Input = "OpenSSLOpenSSL\n"
87 Output = "T3BlblNTTE9wZW5TU0wK\n"
90 Input = "OpenSSLOpenSSL\n"
91 Output = "T3BlblNTTE9wZW5TU0wK"
95 Output = "T3BlblNTTE9wZW5TU0w"
98 Output = "T3BlblNTTE9wZW5TU0"
101 Output = "T3BlblNTTE9wZW5TU"
104 Output = "T3BlblNTTE9wZW5TU0wK===="
107 Output = "T3BlblNTTE9wZW5TU0wK============================================\n"
110 Output = "YQ==YQ==YQ==\n"
131 Input = "OpenSSLOpenSSL\n"
132 Output = "T3BlblNTTE9wZW5TU0wK\n\n"
135 Input = "OpenSSLOpenSSL\n"
136 Output = "T3BlblNTTE\n9wZW5TU0wK"
140 Output = "ZW5jb2RlIG1lCg==================================================================\n"
143 Input = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
144 Output = "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eA==\n"
147 Input = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
148 Output = "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eA\n==\n"
151 Input = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
152 Output = "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eA=\n=\n"
155 Output = "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eA====\n"
157 # Multiline output without padding
159 Input = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
160 Output = "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4\neHh4eHh4eHh4eHh4\n"
162 # Multiline output with padding
164 Input = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
165 Output = "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4\neHh4eHh4eHh4eHh4eHh4eA==\n"
167 # Multiline output with line break in the middle of a b64 block is accepted
169 Input = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
170 Output = "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh\n4eHh4eHh4eHh4eHh4eHh4eA==\n"
172 # Long lines are accepted
174 Input = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
175 Output = "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eA==\n"
177 # Multiline input with data after '='.
179 Output = "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eA==\neHh4eHh4eHh4eHh4eHh4eHh4\n"
182 Output = "eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4\neA==eHh4eHh4eHh4eHh4eHh4\n"
184 # B64_EOF ('-') terminates input and trailing bytes are ignored
186 Input = "OpenSSLOpenSSL\n"
187 Output = "T3BlblNTTE9wZW5TU0wK\n-abcd"
190 Input = "OpenSSLOpenSSL\n"
191 Output = "T3BlblNTTE9wZW5TU0wK-abcd"