| 6 | // |
| 7 | // https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 |
| 15 | #include <assert.h> |
| 16 | #include <string.h> |
| 17 |
| 18 | #include <openssl/digest.h> |
| 19 | #include <openssl/nid.h> |
| 20 | #include <openssl/sha.h> |
| 21 |
| 22 | #include "../internal.h" |
| 23 | #include "internal.h" |
| 24 | #include "../fipsmodule/cipher/internal.h" |
| 25 |
| 26 |
| 27 | int EVP_tls_cbc_remove_padding(crypto_word_t *out_padding_ok, size_t *out_len, |
| 28 | const uint8_t *in, size_t in_len, |
| 29 | size_t block_size, size_t mac_size) { |
| 30 | const size_t overhead = 1 /* padding length byte */ + mac_size; |
| 31 |
| 32 | // These lengths are all public so we can test them in non-constant time. |
| 33 | if (overhead > in_len) { |
| 34 | return 0; |
| 35 | } |
| 36 |
| 37 | size_t padding_length = in[in_len - 1]; |
| 38 |
| 39 | crypto_word_t good = constant_time_ge_w(in_len, overhead + padding_length); |
| 40 | // The padding consists of a length byte at the end of the record and |
| 41 | // then that many bytes of padding, all with the same value as the |
| 42 | // length byte. Thus, with the length byte included, there are i+1 |
| 43 | // bytes of padding. |
| 44 | // |
| 45 | // We can't check just |padding_length+1| bytes because that leaks |
| 46 | // decrypted information. Therefore we always have to check the maximum |
| 47 | // amount of padding possible. (Again, the length of the record is |
| 48 | // public information so we can use it.) |
| 49 | size_t to_check = 256; // maximum amount of padding, inc length byte. |
| 50 | if (to_check > in_len) { |
| 51 | to_check = in_len; |
| 52 | } |
| 53 |
| 54 | for (size_t i = 0; i < to_check; i++) { |
| 55 | uint8_t mask = constant_time_ge_8(padding_length, i); |
| 56 | uint8_t b = in[in_len - 1 - i]; |
| 57 | // The final |padding_length+1| bytes should all have the value |
| 58 | // |padding_length|. Therefore the XOR should be zero. |
| 59 | good &= ~(mask & (padding_length ^ b)); |
| 60 | } |
| 61 |
| 62 | // If any of the final |padding_length+1| bytes had the wrong value, |
| 63 | // one or more of the lower eight bits of |good| will be cleared. |
| 64 | good = constant_time_eq_w(0xff, good & 0xff); |
| 65 |
| 66 | // Always treat |padding_length| as zero on error. If, assuming block size of |
| 67 | // 16, a padding of [<15 arbitrary bytes> 15] treated |padding_length| as 16 |
| 68 | // and returned -1, distinguishing good MAC and bad padding from bad MAC and |
| 69 | // bad padding would give POODLE's padding oracle. |
| 70 | padding_length = good & (padding_length + 1); |
| 71 | *out_len = in_len - padding_length; |
| 72 | *out_padding_ok = good; |
| 73 | return 1; |
| 74 | } |
| 75 |
| 76 | void EVP_tls_cbc_copy_mac(uint8_t *out, size_t md_size, const uint8_t *in, |
| 77 | size_t in_len, size_t orig_len) { |
| 78 | uint8_t rotated_mac1[EVP_MAX_MD_SIZE], rotated_mac2[EVP_MAX_MD_SIZE]; |
| 79 | uint8_t *rotated_mac = rotated_mac1; |
| 80 | uint8_t *rotated_mac_tmp = rotated_mac2; |
| 81 |
| 82 | // mac_end is the index of |in| just after the end of the MAC. |
| 83 | size_t mac_end = in_len; |
| 84 | size_t mac_start = mac_end - md_size; |
| 85 |
| 86 | declassify_assert(orig_len >= in_len); |
| 87 | declassify_assert(in_len >= md_size); |
| 88 | assert(md_size <= EVP_MAX_MD_SIZE); |
| 89 | assert(md_size > 0); |
| 90 |
| 91 | // scan_start contains the number of bytes that we can ignore because |
| 92 | // the MAC's position can only vary by 255 bytes. |
| 93 | size_t scan_start = 0; |
| 94 | // This information is public so it's safe to branch based on it. |
| 95 | if (orig_len > md_size + 255 + 1) { |
| 96 | scan_start = orig_len - (md_size + 255 + 1); |
| 97 | } |
| 98 |
| 99 | size_t rotate_offset = 0; |
| 100 | uint8_t mac_started = 0; |
| 101 | OPENSSL_memset(rotated_mac, 0, md_size); |
| 102 | for (size_t i = scan_start, j = 0; i < orig_len; i++, j++) { |
| 103 | if (j >= md_size) { |
| 104 | j -= md_size; |
| 105 | } |
| 106 | crypto_word_t is_mac_start = constant_time_eq_w(i, mac_start); |
| 107 | mac_started |= is_mac_start; |
| 108 | uint8_t mac_ended = constant_time_ge_8(i, mac_end); |
| 109 | rotated_mac[j] |= in[i] & mac_started & ~mac_ended; |
| 110 | // Save the offset that |mac_start| is mapped to. |
| 111 | rotate_offset |= j & is_mac_start; |
| 112 | } |
| 113 |
| 114 | // Now rotate the MAC. We rotate in log(md_size) steps, one for each bit |
| 115 | // position. |
| 116 | for (size_t offset = 1; offset < md_size; offset <<= 1, rotate_offset >>= 1) { |
| 117 | // Rotate by |offset| iff the corresponding bit is set in |
| 118 | // |rotate_offset|, placing the result in |rotated_mac_tmp|. |
| 119 | const uint8_t skip_rotate = (rotate_offset & 1) - 1; |
| 120 | for (size_t i = 0, j = offset; i < md_size; i++, j++) { |
| 121 | if (j >= md_size) { |
| 122 | j -= md_size; |
| 123 | } |
| 124 | rotated_mac_tmp[i] = |
| 125 | constant_time_select_8(skip_rotate, rotated_mac[i], rotated_mac[j]); |
| 126 | } |
| 127 |
| 128 | // Swap pointers so |rotated_mac| contains the (possibly) rotated value. |
| 129 | // Note the number of iterations and thus the identity of these pointers is |
| 130 | // public information. |
| 131 | uint8_t *tmp = rotated_mac; |
| 132 | rotated_mac = rotated_mac_tmp; |
| 133 | rotated_mac_tmp = tmp; |
| 134 | } |
| 135 |
| 136 | OPENSSL_memcpy(out, rotated_mac, md_size); |
| 137 | } |
| 138 |
| 139 | int EVP_sha1_final_with_secret_suffix(SHA_CTX *ctx, |
| 140 | uint8_t out[SHA_DIGEST_LENGTH], |
| 141 | const uint8_t *in, size_t len, |
| 142 | size_t max_len) { |
| 143 | // Bound the input length so |total_bits| below fits in four bytes. This is |
| 144 | // redundant with TLS record size limits. This also ensures |input_idx| below |
| 145 | // does not overflow. |
| 146 | size_t max_len_bits = max_len << 3; |
| 147 | if (ctx->Nh != 0 || |
| 148 | (max_len_bits >> 3) != max_len || // Overflow |
| 149 | ctx->Nl + max_len_bits < max_len_bits || |
| 150 | ctx->Nl + max_len_bits > UINT32_MAX) { |
| 151 | return 0; |
| 152 | } |
| 153 |
| 154 | // We need to hash the following into |ctx|: |
| 155 | // |
| 156 | // - ctx->data[:ctx->num] |
| 157 | // - in[:len] |
| 158 | // - A 0x80 byte |
| 159 | // - However many zero bytes are needed to pad up to a block. |
| 160 | // - Eight bytes of length. |
| 161 | size_t num_blocks = (ctx->num + len + 1 + 8 + SHA_CBLOCK - 1) >> 6; |
| 162 | size_t last_block = num_blocks - 1; |
| 163 | size_t max_blocks = (ctx->num + max_len + 1 + 8 + SHA_CBLOCK - 1) >> 6; |
| 164 |
| 165 | // The bounds above imply |total_bits| fits in four bytes. |
| 166 | size_t total_bits = ctx->Nl + (len << 3); |
| 167 | uint8_t length_bytes[4]; |
| 168 | length_bytes[0] = (uint8_t)(total_bits >> 24); |
| 169 | length_bytes[1] = (uint8_t)(total_bits >> 16); |
| 170 | length_bytes[2] = (uint8_t)(total_bits >> 8); |
| 171 | length_bytes[3] = (uint8_t)total_bits; |
| 172 |
| 173 | // We now construct and process each expected block in constant-time. |
| 174 | uint8_t block[SHA_CBLOCK] = {0}; |
| 175 | uint32_t result[5] = {0}; |
| 176 | // input_idx is the index into |in| corresponding to the current block. |
| 177 | // However, we allow this index to overflow beyond |max_len|, to simplify the |
| 178 | // 0x80 byte. |
| 179 | size_t input_idx = 0; |
| 180 | for (size_t i = 0; i < max_blocks; i++) { |
| 181 | // Fill |block| with data from the partial block in |ctx| and |in|. We copy |
| 182 | // as if we were hashing up to |max_len| and then zero the excess later. |
| 183 | size_t block_start = 0; |
| 184 | if (i == 0) { |
| 185 | OPENSSL_memcpy(block, ctx->data, ctx->num); |
| 186 | block_start = ctx->num; |
| 187 | } |
| 188 | if (input_idx < max_len) { |
| 189 | size_t to_copy = SHA_CBLOCK - block_start; |
| 190 | if (to_copy > max_len - input_idx) { |
| 191 | to_copy = max_len - input_idx; |
| 192 | } |
| 193 | OPENSSL_memcpy(block + block_start, in + input_idx, to_copy); |
| 194 | } |
| 195 |
| 196 | // Zero any bytes beyond |len| and add the 0x80 byte. |
| 197 | for (size_t j = block_start; j < SHA_CBLOCK; j++) { |
| 198 | // input[idx] corresponds to block[j]. |
| 199 | size_t idx = input_idx + j - block_start; |
| 200 | // The barriers on |len| are not strictly necessary. However, without |
| 201 | // them, GCC compiles this code by incorporating |len| into the loop |
| 202 | // counter and subtracting it out later. This is still constant-time, but |
| 203 | // it frustrates attempts to validate this. |
| 204 | uint8_t is_in_bounds = constant_time_lt_8(idx, value_barrier_w(len)); |
| 205 | uint8_t is_padding_byte = constant_time_eq_8(idx, value_barrier_w(len)); |
| 206 | block[j] &= is_in_bounds; |
| 207 | block[j] |= 0x80 & is_padding_byte; |
| 208 | } |
| 209 |
| 210 | input_idx += SHA_CBLOCK - block_start; |
| 211 |
| 212 | // Fill in the length if this is the last block. |
| 213 | crypto_word_t is_last_block = constant_time_eq_w(i, last_block); |
| 214 | for (size_t j = 0; j < 4; j++) { |
| 215 | block[SHA_CBLOCK - 4 + j] |= is_last_block & length_bytes[j]; |
| 216 | } |
| 217 |
| 218 | // Process the block and save the hash state if it is the final value. |
| 219 | SHA1_Transform(ctx, block); |
| 220 | for (size_t j = 0; j < 5; j++) { |
| 221 | result[j] |= is_last_block & ctx->h[j]; |
| 222 | } |
| 223 | } |
| 224 |
| 225 | // Write the output. |
| 226 | for (size_t i = 0; i < 5; i++) { |
| 227 | CRYPTO_store_u32_be(out + 4 * i, result[i]); |
| 228 | } |
| 229 | return 1; |
| 230 | } |
| 231 |
| 232 | int EVP_sha256_final_with_secret_suffix(SHA256_CTX *ctx, |
| 233 | uint8_t out[SHA256_DIGEST_LENGTH], |
| 234 | const uint8_t *in, size_t len, |
| 235 | size_t max_len) { |
| 236 | // Bound the input length so |total_bits| below fits in four bytes. This is |
| 237 | // redundant with TLS record size limits. This also ensures |input_idx| below |
| 238 | // does not overflow. |
| 239 | size_t max_len_bits = max_len << 3; |
| 240 | if (ctx->Nh != 0 || |
| 241 | (max_len_bits >> 3) != max_len || // Overflow |
| 242 | ctx->Nl + max_len_bits < max_len_bits || |
| 243 | ctx->Nl + max_len_bits > UINT32_MAX) { |
| 244 | return 0; |
| 245 | } |
| 246 |
| 247 | // We need to hash the following into |ctx|: |
| 248 | // |
| 249 | // - ctx->data[:ctx->num] |
| 250 | // - in[:len] |
| 251 | // - A 0x80 byte |
| 252 | // - However many zero bytes are needed to pad up to a block. |
| 253 | // - Eight bytes of length. |
| 254 | size_t num_blocks = (ctx->num + len + 1 + 8 + SHA256_CBLOCK - 1) >> 6; |
| 255 | size_t last_block = num_blocks - 1; |
| 256 | size_t max_blocks = (ctx->num + max_len + 1 + 8 + SHA256_CBLOCK - 1) >> 6; |
| 257 |
| 258 | // The bounds above imply |total_bits| fits in four bytes. |
| 259 | size_t total_bits = ctx->Nl + (len << 3); |
| 260 | uint8_t length_bytes[4]; |
| 261 | length_bytes[0] = (uint8_t)(total_bits >> 24); |
| 262 | length_bytes[1] = (uint8_t)(total_bits >> 16); |
| 263 | length_bytes[2] = (uint8_t)(total_bits >> 8); |
| 264 | length_bytes[3] = (uint8_t)total_bits; |
| 265 |
| 266 | // We now construct and process each expected block in constant-time. |
| 267 | uint8_t block[SHA256_CBLOCK] = {0}; |
| 268 | uint32_t result[8] = {0}; |
| 269 | // input_idx is the index into |in| corresponding to the current block. |
| 270 | // However, we allow this index to overflow beyond |max_len|, to simplify the |
| 271 | // 0x80 byte. |
| 272 | size_t input_idx = 0; |
| 273 | for (size_t i = 0; i < max_blocks; i++) { |
| 274 | // Fill |block| with data from the partial block in |ctx| and |in|. We copy |
| 275 | // as if we were hashing up to |max_len| and then zero the excess later. |
| 276 | size_t block_start = 0; |
| 277 | if (i == 0) { |
| 278 | OPENSSL_memcpy(block, ctx->data, ctx->num); |
| 279 | block_start = ctx->num; |
| 280 | } |
| 281 | if (input_idx < max_len) { |
| 282 | size_t to_copy = SHA256_CBLOCK - block_start; |
| 283 | if (to_copy > max_len - input_idx) { |
| 284 | to_copy = max_len - input_idx; |
| 285 | } |
| 286 | OPENSSL_memcpy(block + block_start, in + input_idx, to_copy); |
| 287 | } |
| 288 |
| 289 | // Zero any bytes beyond |len| and add the 0x80 byte. |
| 290 | for (size_t j = block_start; j < SHA256_CBLOCK; j++) { |
| 291 | // input[idx] corresponds to block[j]. |
| 292 | size_t idx = input_idx + j - block_start; |
| 293 | // The barriers on |len| are not strictly necessary. However, without |
| 294 | // them, GCC compiles this code by incorporating |len| into the loop |
| 295 | // counter and subtracting it out later. This is still constant-time, but |
| 296 | // it frustrates attempts to validate this. |
| 297 | uint8_t is_in_bounds = constant_time_lt_8(idx, value_barrier_w(len)); |
| 298 | uint8_t is_padding_byte = constant_time_eq_8(idx, value_barrier_w(len)); |
| 299 | block[j] &= is_in_bounds; |
| 300 | block[j] |= 0x80 & is_padding_byte; |
| 301 | } |
| 302 |
| 303 | input_idx += SHA256_CBLOCK - block_start; |
| 304 |
| 305 | // Fill in the length if this is the last block. |
| 306 | crypto_word_t is_last_block = constant_time_eq_w(i, last_block); |
| 307 | for (size_t j = 0; j < 4; j++) { |
| 308 | block[SHA256_CBLOCK - 4 + j] |= is_last_block & length_bytes[j]; |
| 309 | } |
| 310 |
| 311 | // Process the block and save the hash state if it is the final value. |
| 312 | SHA256_Transform(ctx, block); |
| 313 | for (size_t j = 0; j < 8; j++) { |
| 314 | result[j] |= is_last_block & ctx->h[j]; |
| 315 | } |
| 316 | } |
| 317 |
| 318 | // Write the output. |
| 319 | for (size_t i = 0; i < 8; i++) { |
| 320 | CRYPTO_store_u32_be(out + 4 * i, result[i]); |
| 321 | } |
| 322 | return 1; |
| 323 | } |
| 324 |
| 325 | int EVP_tls_cbc_record_digest_supported(const EVP_MD *md) { |
| 326 | switch (EVP_MD_type(md)) { |
| 327 | case NID_sha1: |
| 328 | case NID_sha256: |
| 329 | return 1; |
| 330 | default: |
| 331 | return 0; |
| 332 | } |
| 333 | } |
| 334 |
| 335 | static int tls_cbc_digest_record_sha1(uint8_t *md_out, size_t *md_out_size, |
| 336 | const uint8_t header[13], |
| 337 | const uint8_t *data, size_t data_size, |
| 338 | size_t data_plus_mac_plus_padding_size, |
| 339 | const uint8_t *mac_secret, |
| 340 | unsigned mac_secret_length) { |
| 341 | if (mac_secret_length > SHA_CBLOCK) { |
| 342 | // HMAC pads small keys with zeros and hashes large keys down. This function |
| 343 | // should never reach the large key case. |
| 344 | assert(0); |
| 345 | return 0; |
| 346 | } |
| 347 |
| 348 | // Compute the initial HMAC block. |
| 349 | uint8_t hmac_pad[SHA_CBLOCK]; |
| 350 | OPENSSL_memset(hmac_pad, 0, sizeof(hmac_pad)); |
| 351 | OPENSSL_memcpy(hmac_pad, mac_secret, mac_secret_length); |
| 352 | for (size_t i = 0; i < SHA_CBLOCK; i++) { |
| 353 | hmac_pad[i] ^= 0x36; |
| 354 | } |
| 355 |
| 356 | SHA_CTX ctx; |
| 357 | SHA1_Init(&ctx); |
| 358 | SHA1_Update(&ctx, hmac_pad, SHA_CBLOCK); |
| 359 | SHA1_Update(&ctx, header, 13); |
| 360 |
| 361 | // There are at most 256 bytes of padding, so we can compute the public |
| 362 | // minimum length for |data_size|. |
| 363 | size_t min_data_size = 0; |
| 364 | if (data_plus_mac_plus_padding_size > SHA_DIGEST_LENGTH + 256) { |
| 365 | min_data_size = data_plus_mac_plus_padding_size - SHA_DIGEST_LENGTH - 256; |
| 366 | } |
| 367 |
| 368 | // Hash the public minimum length directly. This reduces the number of blocks |
| 369 | // that must be computed in constant-time. |
| 370 | SHA1_Update(&ctx, data, min_data_size); |
| 371 |
| 372 | // Hash the remaining data without leaking |data_size|. |
| 373 | uint8_t mac_out[SHA_DIGEST_LENGTH]; |
| 374 | if (!EVP_sha1_final_with_secret_suffix( |
| 375 | &ctx, mac_out, data + min_data_size, data_size - min_data_size, |
| 376 | data_plus_mac_plus_padding_size - min_data_size)) { |
| 377 | return 0; |
| 378 | } |
| 379 |
| 380 | // Complete the HMAC in the standard manner. |
| 381 | SHA1_Init(&ctx); |
| 382 | for (size_t i = 0; i < SHA_CBLOCK; i++) { |
| 383 | hmac_pad[i] ^= 0x6a; |
| 384 | } |
| 385 |
| 386 | SHA1_Update(&ctx, hmac_pad, SHA_CBLOCK); |
| 387 | SHA1_Update(&ctx, mac_out, SHA_DIGEST_LENGTH); |
| 388 | SHA1_Final(md_out, &ctx); |
| 389 | *md_out_size = SHA_DIGEST_LENGTH; |
| 390 | return 1; |
| 391 | } |
| 392 |
| 393 | static int tls_cbc_digest_record_sha256(uint8_t *md_out, size_t *md_out_size, |
| 394 | const uint8_t header[13], |
| 395 | const uint8_t *data, size_t data_size, |
| 396 | size_t data_plus_mac_plus_padding_size, |
| 397 | const uint8_t *mac_secret, |
| 398 | unsigned mac_secret_length) { |
| 399 | if (mac_secret_length > SHA256_CBLOCK) { |
| 400 | // HMAC pads small keys with zeros and hashes large keys down. This function |
| 401 | // should never reach the large key case. |
| 402 | assert(0); |
| 403 | return 0; |
| 404 | } |
| 405 |
| 406 | // Compute the initial HMAC block. |
| 407 | uint8_t hmac_pad[SHA256_CBLOCK]; |
| 408 | OPENSSL_memset(hmac_pad, 0, sizeof(hmac_pad)); |
| 409 | OPENSSL_memcpy(hmac_pad, mac_secret, mac_secret_length); |
| 410 | for (size_t i = 0; i < SHA256_CBLOCK; i++) { |
| 411 | hmac_pad[i] ^= 0x36; |
| 412 | } |
| 413 |
| 414 | SHA256_CTX ctx; |
| 415 | SHA256_Init(&ctx); |
| 416 | SHA256_Update(&ctx, hmac_pad, SHA256_CBLOCK); |
| 417 | SHA256_Update(&ctx, header, 13); |
| 418 |
| 419 | // There are at most 256 bytes of padding, so we can compute the public |
| 420 | // minimum length for |data_size|. |
| 421 | size_t min_data_size = 0; |
| 422 | if (data_plus_mac_plus_padding_size > SHA256_DIGEST_LENGTH + 256) { |
| 423 | min_data_size = |
| 424 | data_plus_mac_plus_padding_size - SHA256_DIGEST_LENGTH - 256; |
| 425 | } |
| 426 |
| 427 | // Hash the public minimum length directly. This reduces the number of blocks |
| 428 | // that must be computed in constant-time. |
| 429 | SHA256_Update(&ctx, data, min_data_size); |
| 430 |
| 431 | // Hash the remaining data without leaking |data_size|. |
| 432 | uint8_t mac_out[SHA256_DIGEST_LENGTH]; |
| 433 | if (!EVP_sha256_final_with_secret_suffix( |
| 434 | &ctx, mac_out, data + min_data_size, data_size - min_data_size, |
| 435 | data_plus_mac_plus_padding_size - min_data_size)) { |
| 436 | return 0; |
| 437 | } |
| 438 |
| 439 | // Complete the HMAC in the standard manner. |
| 440 | SHA256_Init(&ctx); |
| 441 | for (size_t i = 0; i < SHA256_CBLOCK; i++) { |
| 442 | hmac_pad[i] ^= 0x6a; |
| 443 | } |
| 444 |
| 445 | SHA256_Update(&ctx, hmac_pad, SHA256_CBLOCK); |
| 446 | SHA256_Update(&ctx, mac_out, SHA256_DIGEST_LENGTH); |
| 447 | SHA256_Final(md_out, &ctx); |
| 448 | *md_out_size = SHA256_DIGEST_LENGTH; |
| 449 | return 1; |
| 450 | } |
| 451 |
| 452 | int EVP_tls_cbc_digest_record(const EVP_MD *md, uint8_t *md_out, |
| 453 | size_t *md_out_size, const uint8_t header[13], |
| 454 | const uint8_t *data, size_t data_size, |
| 455 | size_t data_plus_mac_plus_padding_size, |
| 456 | const uint8_t *mac_secret, |
| 457 | unsigned mac_secret_length) { |
| 458 | switch (EVP_MD_type(md)) { |
| 459 | case NID_sha1: |
| 460 | return tls_cbc_digest_record_sha1( |
| 461 | md_out, md_out_size, header, data, data_size, |
| 462 | data_plus_mac_plus_padding_size, mac_secret, mac_secret_length); |
| 463 |
| 464 | case NID_sha256: |
| 465 | return tls_cbc_digest_record_sha256( |
| 466 | md_out, md_out_size, header, data, data_size, |
| 467 | data_plus_mac_plus_padding_size, mac_secret, mac_secret_length); |
| 468 |
| 469 | default: |
| 470 | // EVP_tls_cbc_record_digest_supported should have been called first to |
| 471 | // check that the hash function is supported. |
| 472 | assert(0); |
| 473 | *md_out_size = 0; |
| 474 | return 0; |
| 475 | } |
| 476 | } |
| 477 |