-
Notifications
You must be signed in to change notification settings - Fork 326
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
Added smartcard support with openssl-engine #464
Conversation
Thank you very much for this. I'll have a closer look as soon as I find the time to do so. I'm quite busy with other things right now. |
src/http.c
Outdated
@@ -45,6 +45,8 @@ static void url_encode(char *dest, const char *str) | |||
if (isalnum(*str) || *str == '-' || *str == '_' | |||
|| *str == '.' || *str == '~') | |||
*dest++ = *str; | |||
// else if (*str == ' ') | |||
// *dest++ = '+'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a quick look. We can omit these two lines that are commented out anyway (actually we have removed them last week on the master branch).
I haven't found the time to test yet, but from quickly looking over the code changes that's the only thing that I can see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok - I've cleaned that up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some testing in a Virtualbox...
- Fedora 28 and 29 - OK
- SuSE Tumbleweed - OK
- Suse Leap 15.0 and 15.1 - OK, but needs a newer version of libp11!
- Ubuntu 16.04 LTS - OK
- MacOS Mojave - NOK, it doesn't find the pkcs engine-by-id. Will have a deeper look on it.
@rmuehl Gteat contribution! Can you detail the version of libp11 that doesn't work (Suse 15.*) and the one that does? I think autoconf should check for the existence of the P11-KIT library and probably the required minimal version. I think it boils down to modifying
and
|
Turned out it's not about the libp11 version. Looks like SuSE messed up the RPMs for 15.0 and 15.1. There's a missing build-dependency for p11-kit-devel:
and libp11 ignores this silently:
|
Maybe we can pin that down to a particular header file that must be present and which we can check at configure time? |
But that would be the wrong package. The pkcs11-engine from libp11 needs to be compiled with p11-kit-devel installed. It's not related to openfortivpn....
But it's not linked in
I have no idea a.t.m, but I will take a deeper look into it to see what's really going on there. |
Ah, I see. I have just successfully compiled your branch on Ubuntu 16.04. Perhaps I can try OS X and FreeBSD the next days. |
I have built successfully on FreeBSD. |
There is no problem with compiling openfortivpn on all OSes at all. It's just a runtime problem when the pkcs11 engine is getting loaded, and that just happens if it is set in the config.
|
The SuSE thing is fixable with a good version of the pkcs11-engine. But on macOSX I have no idea yet. Couldn't get it running in my Virtualbox yet. |
I have squashed and merged this into our master. Let's address the issue on Mac OSX with a separate commit. |
this went into the 1.11.0 Release. |
Developed for Yubikey, but may work with other PIV enabled smartcards too.