mirror of https://github.com/apache/maven.git
[MNG-1349] openssl checksums are not accepted by maven
o Merged from r730631 git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@730635 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
970065b4bd
commit
6a3afa1c46
|
@ -800,8 +800,9 @@ public class DefaultWagonManager
|
|||
// remove whitespaces at the end
|
||||
expectedChecksum = expectedChecksum.trim();
|
||||
|
||||
// check for 'MD5 (name) = CHECKSUM'
|
||||
if ( expectedChecksum.startsWith( "MD5" ) )
|
||||
// check for 'ALGO (name) = CHECKSUM' like used by openssl
|
||||
if ( expectedChecksum.regionMatches( true, 0, "MD", 0, 2 )
|
||||
|| expectedChecksum.regionMatches( true, 0, "SHA", 0, 3 ) )
|
||||
{
|
||||
int lastSpacePos = expectedChecksum.lastIndexOf( ' ' );
|
||||
expectedChecksum = expectedChecksum.substring( lastSpacePos + 1 );
|
||||
|
|
Loading…
Reference in New Issue