Meta tags:
description= Motivation
To have SSL support and be able to use HTTPS. The use cases of swifter library will be much broader.
Our company use swifter to run mock API server in iOS UI tests (htt????/github.com/treatwell/twuitests), but currently arbitrary loads have to be enabled in iOS app because iOS enforces using SSL connections.
What s in this PR
This PR introduces SSL support using TLS session on Darwin OS (if everything will turn out fine I ll try adding support for Linux OS as well).
Demo optional localhost (if appears at ~/.swifter/localhost.p12) certificate loading is added to SwifterSampleOSX target.
Closes #111 #395
How did I test it?
Using mkcert tool:
mkcert -install
mkcert -pkcs12 localhost 127.0.0.1 ::1
and then imported generated .p12 file to System keychain.;
Headings (most frequently used words):
navigation, uh, oh, ssl, support, 427, are, footer, you, diff, view, menu, repository, there, no, files, selected, for, viewing, sure, want, to, change, the, base, filter, by, extension,
Text of the page (most frequently used words):
swift (58), file (57), sources (36), let (35), expand (31), open (29), the (26), return (26), line (24), socket (24), ssl (21), tls (21), hidden (21), characters (21), unicode (21), try (19), string (19), read (19), that (18), func (18), show (18), tlssession (18), this (17), length (17), github (16), certificate (16), diff (16), number (16), session (16), and (16), status (15), throws (15), public (15), from (14), bidirectional (14), linux (14), all (13), down (13), private (13), xcode (13), viktorasl (13), else (12), swifter (12), for (12), var (12), class (12), applied (11), changes (11), endif (11), not (10), comments (10), change (10), data (10), text (10), more (10), about (10), httpserverio (10), isa (10), int (10), context (10), 2019 (10), you (9), while (9), server (9), may (9), review (9), learn (9), view (9), errno (9), case (9), pointee (9), int32 (9), written (9), socketerror (9), error (9), loading (9), p12 (8), than (8), what (8), datalength (8), ensurenoerr (8), tlssessionfailed (8), reload (8), aug (8), support (8), suggestion (7), cannot (7), suggestions (7), request (7), code (7), guard (7), original (7), contains (7), interpreted (7), compiled (7), differently (7), appears (7), below (7), editor (7), reveals (7), desktop (7), delete (7), edit (7), additions (7), files (7), pbxbuildfile (7), self (7), into (7), bytes (7), byte (7), pointer (7), socketfiledescriptor (7), sent (7), sign (7), security (6), import (6), deletions (6), fileref (6), osstatus (6), cfarray (6), load (6), commits (6), nil (5), sourcetree (5), path (5), 039ce04122f32ba600c9788f (5), pbxfilereference (5), errsslwouldblock (5), connection (5), unsafemutablepointer (5), buffer (5), close (5), items (5), offset (5), hashable (5), equatable (5), base (5), your (5), can (4), please (4), pull (4), add (4), start (4), sslcertificate (4), demoserver (4), default (4), localhost (4), xctest (4), project (4), pbxproj (4), uint8 (4), fdptr (4), could (4), password (4), 148 (4), with (4), msg (4), readme (4), there (4), copilot (4), perform (3), docs (3), community (3), navigation (3), must (3), create (3), batch (3), single (3), commit (3), true (3), loadp12certificate (3), certificatedata (3), available (3), foundation (3), swiftersampleosx (3), main (3), group (3), plist (3), section (3), xcodeproj (3), errsslclosedgraceful (3), bytestoread (3), noerr (3), sslread (3), bytestowrite (3), write (3), sslwrite (3), unsaferawpointer (3), received (3), unable (3), parameter (3), writebuffer (3), handshake (3), throw (3), secidentity (3), dictionary (3), https (3), secpkcs12import (3), used (3), apple (3), developer (3), documentation (3), enum (3), readlength (3), kbufferlength (3), shutdown (3), failed (3), cert (3), message (3), hide (3), whitespace (3), was (3), page (3), nbsp (3), filter (3), api (3), 427 (3), branch (3), refname (3), httpswift (3), account (3), quality (3), another (3), tab (3), window (3), refresh (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), build (3), information (2), contact (2), privacy (2), terms (2), footer (2), merge (2), outdated (2), existing (2), supported (2), only (2), one (2), viewing (2), toggle (2), print (2), certdata (2), certpath (2), appendingpathcomponent (2), isdirectory (2), false (2), homeurl (2), homepath (2), processinfo (2), using (2), demo (2), 039ce04322f32ba600c9788f (2), httprequest (2), 039ce04222f32ba600c9788f (2), 039ce04422f32ba600c9788f (2), swiftertvostests (2), explicitfiletype (2), wrapper (2), cfbundle (2), includeinindex (2), built_products_dir (2), info (2), lastknownfiletype (2), swiftermacostests (2), begin (2), swiftertestshttpparser (2), swiftertestshttprouter (2), framework (2), errsecio (2), eagain (2), assumingmemorybound (2), sslconnectionref (2), darwin (2), returns (2), readbyte (2), newcontext (2), new (2), init (2), certs (2), chainwithoutidentity (2), any (2), chain (2), swiftlint (2), force_cast (2), will (2), options (2), content (2), does (2), see (2), com (2), sslerror (2), glibc (2), baseaddress (2), continue (2), next (2), send (2), addr (2), port (2), starttlssession (2), parser (2), getmessage (2), websocket (2), are (2), selected (2), apply (2), split (2), unified (2), retry (2), jump (2), extension (2), select (2), tree (2), old (2), tags (2), branches (2), stable (2), issue (2), insights (2), projects (2), actions (2), 108 (2), repository (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), business (2), fixes (2), products (2), secret (2), action, time, share, personal, manage, cookies, 2026, inc, right, now, check, back, later, queued, multi, pending, reviews, has, been, marked, resolved, order, valid, applying, deleted, lines, per, subset, closed, invalid, because, were, made, annotations, notes, fallback, earlier, versions, 9080, forceipv4, loaded, changeit, osxapplicationextension, htmlbody, testafterbaseroute, currentworkingdirectory, filemanager, contents, atpath, absolutestring, url, environment, home, easiest, way, mkcert, tool, purposes, expected, location, 7c76b7121d2c45710030fc98, 7c76b71e1d2c45820030fc98, 7c76b7241d2c458a0030fc98, 7c76b2a01d369bec00d35bfb, 7c76b70e1d2c456b0030fc98, 7c76b7161d2c45760030fc98, 872, 879, 7c76b7111d2c45710030fc98, 7c76b71d1d2c45820030fc98, 7c76b7231d2c45890030fc98, 7c76b29f1d369bec00d35bfb, 7c76b70d1d2c456a0030fc98, 7c76b7151d2c45760030fc98, 845, 851, 2659fc1a1dadc077003f3930, 269b47951d3aaae20042d137, 269b47941d3aaae20042d137, 269b47931d3aaae20042d137, 269b47921d3aaae20042d137, 269b47901d3aaae20042d137, 818, 823, 6ae2ff702048011a00302ec4, mimetypes, 7c377e161d964b6a009c6148, 7c76b2a11d369c9d00d35bfb, 353, 357, 043660da21fed3a300497989, 043660c621fed34100497989, xml, 043660c221fed34100497989, sourcecode, end, pbxcopyfilesbuildphase, 164, 167, 043660ce21fed35500497989, 7ccd876d1c660b250068099b, 043660cd21fed35200497989, 7ccb8c5f1d97b8cc008b9712, 043660c721fed34100497989, frameworks, 7ae893fb1c0512c400a29f63, objects, errsslclosedabort, econnreset, enoent, switch, recv, unsafemutablerawpointer, least, size, off, points, sslhandshake, repeat, deallocate, sslclose, sslsetcertificate, sslsetconnection, sslsetiofuncs, sslcreatecontext, serverside, streamtype, allocate, capacity, sslcontext, map, dropfirst, enable, ksecimportitemidentity, disable, force, casted, fixed, bugs, org, browse, 7015, retrieve, given, ksecimportitemcertchain, seccertificate, first, cfdata, nsdictionary, ksecimportexportpassphrase, static, when, importing, contain, misleading, keychain, even, though, 1396915, imports, constructing, structure, copyright, 2014, 2016, damian, kołakowski, rights, reserved, httprouter, bytesread, compute, never, once, 174, 204, count, 131, 154, result, msg_nosignal, 110, 126, withunsafepointer, sockaddr_in, in_port_t, writefailed, listenfailed, bindfailed, socketsettingreuseaddrfailed, socketcreationfailed, struct, innerwritecontext, httpresponsebodywriter, keepconnection, break, 139, 157, operating, readhttprequest, httpparser, catch, defer, handleconnection, 116, 121, queue, dispatchqueue, label, clientsockets, use, listenaddressipv6, otherwise, listenaddressipv4, deletion, seccopyerrormessagestring, ios, tvos, provided, cstring, strerror, forums, thread, 113919, use_frameworks, ruby, cocoapods, yes, certificatepassword, httpserver, currently, how, echo, conversations, clear, filters, viewed, types, nov, form, custom, bfce850, oct, make, type, safe, 88c4578, document, method, d128cbf, brief, 5d64270, reading, writing, c5caed9, 756716d, setup, ff4257a, 2f394db, introduce, c3923e3, provide, initial, 8265d2c, hold, shift, click, range, changed, checks, conversation, wants, some, removed, timeline, become, sure, want, nothing, found, choose, already, clicking, agree, our, occasionally, related, emails, statement, service, free, its, maintainers, have, question, wiki, requests, issues, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, event, talks, workshops, partners, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, ons, trust, why, evaluate, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, small, medium, teams, enterprises, stage, businesses, source, latest, improvements, across, place, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, development, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, work, hosting, collaboration, platform, menu, skip,
|