Smartcards and wpa_supplicant

Jouni Malinen jkmaline at cc.hut.fi
Mon Apr 18 23:28:43 EDT 2005


On Mon, Apr 18, 2005 at 05:36:51PM +0200, Gordon Hecker wrote:

> >- make TLS engine support configurable (CONFIG_SMARTCARD=y in .config)
> 
> I chose the approach of "autodetecting" openssl engine support to
> avoid the need to configure smartcard support manually. That way the
> code would simply get compiled more often.
> The OPENSSL_NO_ENGINE macro is available after including ssl.h if
> openssl is compiled with the no-engine option.
> So inside tls_openssl.c the CONFIG_SMARTCARD macro is not required.

I had some odd results when testing this against one of my openssl
builds, but anyway, the main reason for this was in adding -ldl
conditionally to the linker.

> >- add -ldl to fix linking
> I never had to explicitly use -ldl when compiling wpa_supplicant
> since dlopen & friends are not used directly. Did you have issues or
> is your way just considered the clean way?

Hmm.. I did have issues and adding -ldl resolved them. Linking was
failing because of dlopen not found. However, I seem to be unable
reproduce this now, so I'm not really sure what triggered the problem
previously.

> Taking the last two together it might be possible to remove the need
> of the CONFIG_SMARTCARD=y compile time configuration without breaking
> anything.

That's possible, however, I'm somewhat concerned due to the problems I
saw while merging the changes. Anyway, this is easy enough to remove in
the future, if desired.

> I did a short test today and it works for me.

That's great; thanks for testing this.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the HostAP mailing list