Code Monkey home page Code Monkey logo

Comments (9)

linuxwolf avatar linuxwolf commented on August 18, 2024

@christmart can you provide some information on how OpenSSL is packaged for s390x? Failures here could also be due to the lack of EC support being compiled in.

We'll work on a way to get more detailed errors reported from OpenSSL otherwise.

from cjose.

zandbelt avatar zandbelt commented on August 18, 2024

@linuxwolf the errors occur in a build of 0.4.1 which was released before reformatting; so jws.c:536 refers to this line:

cjose/src/jws.c

Line 536 in 67eba48

CJOSE_ERROR(err, CJOSE_ERR_CRYPTO);

from cjose.

linuxwolf avatar linuxwolf commented on August 18, 2024

@zandbelt @christmart there are only three ways for cjose_base64url_encode to fail:

  1. memory errors
  2. NULL or 0 input
  3. NULL outputs

The jws.c code definitely prevents # 3 from happening, which leaves either memory errors or bad inputs. I think I recall some versions of OpenSSL with EC features compiled out would not return errors, but might not return values either.

from cjose.

christmart avatar christmart commented on August 18, 2024

from cjose.

christmart avatar christmart commented on August 18, 2024

from cjose.

christmart avatar christmart commented on August 18, 2024

The attachement of the previous message is missing.

I got the following hint from Aurelien Jarno [email protected]:

Looking at the failures, it seems to fails on all 64-bit big-endian
architectures (ppc64, s390x, sparc64). Looking at the code, there is
an issue with at least this part of the code from jws.c:

if (RSA_sign(digest_alg, jws->dig, jws->dig_len, jws->sig, (unsigned int *)&jws->sig_len, (RSA *)jwk->keydata) != 1)

You can't cast a pointer to a pointer of different size.

from cjose.

linuxwolf avatar linuxwolf commented on August 18, 2024

Thanks for the hint. I don't see anything in the openssl configuration items that point to a particular problem. That line is certainly a bug that should be addressed, but I have no way to confirm it's the cause of this issue.

from cjose.

christmart avatar christmart commented on August 18, 2024

from cjose.

christmart avatar christmart commented on August 18, 2024

The patch is working and also fixes the problem with the failing test after building on s390x, sparc64 and ppc64.

from cjose.

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.