Yubico / yubikey-ksm

YubiKey Key Storage Module
https://developers.yubico.com/yubikey-ksm/
BSD 2-Clause "Simplified" License
54 stars 22 forks source link

fetching keys does not work with sqlite db #7

Closed Mrten closed 10 years ago

Mrten commented 11 years ago

in ykksm-decrypt.php: and active is not valid SQL for sqlite, it always returns no results. Fix: use and active='true'. I'll fork and send a pullrequest shortly.

Mrten commented 11 years ago

meh, I see I'm using old code (got it from yubikey-ksm-dpkg)

Mrten commented 11 years ago

active=1 does not work for sqlite.

Mrten commented 11 years ago

pullreq https://github.com/Yubico/yubikey-ksm/pull/8

jas4711 commented 11 years ago

Isn't proper SQL to just say 'AND active'? active is a boolean variable after all. Hopefully this works on all databases...

Mrten commented 11 years ago

That does not work for sqlite, that's why I started this bug, before I noticed that the Oracle addition already changed it to active=1 which leads me to believe that Oracle does not support it either. MySQL does not have it either (it's a synonym for TINYINT(1) there).

The boolean type is optional in SQL, AFAIK.

klali commented 10 years ago

I believe the sqlite issue is fixed (though pull request #8 isn't merged)

as reference: https://travis-ci.org/Yubico/yubikey-ksm/