Commit graph

12 commits

Author SHA1 Message Date
Paul Eggert
a04bf15130 Update more copyright years
Update some other copyright years automatically, by running:
Run 'UPDATE_COPYRIGHT_YEAR=2019 \
UPDATE_COPYRIGHT_USE_INTERVALS=1 \
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 admin/update-copyright'
followed by 'admin/merge-gnulib'.
2018-12-31 18:47:22 -08:00
Michael Albinus
8c28ac8023 Fix Bug#33568
* test/lisp/net/secrets-tests.el (secrets-test02-collections)
(secrets-test03-items): Do not expect "login" collection to
exist.  (Bug#33568)
2018-12-12 10:49:59 +01:00
Michael Albinus
02db06fc8e Fix Bug#32147
* test/lisp/net/secrets-tests.el (secrets-test02-collections)
(secrets-test03-items): Test for both "Login" or "login"
collection.  (Bug#32147)
2018-07-15 09:47:08 +02:00
Michael Albinus
39ccbacf9c Cleanup secrets-tests
* test/lisp/net/secrets-tests.el (secrets-test03-items)
(secrets-test04-search): Cleanup "session" collection initially.
2018-06-17 11:19:16 +02:00
Michael Albinus
19e642fdb0 Extend secrets.el by searching for object paths.
* lisp/net/secrets.el (secrets-search-item-paths): New function.
(secrets-search-items): Use it.
(secrets-create-item): Adapt docstring.

* test/lisp/net/secrets-tests.el (secrets-test04-search): Extend test.
2018-05-22 11:32:33 +02:00
Michael Albinus
01120ec3d2 Fix creation of Secret Service items in auth-source
* lisp/auth-source.el (auth-source-secrets-create): Use ´apply'.
(auth-source-secrets-saver): Handle `auth-source-save-behavior'
equal t.

* lisp/net/secrets.el (secrets-get-items): Do not call
`secrets-open-session' here ...
(top): ... but here.

* test/lisp/auth-source-tests.el
(auth-source-test-secrets-create-secret): Bind
`auth-source-save-behavior' to t.  Cleanup.

* test/lisp/net/secrets-tests.el (secrets-test00-availability):
After loading secets.el, a session is already opened.
(secrets-test02-collections, secrets-test03-items)
(secrets-test04-search): Open a new session.
2018-05-16 11:22:51 +02:00
Michael Albinus
b3956d85c7 Fix Bug#29575
* lisp/net/secrets.el (secrets-create-item): The new item does not
need a unique label.
(secrets-item-path, secrets-get-secret, secrets-get-attributes)
(secrets-get-attribute, secrets-delete-item): ITEM can also be an
object path.  (Bug#29575)

* test/lisp/net/secrets-tests.el (secrets-test03-items):
Test also creation of two items with same label.  Test
`secrets-get-secret', `secrets-get-attribute' and
`secrets-get-attributes' with object path.
(secrets-test04-search): Harden test.
2018-05-15 14:48:11 +02:00
Michael Albinus
0ecc10a777 Let Tramp save passwords
* lisp/auth-source.el (auth-source-secrets-saver): New defun.
(auth-source-secrets-create): Use it.

* lisp/net/secrets.el (secrets-struct-secret-content-type):
(secrets-create-item): Do not hard-code :xdg:schema.

* lisp/net/tramp.el (tramp-password-save-function): New defvar.
(tramp-read-passwd): Set it properly.
(tramp-process-actions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
Save password.

* lisp/net/tramp-cmds.el (tramp-bug): Don't report
`tramp-password-save-function'.

* test/lisp/net/secrets-tests.el (secrets-test03-items):
Extend test with another :xdg:schema.
2018-04-23 10:16:06 +02:00
Michael Albinus
358da4565b Make dbus.el fitter for Emacs configured --without-dbus
* lisp/net/dbus.el (dbus-error, dbus-debug): Define if not exist.

* test/lisp/net/secrets-tests.el: Revert 51c8369fa2 and 79a3ad9592.
2018-04-06 11:49:21 +02:00
Tino Calancha
79a3ad9592 Require secrets.el iif Emacs has dbusbind support
* test/lisp/net/secrets-tests.el: Require secrets.el if
and only if, Emacs has been compiled with dbusbind support.
2018-04-06 10:08:32 +09:00
Tino Calancha
51c8369fa2 Run secrets suite test when Emacs has dbus support
* test/lisp/net/secrets-tests.el (secrets-test00-availability)
(secrets-test01-sessions, secrets-test02-collections)
(secrets-test03-items, secrets-test04-search): Skip test
unless Emacs is compiled with dbus support.
2018-04-06 09:01:21 +09:00
Michael Albinus
b6aea79b00 Add tests for secrets.el
* lisp/net/secrets.el (secrets-lock-collection): New defun.
(secrets-search-items, secrets-create-item): Fix structure of :dict-entry.

* test/lisp/net/secrets-tests.el: New package.
2018-04-05 17:40:57 +02:00