According to TUPAS spec, existing MD5 and SHA1 algorithms will be deprecated by 31.12.2011. A new algorithm SHA-256 needs to be implemented.

More information from Federation of Finnish Financial Services:
http://www.fkl.fi/en/themes/e-services/tupas/Pages/default.aspx

Comments

dotsi’s picture

Status: Active » Needs work
iler’s picture

Any ETA for this one? 31.12.2011 is coming sooner than you think it will be ;-)

dotsi’s picture

Well, the issue is here, free for anyone to pick up and implement ;) I'm not making any promises that I will have the time to work on this before the end of the year.

isampo’s picture

Status: Needs work » Needs review

SHA256 algorithm is now available at the latest dev.

Note: If you're upgrading and want to start using the SHA256 algorithm (as you should), remember also to check your own Tupas return/validation functions that they are up-to-date. You might have been doing some validation there like:


// Calculate the MAC based on the encryption algorithm.
if ($_GET['B02K_ALG'] == 01) {
  $mac = strtoupper(md5($macstring));
}
else {
  $mac = strtoupper(sha1($macstring));
}
 

The code for the new SHA256 algorithm at the Tupas documentation is 03. If your code is something like above and you don't update your code, it won't work. To make things simple, I added a simple function to the tupas.module that you can use to calculate the MAC. Like this:


  // Calculate the MAC with given algorithm.
  $mac = tupas_calculate_mac($macstring, $_GET['B02K_ALG']);

juhaniemi’s picture

Version: 6.x-1.0-alpha1 » 7.x-1.x-dev
Issue tags: +needs backport to 6.x

So far this has been done only to 7.x branch. Backport patch would be welcome.

tuutti’s picture

Issue summary: View changes
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.