bitwarden.el 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. ;;; bitwarden.el --- Bitwarden command wrapper -*- lexical-binding: t -*-
  2. ;; Copyright (C) 2018 Sean Farley
  3. ;; Author: Sean Farley
  4. ;; URL: https://github.com/seanfarley/emacs-bitwarden
  5. ;; Version: 0.1.0
  6. ;; Created: 2018-09-04
  7. ;; Package-Requires: ((emacs "24.4"))
  8. ;; Keywords: extensions processes bw bitwarden
  9. ;;; License
  10. ;; This program is free software: you can redistribute it and/or modify
  11. ;; it under the terms of the GNU General Public License as published by
  12. ;; the Free Software Foundation, either version 3 of the License, or
  13. ;; (at your option) any later version.
  14. ;; This program is distributed in the hope that it will be useful,
  15. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ;; GNU General Public License for more details.
  18. ;; You should have received a copy of the GNU General Public License
  19. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. ;;; Commentary:
  21. ;; This package wraps the bitwarden command-line program.
  22. ;;; Code:
  23. (require 'auth-source)
  24. (require 'json)
  25. (require 'seq)
  26. (require 'subr-x)
  27. (require 'tree-widget)
  28. ;=============================== custom variables ==============================
  29. (defgroup bitwarden nil
  30. "Bitwarden functions and settings."
  31. :group 'external
  32. :tag "bitwarden"
  33. :prefix "bitwarden-")
  34. (defcustom bitwarden-bw-executable (executable-find "bw")
  35. "The bw cli executable used by Bitwarden."
  36. :group 'bitwarden
  37. :type 'string)
  38. (defcustom bitwarden-data-file
  39. (expand-file-name "~/Library/Application Support/Bitwarden CLI/data.json")
  40. "The bw cli executable used by Bitwarden."
  41. :group 'bitwarden
  42. :type 'string)
  43. (defcustom bitwarden-user nil
  44. "Bitwarden user e-mail."
  45. :group 'bitwarden
  46. :type 'string)
  47. (defcustom bitwarden-automatic-unlock nil
  48. "Optional function to be called to attempt to unlock the vault.
  49. Set this to a lamdba that will evaluate to a password. For
  50. example, this can be the :secret plist from
  51. `auth-source-search'."
  52. :group 'bitwarden
  53. :type 'function)
  54. (defconst bitwarden--err-logged-in "you are not logged in")
  55. (defconst bitwarden--err-multiple "more than one result found")
  56. (defconst bitwarden--err-locked "vault is locked")
  57. ;===================================== util ====================================
  58. (defun bitwarden-logged-in-p ()
  59. "Check if `bitwarden-user' is logged in.
  60. Returns nil if not logged in."
  61. (let* ((json-object-type 'hash-table)
  62. (json-key-type 'string)
  63. (json (json-read-file bitwarden-data-file)))
  64. (gethash "__PROTECTED__key" json)))
  65. (defun bitwarden-unlocked-p ()
  66. "Check if we have already set the 'BW_SESSION' environment variable."
  67. (and (bitwarden-logged-in-p) (getenv "BW_SESSION")))
  68. (defun bitwarden--raw-runcmd (cmd &rest args)
  69. "Run bw command CMD with ARGS.
  70. Returns a list with the first element being the exit code and the
  71. second element being the output."
  72. (with-temp-buffer
  73. (list (apply 'call-process
  74. bitwarden-bw-executable
  75. nil (current-buffer) nil
  76. (cons cmd args))
  77. (replace-regexp-in-string "\n$" ""
  78. (buffer-string)))))
  79. (defun bitwarden-runcmd (cmd &rest args)
  80. "Run bw command CMD with ARGS.
  81. This is a wrapper for `bitwarden--raw-runcmd' that also checks
  82. for common errors."
  83. (if (bitwarden-logged-in-p)
  84. (if (bitwarden-unlocked-p)
  85. (let* ((ret (apply #'bitwarden--raw-runcmd cmd args))
  86. (exit-code (nth 0 ret))
  87. (output (nth 1 ret)))
  88. (if (eq exit-code 0)
  89. output
  90. (cond ((string-match "^More than one result was found." output)
  91. bitwarden--err-multiple)
  92. (t nil))))
  93. bitwarden--err-locked)
  94. bitwarden--err-logged-in))
  95. (defun bitwarden--login-proc-filter (proc string print-message)
  96. "Interacts with PROC by sending line-by-line STRING.
  97. If PRINT-MESSAGE is set then messages are printed to minibuffer."
  98. ;; read username if not defined
  99. (when (string-match "^? Email address:" string)
  100. (let ((user (read-string "Bitwarden email: ")))
  101. ;; if we are here then the user forgot to fill in this field so let's do
  102. ;; that now
  103. (setq bitwarden-user user)
  104. (process-send-string proc (concat bitwarden-user "\n"))))
  105. ;; read master password
  106. (when (string-match "^? Master password:" string)
  107. (process-send-string
  108. proc (concat (read-passwd "Bitwarden master password: ") "\n")))
  109. ;; check for bad password
  110. (when (string-match "^Username or password is incorrect" string)
  111. (bitwarden--message "incorrect master password" nil print-message))
  112. ;; if trying to unlock, check if logged in
  113. (when (string-match "^You are not logged in" string)
  114. (bitwarden--message "cannot unlock: not logged in" nil print-message))
  115. ;; read the 2fa code
  116. (when (string-match "^? Two-step login code:" string)
  117. (process-send-string
  118. proc (concat (read-passwd "Bitwarden two-step login code: ") "\n")))
  119. ;; check for bad code
  120. (when (string-match "^Login failed" string)
  121. (bitwarden--message "incorrect two-step code" nil print-message))
  122. ;; check for already logged in
  123. (when (string-match "^You are already logged in" string)
  124. (string-match "You are already logged in as \\(.*\\)\\." string)
  125. (bitwarden--message
  126. "already logged in as %s" (match-string 1 string) print-message))
  127. ;; success! now save the BW_SESSION into the environment so spawned processes
  128. ;; inherit it
  129. (when (string-match "^\\(You are logged in\\|Your vault is now unlocked\\)"
  130. string)
  131. ;; set the session env variable so spawned processes inherit
  132. (string-match "export BW_SESSION=\"\\(.*\\)\"" string)
  133. (setenv "BW_SESSION" (match-string 1 string))
  134. (bitwarden--message
  135. "successfully logged in as %s" bitwarden-user print-message)))
  136. (defun bitwarden--raw-unlock (cmd print-message)
  137. "Raw CMD to either unlock a vault or login.
  138. The only difference between unlock and login is just the name of
  139. the command and whether to pass the user.
  140. If PRINT-MESSAGE is set then messages are printed to minibuffer."
  141. (when (get-process "bitwarden")
  142. (delete-process "bitwarden"))
  143. (let ((process (start-process-shell-command
  144. "bitwarden"
  145. nil ; don't use a buffer
  146. (concat bitwarden-bw-executable " " cmd))))
  147. (set-process-filter process (lambda (proc string)
  148. (bitwarden--login-proc-filter
  149. proc string print-message)))
  150. ;; suppress output to the minibuffer when running this programatically
  151. nil))
  152. ;================================= interactive =================================
  153. (defun bitwarden-unlock (&optional print-message)
  154. "Unlock bitwarden vault.
  155. It is not sufficient to check the env variable for BW_SESSION
  156. since that could be set yet could be expired or incorrect.
  157. If run interactively PRINT-MESSAGE gets set and messages are
  158. printed to minibuffer."
  159. (interactive "p")
  160. (let ((pass (when bitwarden-automatic-unlock
  161. (concat " " (funcall bitwarden-automatic-unlock)))))
  162. (bitwarden--raw-unlock (concat "unlock " pass) print-message)))
  163. (defun bitwarden-login (&optional print-message)
  164. "Prompts user for password if not logged in.
  165. If run interactively PRINT-MESSAGE gets set and messages are
  166. printed to minibuffer."
  167. (interactive "p")
  168. (unless bitwarden-user
  169. (setq bitwarden-user (read-string "Bitwarden email: ")))
  170. (let ((pass (when bitwarden-automatic-unlock
  171. (concat " " (funcall bitwarden-automatic-unlock)))))
  172. (bitwarden--raw-unlock (concat "login " bitwarden-user pass) print-message)))
  173. (defun bitwarden-lock ()
  174. "Lock the bw vault. Does not ask for confirmation."
  175. (interactive)
  176. (when (bitwarden-unlocked-p)
  177. (setenv "BW_SESSION" nil)))
  178. ;;;###autoload
  179. (defun bitwarden-logout ()
  180. "Log out bw. Does not ask for confirmation."
  181. (interactive)
  182. (when (bitwarden-logged-in-p)
  183. (bitwarden-runcmd "logout")
  184. (bitwarden-lock)))
  185. (defun bitwarden--message (msg args &optional print-message)
  186. "Print MSG using `message' and `format' with ARGS if non-nil.
  187. PRINT-MESSAGE is an optional parameter to control whether this
  188. method should print at all. If nil then nothing will be printed
  189. at all.
  190. This method will prepend 'Bitwarden: ' before each MSG as a
  191. convenience. Also, return a value of nil so that no strings
  192. are mistaken as a password (e.g. accidentally interpreting
  193. 'Bitwarden: error' as the password when in fact, it was an error
  194. message but happens to be last on the method stack)."
  195. (when print-message
  196. (let ((msg (if args (format msg args) msg)))
  197. (message (concat "Bitwarden: " msg))))
  198. nil)
  199. (defun bitwarden--handle-message (msg &optional print-message)
  200. "Handle return MSG of `bitwarden--auto-cmd'.
  201. Since `bitwarden--auto-cmd' returns a list of (err-code message),
  202. this function exists to handle that. Printing the error message
  203. is entirely dependent on PRINT-MESSAGE (see below for more info
  204. on PRINT-MESSAGE).
  205. If the error code is 0, then print the password based on
  206. PRINT-MESSAGE or just return it.
  207. If the error code is non-zero, then print the message based on
  208. PRINT-MESSAGE and return nil.
  209. PRINT-MESSAGE is an optional parameter to control whether this
  210. method should print at all. If nil then nothing will be printed
  211. at all but password will be returned (e.g. when run
  212. non-interactively)."
  213. (let* ((err (nth 0 msg))
  214. (pass (nth 1 msg)))
  215. (cond
  216. ((eq err 0)
  217. (if print-message
  218. (message "%s" pass)
  219. pass))
  220. (t
  221. (bitwarden--message "%s" pass print-message)
  222. nil))))
  223. (defun bitwarden--auto-cmd (cmd &optional recursive-pass)
  224. "Run Bitwarden CMD and attempt to auto unlock.
  225. If RECURSIVE-PASS is set, then treat this call as a second
  226. attempt after trying to auto-unlock.
  227. Returns a tuple of the error code and the error message or
  228. password if successful."
  229. (let* ((res (or recursive-pass (apply 'bitwarden-runcmd cmd))))
  230. (cond
  231. ((string-match bitwarden--err-locked res)
  232. ;; try to unlock automatically, if possible
  233. (if (not bitwarden-automatic-unlock)
  234. (list 1 (format "error: %s" res))
  235. ;; only attempt a retry once; to prevent infinite recursion
  236. (when (not recursive-pass)
  237. ;; because I don't understand how emacs is asyncronous here nor
  238. ;; how to tell it to wait until the process is done, we do so here
  239. ;; manually
  240. (bitwarden-unlock)
  241. (while (get-process "bitwarden")
  242. (sleep-for 0.1))
  243. (bitwarden--auto-cmd cmd (apply 'bitwarden-runcmd cmd)))))
  244. ((or (string-match bitwarden--err-logged-in res)
  245. (string-match bitwarden--err-multiple res))
  246. (list 2 (format "error: %s" res)))
  247. (t (list 0 res)))))
  248. ;;;###autoload
  249. (defun bitwarden-getpass (account &optional print-message)
  250. "Get password associated with ACCOUNT.
  251. If run interactively PRINT-MESSAGE gets set and password is
  252. printed to minibuffer."
  253. (interactive "MBitwarden account name: \np")
  254. (bitwarden--handle-message
  255. (bitwarden--auto-cmd (list "get" "password" account))
  256. print-message))
  257. ;;;###autoload
  258. (defun bitwarden-search (&optional search-str)
  259. "Search for vault for items containing SEARCH-STR.
  260. Returns a vector of hashtables of the results."
  261. (let* ((args (and search-str (list "--search" search-str)))
  262. (ret (bitwarden--auto-cmd (append (list "list" "items") args)))
  263. (result (bitwarden--handle-message ret)))
  264. (when result
  265. (let* ((json-object-type 'hash-table)
  266. (json-key-type 'string)
  267. (json (json-read-from-string result)))
  268. json))))
  269. (defun bitwarden-search-filter-username (accounts &optional username)
  270. "Filter results of `bitwarden-search' ACCOUNTS by USERNAME.
  271. ACCOUNTS can be the results of `bitwarden-search' or a string to
  272. search which will call `bitwarden-search' as a convenience."
  273. (let* ((accounts (if (vectorp accounts)
  274. accounts (bitwarden-search accounts)))
  275. ;; filter out matches that are not logins
  276. (accounts (seq-filter (lambda (elt) (gethash "login" elt)) accounts)))
  277. (if (and (stringp username) (not (string= username "")))
  278. (seq-filter (lambda (elt)
  279. (when-let* ((login (gethash "login" elt)))
  280. (string= (gethash "username" login) username)))
  281. accounts)
  282. accounts)))
  283. ;;;###autoload
  284. (defun bitwarden-folders ()
  285. "List bitwarden folders."
  286. (let* ((ret (bitwarden--auto-cmd (list "list" "folders")))
  287. (result (bitwarden--handle-message ret)))
  288. (when result
  289. (let* ((json-object-type 'hash-table)
  290. (json-key-type 'string)
  291. (json (json-read-from-string result)))
  292. json))))
  293. (defun bitwarden-sync ()
  294. "Sync local store with server."
  295. (interactive)
  296. (let ((res (bitwarden--auto-cmd (list "sync"))))
  297. (message (nth 1 res))))
  298. ;================================= auth-source =================================
  299. (defun bitwarden-auth-source-search (&rest spec)
  300. "Search Bitwarden according to SPEC.
  301. See `auth-source-search' for a description of the plist SPEC."
  302. (let* ((host (plist-get spec :host))
  303. (max (plist-get spec :max))
  304. (user (plist-get spec :user))
  305. (res (mapcar #'bitwarden-auth-source--build-result
  306. (bitwarden-search-filter-username host user))))
  307. (seq-take res max)))
  308. (defun bitwarden-auth-source--build-result (elt)
  309. "Build a auth-source result for ELT.
  310. This is meant to be used by `mapcar' for the results from
  311. `bitwarden-search-filter-username'."
  312. (let* ((host (gethash "name" elt))
  313. (login (gethash "login" elt)) ;; always present since
  314. ;; `bitwarden-search-filter-username'
  315. ;; tests for it
  316. (user (gethash "username" login))
  317. (pass (gethash "password" login)))
  318. `(:host ,host
  319. :user ,user
  320. :secret (lambda () ,pass))))
  321. (defvar bitwarden-auth-source-backend
  322. (auth-source-backend :type 'bitwarden
  323. :source "." ;; not used
  324. :search-function #'bitwarden-auth-source-search)
  325. "Auth-source backend variable for Bitwarden.")
  326. (defun bitwarden-auth-source-backend-parse (entry)
  327. "Create auth-source backend from ENTRY."
  328. (when (eq entry 'bitwarden)
  329. (auth-source-backend-parse-parameters entry bitwarden-auth-source-backend)))
  330. ;; advice to add custom auth-source function
  331. (if (boundp 'auth-source-backend-parser-functions)
  332. (add-hook 'auth-source-backend-parser-functions
  333. #'bitwarden-auth-source-backend-parse)
  334. (advice-add 'auth-source-backend-parse
  335. :before-until #'bitwarden-auth-source-backend-parse))
  336. ;;;###autoload
  337. (defun bitwarden-auth-source-enable ()
  338. "Enable Bitwarden auth-source by adding it to `auth-sources'."
  339. (interactive)
  340. (add-to-list 'auth-sources 'bitwarden)
  341. (auth-source-forget-all-cached)
  342. (message "Btiwarden: auth-source enabled"))
  343. ;================================= widget utils ================================
  344. (defun bitwarden-list-next ()
  345. "Move to the next item."
  346. (interactive)
  347. (forward-line)
  348. (beginning-of-line)
  349. (widget-forward 1))
  350. (defun bitwarden-list-prev ()
  351. "Move to the previous item."
  352. (interactive)
  353. (widget-backward 2)
  354. (beginning-of-line)
  355. (widget-forward 1))
  356. ;; bitwarden-list-dialog-mode
  357. (defvar bitwarden-list-dialog-mode-map
  358. (let ((map (make-sparse-keymap)))
  359. (set-keymap-parent map widget-keymap)
  360. (define-key map "n" 'bitwarden-list-next)
  361. (define-key map "p" 'bitwarden-list-prev)
  362. (define-key map "q" 'bitwarden-list-cancel-dialog)
  363. map)
  364. "Keymap used in recentf dialogs.")
  365. (define-derived-mode bitwarden-list-dialog-mode nil "bitwarden-list-dialog"
  366. "Major mode of recentf dialogs.
  367. \\{bitwarden-list-dialog-mode-map}"
  368. :syntax-table nil
  369. :abbrev-table nil
  370. (setq truncate-lines t))
  371. (defsubst bitwarden-list-all-get-item-at-pos ()
  372. "Get hashtable from widget at current pos in dialog widget."
  373. (let ((widget (get-char-property (point) 'button)))
  374. (widget-value widget)))
  375. (defsubst bitwarden-list-all-make-spaces (spaces)
  376. "Create a string with SPACES number of whitespaces."
  377. (mapconcat 'identity (make-list spaces " ") ""))
  378. (defsubst bitwarden-pad-to-width (item width)
  379. "Create a string with ITEM padded to WIDTH."
  380. (if (= (length item) width)
  381. item
  382. (if (>= (length item) width)
  383. (concat (substring item 0 (- width 1)) "…")
  384. (concat item (bitwarden-list-all-make-spaces (- width (length item)))))))
  385. ;================================ widget actions ===============================
  386. ;; Dialog settings and actions
  387. (defun bitwarden-list-cancel-dialog (&rest _ignore)
  388. "Cancel the current dialog.
  389. IGNORE arguments."
  390. (interactive)
  391. (kill-buffer (current-buffer))
  392. (bitwarden--message "dialog canceled" nil t))
  393. (defun bitwarden-list-all-kill-ring-save (&optional widget-item)
  394. "Bitwarden `kill-ring-save', insert password to kill ring.
  395. If WIDGET-ITEM is not supplied then look for the widget at the
  396. current point."
  397. (interactive)
  398. (let* ((item (or widget-item
  399. (bitwarden-list-all-get-item-at-pos)))
  400. (type (gethash "type" item))
  401. (login (gethash "login" item)))
  402. (if (not (eq type 1))
  403. (bitwarden--message "error: not a login item" nil t)
  404. (kill-new (gethash "password" login))
  405. (message "Password added to kill ring"))))
  406. (defun bitwarden-list-all-item-action (widget &rest _ignore)
  407. "Do action to element associated with WIDGET's value.
  408. IGNORE other arguments."
  409. (bitwarden-list-all-kill-ring-save (widget-value widget))
  410. (kill-buffer (current-buffer)))
  411. ;=================================== widgets ===================================
  412. (defmacro bitwarden-list-dialog (name &rest forms)
  413. "Show a dialog buffer with NAME, setup with FORMS."
  414. (declare (indent 1) (debug t))
  415. `(with-current-buffer (get-buffer-create ,name)
  416. ;; Cleanup buffer
  417. (let ((inhibit-read-only t)
  418. (ol (overlay-lists)))
  419. (mapc 'delete-overlay (car ol))
  420. (mapc 'delete-overlay (cdr ol))
  421. (erase-buffer))
  422. (bitwarden-list-dialog-mode)
  423. ,@forms
  424. (widget-setup)
  425. (switch-to-buffer (current-buffer))))
  426. (defsubst bitwarden-list-all-make-element (item)
  427. "Create a new cons list from ITEM."
  428. (let* ((folder-id (gethash "folderId" item))
  429. (login-item (gethash "login" item)))
  430. (cons folder-id
  431. (list (cons (concat
  432. (bitwarden-pad-to-width (gethash "name" item) 40)
  433. (bitwarden-pad-to-width
  434. (if login-item (gethash "username" login-item) "")
  435. 32)
  436. (format-time-string
  437. "%Y-%m-%d %T"
  438. (date-to-time (bitwarden-pad-to-width
  439. (gethash "revisionDate" item) 24))))
  440. item)))))
  441. (defun bitwarden-list-all-tree (key val)
  442. "Return a `tree-widget' of folders.
  443. Creates a widget with text KEY and items VAL."
  444. ;; Represent a sub-menu with a tree widget
  445. `(tree-widget
  446. :open t
  447. :match ignore
  448. :node (item :tag ,key
  449. :sample-face bold
  450. :format "%{%t%}\n")
  451. ,@(mapcar 'bitwarden-list-all-item val)))
  452. (defun bitwarden-list-all-item (pass-element)
  453. "Return a widget to display PASS-ELEMENT in a dialog buffer."
  454. ;; Represent a single file with a link widget
  455. `(link :tag ,(car pass-element)
  456. :button-prefix ""
  457. :button-suffix ""
  458. :button-face default
  459. :format "%[%t\n%]"
  460. :help-echo ,(concat "Viewing item " (gethash "id" (cdr pass-element)))
  461. :action bitwarden-list-all-item-action
  462. ,(cdr pass-element)))
  463. (defun bitwarden-list-all-items (items)
  464. "Return a list of widgets to display ITEMS in a dialog buffer."
  465. (let* ((folders (mapcar (lambda (e)
  466. (cons
  467. (gethash "id" e)
  468. (gethash "name" e)))
  469. (bitwarden-folders)))
  470. (hash (make-hash-table :test 'equal)))
  471. ;; create hash table where the keys are the folders and each value is a list
  472. ;; of the password items
  473. (dolist (x (mapcar 'bitwarden-list-all-make-element items))
  474. (let* ((folder-id (car x))
  475. (key (cdr (assoc folder-id folders)))
  476. (val (cdr x))
  477. (klist (gethash key hash)))
  478. (puthash key (append klist val) hash)))
  479. (mapcar (lambda (key)
  480. (bitwarden-list-all-tree key (gethash key hash)))
  481. (sort (hash-table-keys hash) #'string<))))
  482. ;;;###autoload
  483. (defun bitwarden-list-all ()
  484. "Show a dialog, listing all entries associated with `bitwarden-user'.
  485. If optional argument GROUP is given, only entries in GROUP will be listed."
  486. (interactive)
  487. (bitwarden-list-dialog "*bitwarden-list*"
  488. ;; Use a L&F that looks like the recentf menu.
  489. (tree-widget-set-theme "folder")
  490. (apply 'widget-create
  491. `(group
  492. :indent 0
  493. :format "%v\n"
  494. ,@(bitwarden-list-all-items
  495. (bitwarden-search))))
  496. (widget-create
  497. 'push-button
  498. :notify 'bitwarden-list-cancel-dialog
  499. "Cancel")
  500. (goto-char (point-min))))
  501. (provide 'bitwarden)
  502. ;;; bitwarden.el ends here