Skip to content

Commit

Permalink
solve build issue and warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Dec 13, 2023
1 parent 468f974 commit ac9fcc6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
5 changes: 2 additions & 3 deletions NEXTCLOUD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ set( APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR ${NEXTCLOUD_BACKGROUND_COLOR} CA
set( APPLICATION_WIZARD_HEADER_TITLE_COLOR "#ffffff" CACHE STRING "Hex color of the text in the wizard header")
option( APPLICATION_WIZARD_USE_CUSTOM_LOGO "Use the logo from ':/client/theme/colored/wizard_logo.(png|svg)' else the default application icon is used" ON )

set(ENCRYPTION_HARDWARE_TOKEN_DRIVER_PATH "{}")
set(ENCRYPTION_HARDWARE_TOKEN_DRIVER_PATH "")
set (CLIENTSIDEENCRYPTION_ENFORCE_USB_TOKEN false)

#
## Windows Shell Extensions & MSI - IMPORTANT: Generate new GUIDs for custom builds with "guidgen" or "uuidgen"
Expand All @@ -81,5 +82,3 @@ endif()
if (APPLE)
option( BUILD_FILE_PROVIDER_MODULE "Build the macOS virtual files File Provider module" OFF )
endif()

set (CLIENTSIDEENCRYPTION_ENFORCE_USB_TOKEN true)
2 changes: 1 addition & 1 deletion config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@

#cmakedefine CLIENTSIDEENCRYPTION_ENFORCE_USB_TOKEN @CLIENTSIDEENCRYPTION_ENFORCE_USB_TOKEN@

#cmakedefine ENCRYPTION_HARDWARE_TOKEN_DRIVER_PATH @ENCRYPTION_HARDWARE_TOKEN_DRIVER_PATH@
#cmakedefine ENCRYPTION_HARDWARE_TOKEN_DRIVER_PATH "@ENCRYPTION_HARDWARE_TOKEN_DRIVER_PATH@"

#endif
2 changes: 1 addition & 1 deletion src/gui/accountsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ void AccountSettings::migrateCertificateForAccount(const AccountPtr &account)
_ui->encryptionMessage->removeAction(action);
}

account->e2e()->migrateCertificate(this, account);
account->e2e()->migrateCertificate();
slotE2eEncryptionGenerateKeys();
}

Expand Down
8 changes: 8 additions & 0 deletions src/libsync/account.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1051,12 +1051,20 @@ bool Account::askUserForMnemonic() const

bool Account::enforceUseHardwareTokenEncryption() const
{
#if defined CLIENTSIDEENCRYPTION_ENFORCE_USB_TOKEN
return CLIENTSIDEENCRYPTION_ENFORCE_USB_TOKEN;
#else
return false;
#endif
}

QString Account::encryptionHardwareTokenDriverPath() const
{
#if defined ENCRYPTION_HARDWARE_TOKEN_DRIVER_PATH
return ENCRYPTION_HARDWARE_TOKEN_DRIVER_PATH;
#else
return {};
#endif
}

QByteArray Account::encryptionCertificateFingerprint() const
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/clientsideencryption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1743,7 +1743,7 @@ void ClientSideEncryption::forgetSensitiveData(const AccountPtr &account)
Q_EMIT userCertificateNeedsMigrationChanged();
}

void ClientSideEncryption::migrateCertificate(QWidget *settingsDialog, const AccountPtr &account)
void ClientSideEncryption::migrateCertificate()
{
_usbTokenInformation.clear();
}
Expand Down
3 changes: 1 addition & 2 deletions src/libsync/clientsideencryption.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,7 @@ public slots:
const OCC::AccountPtr &account);
void forgetSensitiveData(const OCC::AccountPtr &account);

void migrateCertificate(QWidget *settingsDialog,
const OCC::AccountPtr &account);
void migrateCertificate();

private slots:
void generateKeyPair(const OCC::AccountPtr &account);
Expand Down

0 comments on commit ac9fcc6

Please sign in to comment.