Giter Site home page Giter Site logo

Comments (2)

frozencemetery avatar frozencemetery commented on June 29, 2024

pesigcheck failed to validate signatures done by expired certificate.

I don't know why you'd expect anything different. Note that pesign isn't what's actually running and performing validation on the machine during boot - pesign is in userspace, for performing and checking signatures.

from pesign.

iokomin avatar iokomin commented on June 29, 2024

@frozencemetery thanks for looking into it, your evaluation makes sense to me if signature validation done by expired certificate outside of the validity time frame considered as invalid.

Trying to get desired behavior taking into account test certificate in the pesign package is intentionally expired, see https://bugzilla.redhat.com/show_bug.cgi?id=1411213#c5.
Could you please take a look at the atTime calculation logic and share your thoughts on the target purpose? See snippet

pesign/src/certdb.c

Lines 369 to 391 in e0ea290

notBefore = earlyNow;
notAfter = lateNow;
find_cert_times(cinfo, &notBefore, &notAfter);
if (earlyNow < notBefore)
earlyNow = notBefore;
if (lateNow > notAfter)
lateNow = notAfter;
// atTime = determine_reasonable_time(cert);
eTime = SEC_PKCS7GetSigningTime(cinfo);
if (eTime != NULL) {
if (DER_DecodeTimeChoice (&atTime, eTime) == SECSuccess) {
if (earlyNow < atTime)
earlyNow = atTime;
if (lateNow > atTime)
lateNow = atTime;
}
}
if (lateNow < earlyNow)
printf("Signature has impossible time constraint: %lld <= %lld\n",
earlyNow / 1000000LL, lateNow / 1000000LL);
atTime = earlyNow / 2 + lateNow / 2;

Curious about line 391 assignment for atTime variable.

from pesign.

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.