From 09ce68bb1fb86f11005a2d8846313a37bccb1e2b Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sun, 24 Feb 2019 08:06:33 -0500 Subject: partial docs --- docs/SSL-Configuration.md | 63 -------------------------------------- docs/obsolete-SSL-Configuration.md | 63 ++++++++++++++++++++++++++++++++++++++ docs/remote extension.txt | 30 ++++++++++++++++++ 3 files changed, 93 insertions(+), 63 deletions(-) delete mode 100644 docs/SSL-Configuration.md create mode 100644 docs/obsolete-SSL-Configuration.md create mode 100644 docs/remote extension.txt (limited to 'docs') diff --git a/docs/SSL-Configuration.md b/docs/SSL-Configuration.md deleted file mode 100644 index 90b95050..00000000 --- a/docs/SSL-Configuration.md +++ /dev/null @@ -1,63 +0,0 @@ -## SSL Configuration notes - -### Deprecated: Newer versions of zmNinja automatically handle unsigned certs. Please ignore the rest of this document - -If your Zoneminder instance has SSL configured and you need zmNinja to connect to ZM over SSL you need to: - -1) Make sure you generate the certificates correctly - -2) Import the certificate into iOS and Android - - -### Certificate generation - -#### Self-signed certificates - -If you are using self signed certificated, you should make sure the "common name" matches the hostname (or public IP) -of the server you are installing ZM in. If not, zmNinja's SSL handshake will fail. - -If you have used 'make-ssl-cert' or a similar tool that automatically generates the cert for you, its very likely -you have certificate that uses the 'unix hostname' of your server. That will not work. - -Assuming you are usin apache and have SSL enabled, here is how to regenerate the certs - -This will create a self-signed certificate/key pair and store it in /etc/apache2/ssl (you may have to create that directory, or store it elsewhere) - -``` -sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/zoneminder.key -out /etc/apache2/ssl/zoneminder.crt -``` - -Next up, edit your apache ssl config (example /etc/apache2/sites-available/default-ssl.conf) -And add/modify the following lines: - -``` -SSLCertificateFile /etc/apache2/ssl/zoneminder.crt -SSLCertificateKeyFile /etc/apache2/ssl/zoneminder.key -``` - -restart apache - -``` -sudo service apache2 restart -``` - -##### Install certificates (.cer) file in yout phone -Then, you need to install zoneminder.crt in your mobile devices so that zmNinja does not reject the certificate as it is self signed. -The easiest way to do that is simply email it to yourself and open your email in the phone and install the attachment. Works for both -iOS and Android. Make sure you install it and go through the prompts -###### Note: Just visiting your https site on mobile safari and "accepting the certificate" DOES NOT mean the certificate is installed in your phone. It simply sets up an exclusion on your browser that does not work for the UI webview inside your app - -For example, in iOS, when you double tap on the certificate, you get a screen like this - you need to tap on Install on the top right - -![](https://i.imgur.com/T2sBwWD.png "SSL Cert") - -On Android, you will get a dialog box prompting you to install the certificate - -Once you are done with these steps, zmNinja should be able to connect to ZM via SSL. Make sure you select SSL in the settings - -#### CA signed certificates -If you purchase a signed certificate, or set up your own root CA zmNinja should just work over SSL. - -You should not have to go through the process of installing certificates in your phone. - -I haven't tried it so far. diff --git a/docs/obsolete-SSL-Configuration.md b/docs/obsolete-SSL-Configuration.md new file mode 100644 index 00000000..90b95050 --- /dev/null +++ b/docs/obsolete-SSL-Configuration.md @@ -0,0 +1,63 @@ +## SSL Configuration notes + +### Deprecated: Newer versions of zmNinja automatically handle unsigned certs. Please ignore the rest of this document + +If your Zoneminder instance has SSL configured and you need zmNinja to connect to ZM over SSL you need to: + +1) Make sure you generate the certificates correctly + +2) Import the certificate into iOS and Android + + +### Certificate generation + +#### Self-signed certificates + +If you are using self signed certificated, you should make sure the "common name" matches the hostname (or public IP) +of the server you are installing ZM in. If not, zmNinja's SSL handshake will fail. + +If you have used 'make-ssl-cert' or a similar tool that automatically generates the cert for you, its very likely +you have certificate that uses the 'unix hostname' of your server. That will not work. + +Assuming you are usin apache and have SSL enabled, here is how to regenerate the certs + +This will create a self-signed certificate/key pair and store it in /etc/apache2/ssl (you may have to create that directory, or store it elsewhere) + +``` +sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/zoneminder.key -out /etc/apache2/ssl/zoneminder.crt +``` + +Next up, edit your apache ssl config (example /etc/apache2/sites-available/default-ssl.conf) +And add/modify the following lines: + +``` +SSLCertificateFile /etc/apache2/ssl/zoneminder.crt +SSLCertificateKeyFile /etc/apache2/ssl/zoneminder.key +``` + +restart apache + +``` +sudo service apache2 restart +``` + +##### Install certificates (.cer) file in yout phone +Then, you need to install zoneminder.crt in your mobile devices so that zmNinja does not reject the certificate as it is self signed. +The easiest way to do that is simply email it to yourself and open your email in the phone and install the attachment. Works for both +iOS and Android. Make sure you install it and go through the prompts +###### Note: Just visiting your https site on mobile safari and "accepting the certificate" DOES NOT mean the certificate is installed in your phone. It simply sets up an exclusion on your browser that does not work for the UI webview inside your app + +For example, in iOS, when you double tap on the certificate, you get a screen like this - you need to tap on Install on the top right + +![](https://i.imgur.com/T2sBwWD.png "SSL Cert") + +On Android, you will get a dialog box prompting you to install the certificate + +Once you are done with these steps, zmNinja should be able to connect to ZM via SSL. Make sure you select SSL in the settings + +#### CA signed certificates +If you purchase a signed certificate, or set up your own root CA zmNinja should just work over SSL. + +You should not have to go through the process of installing certificates in your phone. + +I haven't tried it so far. diff --git a/docs/remote extension.txt b/docs/remote extension.txt new file mode 100644 index 00000000..28cd51ef --- /dev/null +++ b/docs/remote extension.txt @@ -0,0 +1,30 @@ + +### Add Picture Notification Support (Optional) + + + 529 ionic cordova platform remove ios + 530 ionic cordova platform add ios + 531 open platforms/ios/ + +Open up platforms/ios/zmNinja.xcworkspace +File->New->Target->Notification Service Extension +In the "Product Name" put in zmNinjaNotification (your BundleID should now read com.pliablepixels.zmninja-pro.zmNinjaNotification) +Say "Yes" to "Activate zmNinjaNotification scheme?" popup +Now in XCode Targets, select zmNinjaNotification, and make sure you select a Team and make sure Deployment Target is 10 or above + + + 532 cp www/external/NotificationService.swift platforms/ios/zmNinjaNotication/ + 533 cp www/external/NotificationService.swift platforms/ios/zmNinjaNotification/ + 534 cd platforms/ios/ + 535 pod install + + +Search path "${PROJECT_DIR}" recursive in zmNinjaNotification and archive? + +For Distribution: + +always embed swift standard libraries to No in both? (every time after cordova prepare) +make versions same in both - only needed for product archive + + + -- cgit v1.2.3