Bumping this because I’m also trying to get a simple secure storage for a password in pure QML, and am trying to navigate the maze that are the Secrets QML types.
Anyway, on my system, libsailfishsecrets-sqlcipher.so
is in sailfishsecretsdaemon-secretsplugin-common
, not sailfishsecretsdaemon-secretsplugins-default
. (Note the plugin vs plugins naming difference.)
It is installed, but still, the error given above is output when running the following example code:
import QtQuick 2.6
import Sailfish.Silica 1.0
import Sailfish.Crypto 1.0 as Crypto
import Sailfish.Secrets 1.0 as Secrets
ApplicationWindow { initialPage: Component { Page { id: page
SilicaFlickable {
anchors.fill: parent
contentHeight: col.height
Column { id: col
anchors.centerIn: parent
width: parent.width
ButtonLayout{
anchors.horizontalCenter: parent.horizontalCenter
Button { text: qsTr("create Collection") ; onClicked: secrets.setupCollection() }
}
}
}}}
Item { id: secrets
visible: false
readonly property string collectionName: Qt.application.name
function setupCollection() {
ccr.startRequest()
}
Secrets.SecretManager { id: manager }
Secrets.CreateCollectionRequest { id: ccr
manager: manager
collectionName: secrets.collectionName
storagePluginName: manager.defaultEncryptedStoragePluginName
encryptionPluginName: manager.defaultEncryptionPluginName
onResultChanged: {
if (result.code == Crypto.Result.Failed) {
console.log("CCR: error: " + result.errorMessage)
} else if (result.code == Crypto.Result.Succeeded) {
console.log("CCR: succeeded")
}
}
}
}
}
Output below. Packaging it in a “full” app with .desktop file and everything and running via sailfish-qml
or invoker sailfish-qml
gives the same error.
nemo@PGXperiiia10:~/tmp $ qmlscene testccr.qml
11:59:36.135 unknown:0 unknown Using Wayland-EGL
library "libGLESv2_adreno.so" not found
library "eglSubDriverAndroid.so" not found
library "vendor.qti.qspmhal@1.0.so" not found
11:59:38.426 qml: file:///home/nemo/tmp/testccr.qml:38 onResultChanged CCR: error: No such storage plugin exists: org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher
nemo@PGXperiiia10:~/tmp $ secrets-tool --list-plugins
Authentication plugins:
"org.sailfishos.secrets.plugin.authentication.inapp"
"org.sailfishos.secrets.plugin.authentication.passwordagent"
Encryption plugins:
"org.sailfishos.secrets.plugin.encryption.openssl"
Storage plugins:
"org.sailfishos.secrets.plugin.storage.sqlite"
Encrypted storage plugins:
"org.sailfishos.crypto.plugin.gnupg.openpgp"
"org.sailfishos.crypto.plugin.gnupg.smime"
"org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher"
Crypto storage plugins:
"org.sailfishos.crypto.plugin.gnupg.openpgp"
"org.sailfishos.crypto.plugin.gnupg.smime"
"org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher"
Crypto plugins:
"org.sailfishos.crypto.plugin.crypto.openssl"