Giter Site home page Giter Site logo

Comments (10)

kukel avatar kukel commented on July 29, 2024 1

This is what I ended up with:

final ECryptoAlgorithmSign eSigningAlgorithm = ECryptoAlgorithmSign.getFromIDOrNull(aPartnership.getSigningAlgorithm());

if (eSigningAlgorithm == null)
    throw new OpenAS2Exception ("The signing algorithm '" + aPartnership.getSigningAlgorithm() + "' is not supported!");
final String sMIC = AS2Helper.getCryptoHelper ().calculateMIC (aMsg.getData (),eSigningAlgorithm,

And the following piece of code is superfluous then in the calculateMic method:

final String sDispositionOptions = aPartnership.getAS2MDNOptions ();
final DispositionOptions aDispositionOptions = DispositionOptions.createFromString (sDispositionOptions);

if (LOGGER.isDebugEnabled ())
  LOGGER.debug ("DispositionOptions=" + aDispositionOptions);

Will setup my github correctly so I can create PR's

from as2-lib.

phax avatar phax commented on July 29, 2024

Thx. Makes sense. Btw which algo is it?
Sorry, misread it

from as2-lib.

kukel avatar kukel commented on July 29, 2024

I do not completely understand your question in this context. One of the reasons we are looking for newer software is that ours does not support modern algorithms and sha-1 is the max.

(Sorry, closed by accident)

from as2-lib.

phax avatar phax commented on July 29, 2024

Well, this is a tricky one. There are the Disposition-Notification-Options and there is the partnership signing algorithm.

What you are outlining suits my understanding:

  • AS2SenderModule must use the partnership signing algorithm
  • MDN creation must use the Disposition-Notification-Options

from as2-lib.

kukel avatar kukel commented on July 29, 2024

Yes this is what I think it should be... But in the MDN creation it still works, unrelated pieces of code. So the fix I proposed is safe (afaics)

from as2-lib.

phax avatar phax commented on July 29, 2024

I changed it slightly, so that a default algorithm is used (depending on the algorithm suite used), if none, or an invalid one is provided.

from as2-lib.

phax avatar phax commented on July 29, 2024

SNAPSHOT 12 and onwards contain this fix. Thanks again for pointing it out.

from as2-lib.

kukel avatar kukel commented on July 29, 2024

Providing a default if none is provided sounds ok, but I am not a fan of defaults if invalid ones are provided. It's masking wrong configurations.

from as2-lib.

phax avatar phax commented on July 29, 2024

That's why I added an extra logging, so that it gets obvious

from as2-lib.

kukel avatar kukel commented on July 29, 2024

Thankls, that makes it better (although logging tends to be 'neglected' way too often is our experience if there is additional (error) logging that should be ignored)

from as2-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.