{"id":29993,"date":"2017-05-04T03:01:59","date_gmt":"2017-05-03T17:01:59","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=29993"},"modified":"2017-05-03T19:47:43","modified_gmt":"2017-05-03T09:47:43","slug":"ssl-web-application-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/ssl-web-application-primer-tutorial\/","title":{"rendered":"SSL Web Application Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/karaoke_youtube_api.htm\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"SSL Web Application Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/karaoke_youtube_api.jpeg\" title=\"SSL Web Application Primer Tutorial\" \/><\/a><p class=\"wp-caption-text\">SSL Web Application Primer Tutorial<\/p><\/div>\n<p>What is your biggest friend for command line Linux text editing work, in our books <font size=1>&#8230; but not our pamphlettes<\/font>?  The text editor <a target=_blank href='https:\/\/www.computerhope.com\/unix\/uvi.htm' title='Computerhope vi information'><i>vi<\/i><\/a> and for our recent <a target=_blank title='SSL information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Transport_Layer_Security'>SSL<\/a> work &#8230;<\/p>\n<p><code><br \/>\n&lt;ESC&gt; key<br \/>\ng\/http:\/s\/\/\/g<br \/>\nwq!<br \/>\n<\/code><\/p>\n<p>This is the level of automation enough for us, but if you are the brave type there are also Linux command line ideas where you can call on <i>cat<\/i> and <i>sed<\/i> ideas that we exemplify in <a target=_blank title='Linux Global Substitutions Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/linux-global-substitutions-primer-tutorial\/'>Linux Global Substitutions Primer Tutorial<\/a>.<\/p>\n<p>These SSL code &#8220;conversion&#8221; thoughts should not be &#8220;glossed over&#8221; in a generic way.  Take the case of our <a target=_blank title='YouTube videos' href='https:\/\/www.youtube.com'>YouTube<\/a> video via its <a target=_blank title='Useful API' href='https:\/\/developers.google.com\/youtube\/iframe_api_reference'>Embedded Iframe API<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/karaoke_youtube_api.html-----------GETME\" title='karaoke_youtube_api.htm'>karaoke_youtube_api.htm<\/a> interfacing web application with this <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/karaoke_youtube_api.htm\" title='Click picture'>live run<\/a> link.  We needed it to change in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/karaoke_youtube_api.html-----------GETME\" title='karaoke_youtube_api.htm'>this way<\/a> for the <i>ht<\/i><i>tps:\/\/<\/i> protocol, and you&#8217;ll notice in these changes that, indeed, most of the change is the usual <i>ht<\/i><i>tp:\/\/<\/i> mapping to <i>\/\/<\/i> but what about the (jQuery Ajax related) <b>changes<\/b> &#8230;<\/p>\n<p><code><br \/>\n\/\/ code above defines (var) qsel<br \/>\n<b>var dprefix=\"ht\" + \"tp:\/\/www.youtube.com\/results?search_query=\";<\/b><br \/>\nvar dp=\"<b>ht\" + \"tp:<\/b>\/\/www.rjmprogramming.com.au\/HTMLCSS\/\";<br \/>\n<b>if (document.URL.indexOf('ht' + 'tps:') == 0) dp=dp.replace('tp:','tps:');<br \/>\nif (document.URL.indexOf('ht' + 'tps:') == 0) dprefix=dprefix.replace('tp:','tps:');<\/b><br \/>\n$.ajax({ url: dp + \"legend_via_map.php\",<br \/>\ndata: {\"url\":<b>dprefix<\/b> + qsel},<br \/>\ntype: 'get',<br \/>\nsuccess: function(output) {<br \/>\n  \/\/ more code<br \/>\n});<br \/>\n<\/code><\/p>\n<p> &#8230; where we need &#8220;other evidence&#8221;, in other words, the &#8220;scouring&#8221; of the protocol of the incoming URL (in Javascript DOM&#8217;s <i>document.URL<\/i>) to piece together the jQuery Ajax URLs involved.<\/p>\n<p>Again, we recommend a client side web inspector like Firefox&#8217;s Tools-&gt;Web Developer-&gt;Inspector Console tab for this nutting out of SSL issues, the majority of which will involve a &#8220;Mixed Content&#8221; scenario, in our experience.  We add one other &#8220;thought&#8221; tool to your armoury today, though.  If you are like us, you will have &#8220;child&#8221; HTML iframe elements involved, and there will be right click (Windows) or two finger gesture (Mac OS X) ways to open an iframe &#8220;child&#8221; window into a new web browser tab, and this can help declutter the Web Inspector goings on for we mere mortal &#8220;tired little brains&#8221; on occasions.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d29993' onclick='var dv=document.getElementById(\"d29993\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/ssl\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d29993' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>What is your biggest friend for command line Linux text editing work, in our books &#8230; but not our pamphlettes? The text editor vi and for our recent SSL work &#8230; &lt;ESC&gt; key g\/http:\/s\/\/\/g wq! This is the level of &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/ssl-web-application-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,29,37],"tags":[52,69,354,386,2192,576,652,663,707,997,1114,1115,1682,1319,1345,1368,1402],"class_list":["post-29993","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-absolute-url","tag-ajax","tag-dom","tag-encryption","tag-firefox-inspector","tag-html","tag-javascript","tag-jquery","tag-linux","tag-programming","tag-security","tag-sed","tag-ssl","tag-tutorial","tag-url","tag-vi","tag-web-application"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/29993"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=29993"}],"version-history":[{"count":7,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/29993\/revisions"}],"predecessor-version":[{"id":30002,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/29993\/revisions\/30002"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=29993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=29993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=29993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}