Skip to content

Commit

Permalink
Fix proxy SSL
Browse files Browse the repository at this point in the history
  • Loading branch information
martenrebane committed Feb 15, 2024
1 parent 86cf367 commit 38f64af
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MoppApp/MoppApp/ManualProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ public class ManualProxy {

public static func getMoppLibProxyConfiguration() -> MoppLibProxyConfiguration {
let manualProxy = ManualProxy.getManualProxyConfiguration()
return MoppLibProxyConfiguration(configuration: manualProxy.host, port: NSNumber(value: manualProxy.port), username: manualProxy.username, password: manualProxy.password)
return MoppLibProxyConfiguration(configuration: manualProxy.host, port: NSNumber(value: manualProxy.port), username: manualProxy.username, password: manualProxy.password, issslenabled: manualProxy.isSSLEnabled)
}
}
2 changes: 2 additions & 0 deletions MoppApp/MoppApp/Signing/SivaCertViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ class SivaCertViewController: MoppViewController {
}

extension SivaCertViewController: SettingsCellDelegate {
func didStartEditingField(_ field: SigningCategoryViewController.FieldId, _ textField: UITextField) { return }

func didStartEditingField(_ field: SigningCategoryViewController.FieldId, _ indexPath: IndexPath) {
currentlyEditingCell = indexPath
}
Expand Down
4 changes: 4 additions & 0 deletions MoppLib/MoppLib/MoppLibDigidocManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@
virtual std::string proxyPass() const override {
return std::string([proxyConfiguration.PASSWORD UTF8String]);
}

virtual bool proxyTunnelSSL() const override {
return proxyConfiguration.ISSSLENABLED;
}

std::vector<digidoc::X509Cert> stringsToX509Certs(NSArray<NSString*> *certBundle) const {
__block std::vector<digidoc::X509Cert> x509Certs;
Expand Down
3 changes: 2 additions & 1 deletion MoppLib/MoppLib/PublicInterface/MoppLibProxyConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
@property (nonatomic, strong) NSNumber *PORT;
@property (nonatomic, strong) NSString *USERNAME;
@property (nonatomic, strong) NSString *PASSWORD;
@property (nonatomic, assign) BOOL *ISSSLENABLED;

- (id) initWithConfiguration:(NSString *)HOST PORT:(NSNumber *)PORT USERNAME:(NSString *)USERNAME PASSWORD:(NSString *)PASSWORD;
- (id) initWithConfiguration:(NSString *)HOST PORT:(NSNumber *)PORT USERNAME:(NSString *)USERNAME PASSWORD:(NSString *)PASSWORD ISSSLENABLED:(BOOL)ISSSLENABLED;

@end

0 comments on commit 38f64af

Please sign in to comment.