Index: utils/ofhttp/OFHTTP.m ================================================================== --- utils/ofhttp/OFHTTP.m +++ utils/ofhttp/OFHTTP.m @@ -50,10 +50,11 @@ #import "OFOpenItemFailedException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFResolveHostFailedException.h" #import "OFSetItemAttributesFailedException.h" +#import "OFTLSHandshakeFailedException.h" #import "OFUnsupportedProtocolException.h" #import "OFWriteFailedException.h" #import "ProgressBar.h" @@ -858,10 +859,26 @@ @" In order to download via HTTPS, you need to " @"either build ObjFW with TLS\n" @" support or preload a library adding TLS " @"support to ObjFW!", @"prog", [OFApplication programName])]; + } else if ([exception isKindOfClass: + [OFTLSHandshakeFailedException class]]) { + OFString *error = OFTLSStreamErrorCodeDescription( + ((OFTLSHandshakeFailedException *)exception) + .errorCode); + + if (!_quiet) + [OFStdOut writeString: @"\n"]; + + [OFStdErr writeLine: OF_LOCALIZED( + @"download_failed_tls_handshake_failed", + @"%[prog]: Failed to download <%[iri]>!\n" + @" TLS handshake failed: %[error]", + @"prog", [OFApplication programName], + @"iri", request.IRI.string, + @"error", error)]; } else if ([exception isKindOfClass: [OFReadOrWriteFailedException class]]) { OFString *error = OF_LOCALIZED( @"download_failed_read_or_write_failed_any", @"Read or write failed"); Index: utils/ofhttp/localization/de.json ================================================================== --- utils/ofhttp/localization/de.json +++ utils/ofhttp/localization/de.json @@ -58,10 +58,14 @@ "Unterstützung\n", " kompilieren oder eine Bibliothek mittels „preload” laden, welche ", "TLS-Support\n", " zu ObjFW hinzufügt!" ], + "download_failed_tls_handshake_failed": [ + "%[prog]: Fehler beim Download von <%[iri]>!\n", + " TLS-Handshake fehlgeschlagen: %[error]" + ], "download_failed_read_or_write_failed_any": "Lesen oder Schreiben", "download_failed_read_or_write_failed_read": "Lesen", "download_failed_read_or_write_failed_write": "Schreiben", "download_failed_read_or_write_failed": [ "%[prog]: Fehler beim Download von <%[iri]>!\n",