LibreOffice Module svl (master) 1
|
#include <passwordcontainer.hxx>
Classes | |
class | RandomPool |
Public Member Functions | |
PasswordContainer (const css::uno::Reference< css::uno::XComponentContext > &) | |
virtual | ~PasswordContainer () override |
virtual void SAL_CALL | add (const OUString &aUrl, const OUString &aUserName, const css::uno::Sequence< OUString > &aPasswords, const css::uno::Reference< css::task::XInteractionHandler > &Handler) override |
virtual void SAL_CALL | addPersistent (const OUString &aUrl, const OUString &aUserName, const css::uno::Sequence< OUString > &aPasswords, const css::uno::Reference< css::task::XInteractionHandler > &Handler) override |
virtual css::task::UrlRecord SAL_CALL | find (const OUString &aUrl, const css::uno::Reference< css::task::XInteractionHandler > &Handler) override |
virtual css::task::UrlRecord SAL_CALL | findForName (const OUString &aUrl, const OUString &aUserName, const css::uno::Reference< css::task::XInteractionHandler > &Handler) override |
virtual void SAL_CALL | remove (const OUString &aUrl, const OUString &aUserName) override |
virtual void SAL_CALL | removePersistent (const OUString &aUrl, const OUString &aUserName) override |
virtual void SAL_CALL | removeAllPersistent () override |
virtual css::uno::Sequence< css::task::UrlRecord > SAL_CALL | getAllPersistent (const css::uno::Reference< css::task::XInteractionHandler > &Handler) override |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &ServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &Source) override |
virtual sal_Bool SAL_CALL | authorizateWithMasterPassword (const css::uno::Reference< css::task::XInteractionHandler > &xHandler) override |
virtual sal_Bool SAL_CALL | changeMasterPassword (const css::uno::Reference< css::task::XInteractionHandler > &xHandler) override |
virtual void SAL_CALL | removeMasterPassword () override |
virtual sal_Bool SAL_CALL | hasMasterPassword () override |
virtual sal_Bool SAL_CALL | allowPersistentStoring (sal_Bool bAllow) override |
virtual sal_Bool SAL_CALL | isPersistentStoringAllowed () override |
virtual sal_Bool SAL_CALL | useDefaultMasterPassword (const css::uno::Reference< css::task::XInteractionHandler > &xHandler) override |
virtual sal_Bool SAL_CALL | isDefaultMasterPasswordUsed () override |
virtual void SAL_CALL | addUrl (const OUString &Url, sal_Bool MakePersistent) override |
virtual OUString SAL_CALL | findUrl (const OUString &Url) override |
virtual void SAL_CALL | removeUrl (const OUString &Url) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getUrls (sal_Bool OnlyPersistent) override |
void | Notify () |
Private Member Functions | |
OUString | createIV () |
css::uno::Sequence< css::task::UserRecord > | CopyToUserRecordSequence (const ::std::vector< NamePasswordRecord > &original, const css::uno::Reference< css::task::XInteractionHandler > &Handler) |
css::task::UserRecord | CopyToUserRecord (const NamePasswordRecord &aRecord, bool &io_bTryToDecode, const css::uno::Reference< css::task::XInteractionHandler > &aHandler) |
css::uno::Sequence< css::task::UserRecord > | FindUsr (const ::std::vector< NamePasswordRecord > &userlist, std::u16string_view name, const css::uno::Reference< css::task::XInteractionHandler > &Handler) |
bool | createUrlRecord (const PasswordMap::iterator &rIter, bool bName, std::u16string_view aName, const css::uno::Reference< css::task::XInteractionHandler > &aHandler, css::task::UrlRecord &rRec) |
css::task::UrlRecord | find (const OUString &aURL, std::u16string_view aName, bool bName, const css::uno::Reference< css::task::XInteractionHandler > &aHandler) |
OUString const & | GetMasterPassword (const css::uno::Reference< css::task::XInteractionHandler > &Handler) |
void | UpdateVector (const OUString &url, ::std::vector< NamePasswordRecord > &toUpdate, NamePasswordRecord const &rec, bool writeFile) |
void | PrivateAdd (const OUString &aUrl, const OUString &aUserName, const css::uno::Sequence< OUString > &aPasswords, char aMode, const css::uno::Reference< css::task::XInteractionHandler > &Handler) |
static ::std::vector< OUString > | DecodePasswords (std::u16string_view aLine, std::u16string_view aIV, std::u16string_view aMasterPassword, css::task::PasswordRequestMode mode) |
void | removeAllPersistent (std::unique_lock< std::mutex > &rGuard) |
void | removeMasterPassword (std::unique_lock< std::mutex > &rGuard) |
Static Private Member Functions | |
static OUString | GetDefaultMasterPassword () |
static OUString | RequestPasswordFromUser (css::task::PasswordRequestMode aRMode, const css::uno::Reference< css::task::XInteractionHandler > &xHandler) |
static OUString | EncodePasswords (const std::vector< OUString > &lines, std::u16string_view aIV, std::u16string_view aMasterPassword) |
Private Attributes | |
PasswordMap | m_aContainer |
std::optional< StorageItem > | m_xStorageFile |
std::mutex | mMutex |
OUString | m_aMasterPassword |
css::uno::Reference< css::lang::XComponent > | mComponent |
SysCredentialsConfig | mUrlContainer |
RandomPool | mRandomPool |
Definition at line 235 of file passwordcontainer.hxx.
PasswordContainer::PasswordContainer | ( | const css::uno::Reference< css::uno::XComponentContext > & | ) |
Definition at line 376 of file passwordcontainer.cxx.
References m_aContainer, m_xStorageFile, mComponent, and mMutex.
|
overridevirtual |
Definition at line 390 of file passwordcontainer.cxx.
References m_xStorageFile, mComponent, and mMutex.
|
overridevirtual |
Definition at line 638 of file passwordcontainer.cxx.
References MEMORY_RECORD, mMutex, PrivateAdd(), and Url.
|
overridevirtual |
Definition at line 646 of file passwordcontainer.cxx.
References mMutex, PERSISTENT_RECORD, PrivateAdd(), and Url.
Referenced by changeMasterPassword(), and useDefaultMasterPassword().
|
overridevirtual |
Definition at line 1309 of file passwordcontainer.cxx.
References SysCredentialsConfig::add(), mUrlContainer, and Url.
Definition at line 1218 of file passwordcontainer.cxx.
References m_xStorageFile, mMutex, and removeMasterPassword().
|
overridevirtual |
Definition at line 1076 of file passwordcontainer.cxx.
References comphelper::getComponentContext(), GetMasterPassword(), m_aMasterPassword, m_xStorageFile, mComponent, mMutex, ReencodeAsOldHash(), RequestPasswordFromUser(), and xFactory.
Referenced by changeMasterPassword(), and useDefaultMasterPassword().
|
overridevirtual |
Definition at line 1135 of file passwordcontainer.cxx.
References addPersistent(), authorizateWithMasterPassword(), createIV(), EncodePasswords(), getAllPersistent(), comphelper::getComponentContext(), m_aMasterPassword, m_xStorageFile, mComponent, mMutex, removeMasterPassword(), RequestPasswordFromUser(), and xFactory.
|
private |
Definition at line 596 of file passwordcontainer.cxx.
References comphelper::containerToSequence(), DecodePasswords(), GetMasterPassword(), NamePasswordRecord::GetMemoryPasswords(), NamePasswordRecord::GetPersistentIV(), NamePasswordRecord::GetPersistentPasswords(), NamePasswordRecord::GetUserName(), NamePasswordRecord::HasPasswords(), MEMORY_RECORD, and PERSISTENT_RECORD.
Referenced by CopyToUserRecordSequence(), and FindUsr().
|
private |
css::uno::RuntimeException |
Definition at line 621 of file passwordcontainer.cxx.
References CopyToUserRecord().
Referenced by createUrlRecord().
|
private |
Definition at line 653 of file passwordcontainer.cxx.
References aBuffer, PasswordContainer::RandomPool::get(), i, and mRandomPool.
Referenced by changeMasterPassword(), GetMasterPassword(), and PrivateAdd().
|
private |
css::uno::RuntimeException |
Definition at line 734 of file passwordcontainer.cxx.
References aName, CopyToUserRecordSequence(), and FindUsr().
|
private |
css::uno::RuntimeException |
Definition at line 416 of file passwordcontainer.cxx.
References aSeq, code, getBufFromAsciiLine(), getInfoFromInd(), mode, result, and o3tl::toUInt32().
Referenced by CopyToUserRecord(), getAllPersistent(), and GetMasterPassword().
|
overridevirtual |
Definition at line 403 of file passwordcontainer.cxx.
References m_xStorageFile, mComponent, and mMutex.
|
staticprivate |
css::uno::RuntimeException |
Definition at line 476 of file passwordcontainer.cxx.
References aSeq, code, createIndex(), getAsciiLine(), OUStringToOString(), result, and o3tl::toUInt32().
Referenced by changeMasterPassword(), GetMasterPassword(), and PrivateAdd().
|
overridevirtual |
|
private |
css::uno::RuntimeException |
Referenced by findForName().
|
overridevirtual |
Definition at line 711 of file passwordcontainer.cxx.
|
overridevirtual |
Definition at line 1314 of file passwordcontainer.cxx.
References SysCredentialsConfig::find(), mUrlContainer, and Url.
|
private |
css::uno::RuntimeException |
Definition at line 717 of file passwordcontainer.cxx.
References aName, and CopyToUserRecord().
Referenced by createUrlRecord().
|
overridevirtual |
Definition at line 1048 of file passwordcontainer.cxx.
References comphelper::containerToSequence(), DecodePasswords(), GetMasterPassword(), m_aContainer, mMutex, and PERSISTENT_RECORD.
Referenced by changeMasterPassword(), and useDefaultMasterPassword().
|
staticprivate |
Definition at line 807 of file passwordcontainer.cxx.
Referenced by GetMasterPassword(), and useDefaultMasterPassword().
|
overridevirtual |
Definition at line 1371 of file passwordcontainer.cxx.
|
private |
css::uno::RuntimeException |
Definition at line 859 of file passwordcontainer.cxx.
References createIV(), DecodePasswords(), EncodePasswords(), GetDefaultMasterPassword(), m_aMasterPassword, m_xStorageFile, ReencodeAsOldHash(), and RequestPasswordFromUser().
Referenced by authorizateWithMasterPassword(), CopyToUserRecord(), getAllPersistent(), and PrivateAdd().
|
overridevirtual |
Definition at line 1381 of file passwordcontainer.cxx.
|
overridevirtual |
Definition at line 1324 of file passwordcontainer.cxx.
References SysCredentialsConfig::list(), and mUrlContainer.
|
overridevirtual |
Definition at line 1207 of file passwordcontainer.cxx.
References m_xStorageFile, and mMutex.
|
overridevirtual |
Definition at line 1297 of file passwordcontainer.cxx.
References m_xStorageFile, and mMutex.
|
overridevirtual |
Definition at line 1235 of file passwordcontainer.cxx.
References m_xStorageFile, and mMutex.
void PasswordContainer::Notify | ( | ) |
Definition at line 1330 of file passwordcontainer.cxx.
References m_aContainer, m_xStorageFile, MEMORY_RECORD, mMutex, PERSISTENT_RECORD, and UpdateVector().
Referenced by StorageItem::Notify().
|
private |
css::uno::RuntimeException |
Definition at line 666 of file passwordcontainer.cxx.
References createIV(), EncodePasswords(), GetMasterPassword(), m_aContainer, m_xStorageFile, MEMORY_RECORD, PERSISTENT_RECORD, NamePasswordRecord::SetMemoryPasswords(), NamePasswordRecord::SetPersistentPasswords(), UpdateVector(), and Url.
Referenced by add(), and addPersistent().
|
overridevirtual |
Definition at line 922 of file passwordcontainer.cxx.
References aName, aURL, m_aContainer, m_xStorageFile, mMutex, and PERSISTENT_RECORD.
|
overridevirtual |
Definition at line 1007 of file passwordcontainer.cxx.
References mMutex, and removeAllPersistent().
Referenced by removeAllPersistent(), and removeMasterPassword().
|
private |
Definition at line 1013 of file passwordcontainer.cxx.
References m_aContainer, m_xStorageFile, MEMORY_RECORD, and PERSISTENT_RECORD.
|
overridevirtual |
Definition at line 1189 of file passwordcontainer.cxx.
References mMutex, and removeMasterPassword().
Referenced by allowPersistentStoring(), changeMasterPassword(), removeMasterPassword(), and useDefaultMasterPassword().
|
private |
Definition at line 1195 of file passwordcontainer.cxx.
References m_aMasterPassword, m_xStorageFile, and removeAllPersistent().
|
overridevirtual |
Definition at line 962 of file passwordcontainer.cxx.
References aName, aURL, m_aContainer, m_xStorageFile, MEMORY_RECORD, mMutex, and PERSISTENT_RECORD.
|
overridevirtual |
Definition at line 1319 of file passwordcontainer.cxx.
References mUrlContainer, SysCredentialsConfig::remove(), and Url.
|
staticprivate |
Definition at line 816 of file passwordcontainer.cxx.
Referenced by authorizateWithMasterPassword(), changeMasterPassword(), and GetMasterPassword().
|
overridevirtual |
Definition at line 1376 of file passwordcontainer.cxx.
References ServiceName, and cppu::supportsService().
|
private |
css::uno::RuntimeException |
Definition at line 563 of file passwordcontainer.cxx.
References aURL, NamePasswordRecord::GetMemoryPasswords(), NamePasswordRecord::GetPersistentIV(), NamePasswordRecord::GetPersistentPasswords(), NamePasswordRecord::GetUserName(), NamePasswordRecord::HasPasswords(), m_xStorageFile, MEMORY_RECORD, and PERSISTENT_RECORD.
Referenced by Notify(), and PrivateAdd().
|
overridevirtual |
Definition at line 1245 of file passwordcontainer.cxx.
References addPersistent(), authorizateWithMasterPassword(), getAllPersistent(), comphelper::getComponentContext(), GetDefaultMasterPassword(), m_aMasterPassword, m_xStorageFile, mComponent, mMutex, removeMasterPassword(), and xFactory.
|
private |
Definition at line 241 of file passwordcontainer.hxx.
Referenced by getAllPersistent(), Notify(), PasswordContainer(), PrivateAdd(), remove(), removeAllPersistent(), and removePersistent().
|
private |
Definition at line 244 of file passwordcontainer.hxx.
Referenced by authorizateWithMasterPassword(), changeMasterPassword(), GetMasterPassword(), removeMasterPassword(), and useDefaultMasterPassword().
|
private |
Definition at line 242 of file passwordcontainer.hxx.
Referenced by allowPersistentStoring(), authorizateWithMasterPassword(), changeMasterPassword(), disposing(), GetMasterPassword(), hasMasterPassword(), isDefaultMasterPasswordUsed(), isPersistentStoringAllowed(), Notify(), PasswordContainer(), PrivateAdd(), remove(), removeAllPersistent(), removeMasterPassword(), removePersistent(), UpdateVector(), useDefaultMasterPassword(), and ~PasswordContainer().
|
private |
Definition at line 245 of file passwordcontainer.hxx.
Referenced by authorizateWithMasterPassword(), changeMasterPassword(), disposing(), PasswordContainer(), useDefaultMasterPassword(), and ~PasswordContainer().
|
private |
Definition at line 243 of file passwordcontainer.hxx.
Referenced by add(), addPersistent(), allowPersistentStoring(), authorizateWithMasterPassword(), changeMasterPassword(), disposing(), getAllPersistent(), hasMasterPassword(), isDefaultMasterPasswordUsed(), isPersistentStoringAllowed(), Notify(), PasswordContainer(), remove(), removeAllPersistent(), removeMasterPassword(), removePersistent(), useDefaultMasterPassword(), and ~PasswordContainer().
|
private |
Definition at line 267 of file passwordcontainer.hxx.
Referenced by createIV().
|
private |
Definition at line 246 of file passwordcontainer.hxx.
Referenced by addUrl(), findUrl(), getUrls(), and removeUrl().