GithubHelp home page GithubHelp logo

Comments (5)

jstedfast avatar jstedfast commented on September 28, 2024

I think this seems like a reasonable feature to have.

from gmime.

jstedfast avatar jstedfast commented on September 28, 2024

unwrap, extricate, extract, or unseal... I was thinking unencapsulate but apparently that's not a word ;-) It's also kinda long...

I'm leaning toward unwrap or extract. Internally I've used the word extract in some comments.

I was thinking of adding a GMimeVerifyFlags, but then I'd have to return NULL for the GMimeSignatureList which is the same as the value returned on error, so that feels like a bad API.

Unfortunately, adding a new virtual method on GMimeCryptoContext would break API/ABI, so this would be a good candidate for a GMime v4.0 API.

from gmime.

dkg avatar dkg commented on September 28, 2024

I prefer unwrap over extract, i think, but i'd be happy with either.

As for the API/ABI break, i think i'm a bit confused:

adding a new value for GMimeVerifyFlags seems like it would be a subtle API/ABI break itself (see #71).

I was unaware that adding a new virtual method breaks API! is that code really part of the practical API/ABI surface? Is the idea that some other GMimeCryptoContext implementation out there might break because it can't fulfill that API? Do we know of other GMimeCryptoContext implementations?

Also: PKCS#7 SignedData will only ever be handled by GMimeApplicationPkcs7Mime objects, not by generic GMimeCryptoContext -- does it need to use the CryptoContext at all?

from gmime.

jstedfast avatar jstedfast commented on September 28, 2024

Adding new VerifyFlags doesn't break API/ABI.

Adding a new virtual method breaks ABI because the struct size changes.

Balsa implements their own GMimeCryptoContext subclasses (or used to). I hope they don't find the need to anymore now that GMime uses GpgME.

GMimeApplicationPkcs7Mime uses GMimeCryptoContext to do encryption/decryption/signing/verifying/etc and should also use it to unwrap the signed-data since it would use GpgME to do so. The point of GMimeCryptoContext is to allow consumers of GMime to plug in their own crypto backend (which, admittedly, is less needed now that GMime uses GpgME... but it's there for historical reasons).

from gmime.

dkg avatar dkg commented on September 28, 2024

When i say that a new VerifyFlag breaks API, I'm using "API" as a description of the semantic behavior of a piece of software with respect to its stated programming interface.

While a new VerifyFlag doesn't change the structure of the API, it does change the semantics, particularly when that flag is supplied.

#71 describes why a new flag might subtly alter the programmer's expectation of the interface, which is an API break (although one not detectable by standard API verification techniques).

Anyway, if this can't be done without a API or ABI break, so be it :) -- i just wanted to explore the range of options we have available.

from gmime.

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.