Giter VIP home page Giter VIP logo

Comments (6)

danni avatar danni commented on June 3, 2024

Passing None means to skip login to the session.

from python-pkcs11.

keldonin avatar keldonin commented on June 3, 2024

So, when I run tests without defining a user PIN for the token (i.e. PKCS11_TOKEN_PIN equals None), many (but not all) fail:

...
test_encrypt (tests.test_aes.AESTests) ... ERROR
test_encrypt_big_string (tests.test_aes.AESTests) ... ERROR
test_encrypt_stream (tests.test_aes.AESTests) ... ERROR
test_encrypt_whacky_sizes (tests.test_aes.AESTests) ... ERROR
test_sign (tests.test_aes.AESTests) ... ERROR
test_sign_stream (tests.test_aes.AESTests) ... ERROR
test_wrap (tests.test_aes.AESTests) ... ERROR
test_encrypt_oaep (tests.test_rsa.RSATests) ... ERROR
test_encrypt_too_much_data (tests.test_rsa.RSATests) ... ERROR
test_key_wrap (tests.test_rsa.RSATests) ... ERROR
test_sign_default (tests.test_rsa.RSATests) ... ERROR
test_sign_pkcs_v15 (tests.test_rsa.RSATests) ... ERROR
test_sign_pss (tests.test_rsa.RSATests) ... ERROR
test_sign_stream (tests.test_rsa.RSATests) ... ERROR
...

Should there be some decorator to skip tests where a PIN is actually needed?

from python-pkcs11.

danni avatar danni commented on June 3, 2024

It really depends on the implementation you're testing against.

from python-pkcs11.

keldonin avatar keldonin commented on June 3, 2024

..are you suggesting some implementations aren't requiring a C_Login() to interact with the private objects? That would be pretty much non compliant with the specs.

I was only suggesting (and volunteering) to add some decorators around these test cases that require C_Login(). If no password is given, fair enough, these would be skipped.

from python-pkcs11.

danni avatar danni commented on June 3, 2024

Just that there's some C_Login implementations we're not handling yet (e.g. Out of Band), so I wouldn't go adding a lot of decorators for it. At the moment not supplying a pin causes it to skip of C_Login, and I'm pretty sure I've seen a USB key where everything was a public object.

from python-pkcs11.

keldonin avatar keldonin commented on June 3, 2024

OK, so let's leave it as it is for now. Thanks for the rationale.

from python-pkcs11.

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.