diff --git a/src/bin/Jamfile b/src/bin/Jamfile index 4d1f6530bb..e4f0116810 100644 --- a/src/bin/Jamfile +++ b/src/bin/Jamfile @@ -88,6 +88,7 @@ StdBinCommands draggers.cpp ffm.cpp iroster.cpp + keystore.cpp listattr.cpp listfont.cpp listres.cpp diff --git a/src/bin/keystore.cpp b/src/bin/keystore.cpp new file mode 100644 index 0000000000..2c95f47514 --- /dev/null +++ b/src/bin/keystore.cpp @@ -0,0 +1,37 @@ +/* + * Copyright 2012, Haiku Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Michael Lotz, mmlr@mlotz.ch + */ + + +#include + +#include + + +int +main(int argc, char* argv[]) +{ + BKeyStore keyStore; + BPasswordKey password; + uint32 cookie = 0; + + while (true) { + printf("trying to get next password with cookie: %" B_PRIu32 "\n", + cookie); + + status_t result = keyStore.GetNextKey(B_KEY_TYPE_PASSWORD, + B_KEY_PURPOSE_ANY, cookie, password); + if (result != B_OK) { + printf("failed with: %s\n", strerror(result)); + break; + } + + password.PrintToStream(); + } + + return 0; +}