Skip to content

The PKCS11 provider was not parsing properly the i2c dev entry from #309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

Irdroid
Copy link

@Irdroid Irdroid commented Oct 31, 2022

The PKCS11 configuration. I am using ATECC608B, in Ubuntu, listed in sysfs as /dev/i2c-10 . When I change the configuration in /var/lib/cryptoauthlib/0.conf to point to i2c-10 device it compaints that it cant connect. It will only accept /dev/i2c-1 Thus this modification was needed!

Please describe the purpose of this pull request

Fix the issue with parsing the i2c dev number

Checklist

Georgi Bakalski added 2 commits October 30, 2022 18:52
the PKCS11 configuration. I am using ATECC608B, in Ubuntu, listed in
sysfs as /dev/i2c-10 . When I change the configuration in /var/lib/cryptoauthlib/0.conf
to point to i2c-10 device it compaints that it cant connect. It will only accept /dev/i2c-1
Thus this modification was needed!
@bryan-hunt
Copy link
Contributor

I'm rejecting this PR as having far too many problems to resolve:

  1. atoi is unsafe and is prohibited by basically every C language coding standard - it has been deprecated and the correct function to use is strtol (which is what is being used in the line that you replaced). The configuration is expecting a hex value which since the other fields are represented in hex. Simply using the hex representation would have resolved your issue or else you could submit a request to document/change the representation. Just one of many examples of standards prohibiting it's use: https://wiki.sei.cmu.edu/confluence/display/c/MSC24-C.+Do+not+use+deprecated+or+obsolescent+functions

  2. Pull requests should be logically separate into independent features/issues. Including a patch to resolve an ssh integration issue needs to be its own pull request. Atlassian Guide Github Guide

  3. Don't run CMake in your source tree, use a build directory instead https://cmake.org/cmake/help/latest/manual/cmake.1.html#generate-a-project-buildsystem

  4. Don't commit generated artifacts into source control

I would suggest opening an issue instead describing in detail the specific issue you are experiencing with ssh usage.

@bryan-hunt bryan-hunt closed this Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants