cms_lib.c (194206) | cms_lib.c (205128) |
---|---|
1/* crypto/cms/cms_lib.c */ 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 3 * project. 4 */ 5/* ==================================================================== 6 * Copyright (c) 2008 The OpenSSL Project. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 401 unchanged lines hidden (view full) --- 410 chain = BIO_find_type(chain, BIO_TYPE_MD); 411 if (chain == NULL) 412 { 413 CMSerr(CMS_F_CMS_DIGESTALGORITHM_FIND_CTX, 414 CMS_R_NO_MATCHING_DIGEST); 415 return 0; 416 } 417 BIO_get_md_ctx(chain, &mtmp); | 1/* crypto/cms/cms_lib.c */ 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 3 * project. 4 */ 5/* ==================================================================== 6 * Copyright (c) 2008 The OpenSSL Project. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 401 unchanged lines hidden (view full) --- 410 chain = BIO_find_type(chain, BIO_TYPE_MD); 411 if (chain == NULL) 412 { 413 CMSerr(CMS_F_CMS_DIGESTALGORITHM_FIND_CTX, 414 CMS_R_NO_MATCHING_DIGEST); 415 return 0; 416 } 417 BIO_get_md_ctx(chain, &mtmp); |
418 if (EVP_MD_CTX_type(mtmp) == nid) | 418 if (EVP_MD_CTX_type(mtmp) == nid 419 /* Workaround for broken implementations that use signature 420 * algorithm OID instead of digest. 421 */ 422 || EVP_MD_pkey_type(EVP_MD_CTX_md(mtmp)) == nid) |
419 { 420 EVP_MD_CTX_copy_ex(mctx, mtmp); 421 return 1; 422 } 423 chain = BIO_next(chain); 424 } 425 } 426 --- 197 unchanged lines hidden --- | 423 { 424 EVP_MD_CTX_copy_ex(mctx, mtmp); 425 return 1; 426 } 427 chain = BIO_next(chain); 428 } 429 } 430 --- 197 unchanged lines hidden --- |