Optional ClientCertificate (mTLS) prevents connection
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 13
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Set "SSLVerifyClient optional" in Apache
- Try to sync files
Expected behaviour
Nextcloud should sync files
Actual behaviour
Nextcloud seems to be unable to connect
No log entries on server side
Logs
2026-09-11 19:52:41 [DEBUG] User: JohnDoe https://www.example.com/nextcloud
2026-09-11 19:52:41 [DEBUG] Network response result: 2026-09-11 17:52:41 failure(Alamofire.AFError.sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-999 "Abgebrochen" UserInfo={NSErrorFailingURLStringKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.jpg, NSErrorFailingURLKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.jpg, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <F1688EF9-509F-4D3A-B3F3-A30A12DF8CBF>.<675>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <F1688EF9-509F-4D3A-B3F3-A30A12DF8CBF>.<675>, NSLocalizedDescription=Abgebrochen}))
2026-09-11 19:52:41 [DEBUG] Network response all headers: 2026-09-11 17:52:41 [:]
2026-09-11 19:52:41 [DEBUG] User: JohnDoe https://www.example.com/nextcloud
2026-09-11 19:52:41 [DEBUG] Request started: PROPFIND https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.mov
2026-09-11 19:52:41 [DEBUG] Headers: ["Depth": "0", "X-NC-Account": "JohnDoe https://www.example.com/nextcloud", "X-NC-CheckInterceptor": "true", "OCS-APIRequest": "true", "Authorization": "Basic Tm8sIHRoaXMgaXMgbm90IHRoZSBhY3R1YWwgZGF0YSAtIGl0IGlzIGp1c3QgYSBwbGFjZWhvbGRlcg==", "User-Agent": "Mozilla/5.0 (iOS) Nextcloud-iOS/34.1.4", "Content-Type": "application/xml", "Accept": "application/xml"]
2026-09-11 19:52:41 [DEBUG] Body: <?xml version="1.0" encoding="UTF-8"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
<d:prop>
<d:getetag />
<fileid xmlns="http://owncloud.org/ns"/>
<id xmlns="http://owncloud.org/ns"/>
</d:prop>
</d:propfind>
2026-09-11 19:52:41 [DEBUG] User: JohnDoe https://www.example.com/nextcloud
2026-09-11 19:52:41 [DEBUG] Network response result: 2026-09-11 17:52:41 failure(Alamofire.AFError.sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-999 "Abgebrochen" UserInfo={NSErrorFailingURLStringKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.mov, NSErrorFailingURLKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.mov, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <A17C2C78-D3E8-4940-B5EB-E6586292C8C8>.<676>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <A17C2C78-D3E8-4940-B5EB-E6586292C8C8>.<676>, NSLocalizedDescription=Abgebrochen}))
2026-09-11 19:52:41 [DEBUG] Network response all headers: 2026-09-11 17:52:41 [:]
2026-09-11 19:52:44 [DEBUG] User: JohnDoe https://www.example.com/nextcloud
2026-09-11 19:52:44 [DEBUG] Network response result: 2026-09-11 17:52:44 failure(Alamofire.AFError.sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-999 "Abgebrochen" UserInfo={NSErrorFailingURLStringKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.jpg, NSErrorFailingURLKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.jpg, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <1FC32D0A-D918-4F5F-B987-80BCD52C855E>.<677>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <1FC32D0A-D918-4F5F-B987-80BCD52C855E>.<677>, NSLocalizedDescription=Abgebrochen}))
2026-09-11 19:52:44 [DEBUG] Network response all headers: 2026-09-11 17:52:44 [:]
2026-09-11 19:52:44 [DEBUG] User: JohnDoe https://www.example.com/nextcloud
2026-09-11 19:52:44 [DEBUG] Request started: PROPFIND https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.mov
2026-09-11 19:52:44 [DEBUG] Headers: ["Accept": "application/xml", "OCS-APIRequest": "true", "Content-Type": "application/xml", "User-Agent": "Mozilla/5.0 (iOS) Nextcloud-iOS/34.1.4", "X-NC-Account": "JohnDoe https://www.example.com/nextcloud", "X-NC-CheckInterceptor": "true", "Depth": "0", "Authorization": "Basic Tm8sIHRoaXMgaXMgbm90IHRoZSBhY3R1YWwgZGF0YSAtIGl0IGlzIGp1c3QgYSBwbGFjZWhvbGRlcg=="]
2026-09-11 19:52:44 [DEBUG] Body: <?xml version="1.0" encoding="UTF-8"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
<d:prop>
<d:getetag />
<fileid xmlns="http://owncloud.org/ns"/>
<id xmlns="http://owncloud.org/ns"/>
</d:prop>
</d:propfind>
2026-09-11 19:52:44 [DEBUG] User: JohnDoe https://www.example.com/nextcloud
2026-09-11 19:52:44 [DEBUG] Network response result: 2026-09-11 17:52:44 failure(Alamofire.AFError.sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-999 "Abgebrochen" UserInfo={NSErrorFailingURLStringKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.mov, NSErrorFailingURLKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.mov, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <9D7E1186-9823-4DE1-B8C7-2DA0F8AD1C68>.<678>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <9D7E1186-9823-4DE1-B8C7-2DA0F8AD1C68>.<678>, NSLocalizedDescription=Abgebrochen}))
2026-09-11 19:52:44 [DEBUG] Network response all headers: 2026-09-11 17:52:44 [:]
2026-09-11 19:52:44 [DEBUG] User: JohnDoe https://www.example.com/nextcloud
2026-09-11 19:52:44 [DEBUG] Request started: PROPFIND https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe
2026-09-11 19:52:44 [DEBUG] Headers: ["Authorization": "Basic Tm8sIHRoaXMgaXMgbm90IHRoZSBhY3R1YWwgZGF0YSAtIGl0IGlzIGp1c3QgYSBwbGFjZWhvbGRlcg==", "OCS-APIRequest": "true", "X-NC-CheckInterceptor": "true", "Depth": "0", "Content-Type": "application/xml", "Accept": "application/xml", "X-NC-Account": "JohnDoe https://www.example.com/nextcloud", "User-Agent": "Mozilla/5.0 (iOS) Nextcloud-iOS/34.1.4"]
2026-09-11 19:52:44 [DEBUG] Body: <?xml version="1.0" encoding="UTF-8"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
<d:prop><d:displayname /><nc:share-download-limits /><d:getlastmodified /><d:getetag /><d:getcontenttype /><d:resourcetype /><d:quota-available-bytes /><d:quota-used-bytes /><d:getcontentlength /><permissions xmlns="http://owncloud.org/ns"/><id xmlns="http://owncloud.org/ns"/><fileid xmlns="http://owncloud.org/ns"/><size xmlns="http://owncloud.org/ns"/><favorite xmlns="http://owncloud.org/ns"/><share-types xmlns="http://owncloud.org/ns"/><owner-id xmlns="http://owncloud.org/ns"/><owner-display-name xmlns="http://owncloud.org/ns"/><comments-unread xmlns="http://owncloud.org/ns"/><checksums xmlns="http://owncloud.org/ns"/><downloadURL xmlns="http://owncloud.org/ns"/><data-fingerprint xmlns="http://owncloud.org/ns"/><creation_time xmlns="http://nextcloud.org/ns"/><upload_time xmlns="http://nextcloud.org/ns"/><is-encrypted xmlns="http://nextcloud.org/ns"/><has-preview xmlns="http://nextcloud.org/ns"/><mount-type xmlns="http://nextcloud.org/ns"/><rich-workspace xmlns="http://nextcloud.org/ns"/><note xmlns="http://nextcloud.org/ns"/><lock xmlns="http://nextcloud.org/ns"/><lock-owner xmlns="http://nextcloud.org/ns"/><lock-owner-editor xmlns="http://nextcloud.org/ns"/><lock-owner-displayname xmlns="http://nextcloud.org/ns"/><lock-owner-type xmlns="http://nextcloud.org/ns"/><lock-time xmlns="http://nextcloud.org/ns"/><lock-timeout xmlns="http://nextcloud.org/ns"/><system-tags xmlns="http://nextcloud.org/ns"/><file-metadata-size xmlns="http://nextcloud.org/ns"/><file-metadata-gps xmlns="http://nextcloud.org/ns"/><metadata-photos-exif xmlns="http://nextcloud.org/ns"/><metadata-photos-gps xmlns="http://nextcloud.org/ns"/><metadata-photos-original_date_time xmlns="http://nextcloud.org/ns"/><metadata-photos-place xmlns="http://nextcloud.org/ns"/><metadata-photos-size xmlns="http://nextcloud.org/ns"/><metadata-files-live-photo xmlns="http://nextcloud.org/ns"/><hidden xmlns="http://nextcloud.org/ns"/><share-permissions xmlns="http://open-collaboration-services.org/ns"/><share-permissions xmlns="http://open-cloud-mesh.org/ns"/> </d:prop>
</d:propfind>
2026-09-11 19:52:44 [SYNC METADATA] Start Sync Metadata for https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe
2026-09-11 19:52:44 [DEBUG] User: JohnDoe https://www.example.com/nextcloud
2026-09-11 19:52:44 [DEBUG] Network response result: 2026-09-11 17:52:44 failure(Alamofire.AFError.sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-999 "Abgebrochen" UserInfo={NSErrorFailingURLStringKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe, NSErrorFailingURLKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <5A82EE8D-F900-492C-A44A-963627262292>.<679>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <5A82EE8D-F900-492C-A44A-963627262292>.<679>, NSLocalizedDescription=Abgebrochen}))
2026-09-11 19:52:44 [DEBUG] Network response all headers: 2026-09-11 17:52:44 [:]
2026-09-11 19:52:44 [DEBUG] User: JohnDoe https://www.example.com/nextcloud
2026-09-11 19:52:44 [DEBUG] Request started: PROPFIND https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe
2026-09-11 19:52:44 [DEBUG] Headers: ["User-Agent": "Mozilla/5.0 (iOS) Nextcloud-iOS/34.1.4", "Authorization": "Basic Tm8sIHRoaXMgaXMgbm90IHRoZSBhY3R1YWwgZGF0YSAtIGl0IGlzIGp1c3QgYSBwbGFjZWhvbGRlcg==", "X-NC-Account": "JohnDoe https://www.example.com/nextcloud", "Depth": "0", "Accept": "application/xml", "OCS-APIRequest": "true", "X-NC-CheckInterceptor": "true", "Content-Type": "application/xml"]
2026-09-11 19:52:44 [DEBUG] Body: <?xml version="1.0" encoding="UTF-8"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
<d:prop><d:displayname /><nc:share-download-limits /><d:getlastmodified /><d:getetag /><d:getcontenttype /><d:resourcetype /><d:quota-available-bytes /><d:quota-used-bytes /><d:getcontentlength /><permissions xmlns="http://owncloud.org/ns"/><id xmlns="http://owncloud.org/ns"/><fileid xmlns="http://owncloud.org/ns"/><size xmlns="http://owncloud.org/ns"/><favorite xmlns="http://owncloud.org/ns"/><share-types xmlns="http://owncloud.org/ns"/><owner-id xmlns="http://owncloud.org/ns"/><owner-display-name xmlns="http://owncloud.org/ns"/><comments-unread xmlns="http://owncloud.org/ns"/><checksums xmlns="http://owncloud.org/ns"/><downloadURL xmlns="http://owncloud.org/ns"/><data-fingerprint xmlns="http://owncloud.org/ns"/><creation_time xmlns="http://nextcloud.org/ns"/><upload_time xmlns="http://nextcloud.org/ns"/><is-encrypted xmlns="http://nextcloud.org/ns"/><has-preview xmlns="http://nextcloud.org/ns"/><mount-type xmlns="http://nextcloud.org/ns"/><rich-workspace xmlns="http://nextcloud.org/ns"/><note xmlns="http://nextcloud.org/ns"/><lock xmlns="http://nextcloud.org/ns"/><lock-owner xmlns="http://nextcloud.org/ns"/><lock-owner-editor xmlns="http://nextcloud.org/ns"/><lock-owner-displayname xmlns="http://nextcloud.org/ns"/><lock-owner-type xmlns="http://nextcloud.org/ns"/><lock-time xmlns="http://nextcloud.org/ns"/><lock-timeout xmlns="http://nextcloud.org/ns"/><system-tags xmlns="http://nextcloud.org/ns"/><file-metadata-size xmlns="http://nextcloud.org/ns"/><file-metadata-gps xmlns="http://nextcloud.org/ns"/><metadata-photos-exif xmlns="http://nextcloud.org/ns"/><metadata-photos-gps xmlns="http://nextcloud.org/ns"/><metadata-photos-original_date_time xmlns="http://nextcloud.org/ns"/><metadata-photos-place xmlns="http://nextcloud.org/ns"/><metadata-photos-size xmlns="http://nextcloud.org/ns"/><metadata-files-live-photo xmlns="http://nextcloud.org/ns"/><hidden xmlns="http://nextcloud.org/ns"/><share-permissions xmlns="http://open-collaboration-services.org/ns"/><share-permissions xmlns="http://open-cloud-mesh.org/ns"/> </d:prop>
</d:propfind>
2026-09-11 19:52:44 [DEBUG] User: JohnDoe https://www.example.com/nextcloud
2026-09-11 19:52:44 [SYNC METADATA] Exit: result error Abgebrochen or e2ee directory false. Skipping this one.
2026-09-11 19:52:44 [DEBUG] Network response result: 2026-09-11 17:52:44 failure(Alamofire.AFError.sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-999 "Abgebrochen" UserInfo={NSErrorFailingURLStringKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe, NSErrorFailingURLKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <00029402-156C-4868-872C-7925578D3D6A>.<680>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <00029402-156C-4868-872C-7925578D3D6A>.<680>, NSLocalizedDescription=Abgebrochen}))
2026-09-11 19:52:44 [DEBUG] Network response all headers: 2026-09-11 17:52:44 [:]
2026-09-11 19:52:46 [DEBUG] User: JohnDoe https://www.example.com/nextcloud
2026-09-11 19:52:46 [DEBUG] Network response result: 2026-09-11 17:52:46 failure(Alamofire.AFError.sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-999 "Abgebrochen" UserInfo={NSErrorFailingURLStringKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.jpg, NSErrorFailingURLKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.jpg, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <66EEC5F8-19B7-4812-984E-EA752F1E5A8F>.<681>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <66EEC5F8-19B7-4812-984E-EA752F1E5A8F>.<681>, NSLocalizedDescription=Abgebrochen}))
2026-09-11 19:52:46 [DEBUG] Network response all headers: 2026-09-11 17:52:46 [:]
2026-09-11 19:52:46 [DEBUG] User: JohnDoe https://www.example.com/nextcloud
2026-09-11 19:52:46 [DEBUG] Network response result: 2026-09-11 17:52:46 failure(Alamofire.AFError.sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-999 "Abgebrochen" UserInfo={NSErrorFailingURLStringKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.mov, NSErrorFailingURLKey=https://www.example.com/nextcloud/remote.php/dav/files/JohnDoe/Camera/26-09-11%2019-25-58%200913.mov, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <57921883-AD74-4B5D-B7F2-E603EBC2A148>.<682>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <57921883-AD74-4B5D-B7F2-E603EBC2A148>.<682>, NSLocalizedDescription=Abgebrochen}))
2026-09-11 19:52:46 [DEBUG] Network response all headers: 2026-09-11 17:52:46 [:]
Reasoning or why should it be changed/implemented?
Optional mTLS should not prevent connection
Environment data
iOS version: e.g. iOS 26.6.2
Nextcloud iOS app version: 34.1.4.1
Server operating system: Debian
Web server: Apache 2.4.68-1~deb13u1
Nextcloud version: 34.0.4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report names no source file or test. Start by reproducing the failure against Apache with SSLVerifyClient optional, then inspect the iOS client's Alamofire and NSURLSession request handling shown in the logs. Done means file synchronization succeeds when the server permits connections without a client certificate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- apache, ios, swift
- Domain
- mobile, networking, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100