forked from janvidar/uhub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converted README and some docs to markdown
Also renamed "ssl" to "tls" in the documentation.
- Loading branch information
1 parent
8a5f60f
commit 22dc405
Showing
8 changed files
with
141 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
AUTHORS | ||
README | ||
BUGS | ||
TODO | ||
doc/getstarted.txt | ||
README.md | ||
doc/getstarted.md | ||
doc/tls-documentation.md | ||
doc/users.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# How to compile: | ||
|
||
## Prerequisites | ||
|
||
Before you try to compile µHub, please make sure the following prerequisites are met. | ||
* GNU make | ||
* gcc > 3.0 or clang (or MinGW on Windows) | ||
* Perl 5 | ||
* openssl >= 1.1 (or use `make USE_SSL=NO`) | ||
* sqlite > 3.x | ||
|
||
For Ubuntu / Debian: | ||
``` | ||
sudo apt-get install cmake make gcc git libsqlite3-dev libssl-dev | ||
``` | ||
|
||
## Linux, Mac OSX, FreeBSD, NetBSD and OpenBSD | ||
``` | ||
cmake . | ||
make | ||
sudo make install | ||
``` | ||
|
||
If you have an old gcc compiler, try disabling pre-compiled headers like this: | ||
``` | ||
gmake USE_PCH=NO | ||
``` | ||
|
||
### Default install directories: | ||
|
||
| What | Where | | ||
| --- | --- | | ||
| Binaries | /usr/local/bin/ | | ||
| Configuration files | /etc/uhub/ | | ||
| Plugins | /usr/local/lib/uhub/ | | ||
| Manual pages | /usr/local/share/man/man1/ | |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
# Setting up an SSL hub | ||
# Setting up a TLS/SSL hub | ||
|
||
## About certificates | ||
|
||
Before you can setup an SSL protected hub, you must create an SSL certificate for the hub. | ||
NOTE: uhub must be compiled with SSL support enabled in order for this to work (enabled by default, but not for Windows). | ||
Before you can setup an TLS protected hub, you must create an TLS certificate for the hub. | ||
|
||
NOTE: uhub must be compiled with `SSL_SUPPORT` enabled in order for this to work | ||
(enabled by default, but not for Windows). | ||
|
||
## Configuring uhub | ||
|
||
If you have your certificates ready, just set these configuration values in uhub.conf file: | ||
|
||
``` | ||
tls_private_key="/path/to/domainname.key" | ||
tls_certificate="/path/to/domainname.crt" | ||
tls_enable=yes | ||
tls_require=yes | ||
``` | ||
|
||
Now you can connect to the hub using the adcs:// protocol handle. | ||
|
||
|
@@ -21,49 +24,72 @@ Now you can connect to the hub using the adcs:// protocol handle. | |
### Creating a self-signed certificate | ||
|
||
To create self-signed certificates with an 2048 bits RSA private key using the following command: | ||
|
||
$ openssl genrsa -out domainname.key 2048 | ||
``` | ||
openssl genrsa -out domainname.key 2048 | ||
``` | ||
|
||
Then create the certificate (valid for 365 days, using sha256): | ||
|
||
$ openssl req -new -x509 -nodes -sha256 -days 365 -key domainname.key > domainname.crt | ||
``` | ||
openssl req -new -x509 -nodes -sha256 -days 365 -key domainname.key > domainname.crt | ||
``` | ||
|
||
At this point point you will be prompted a few questions, see the section Certificate data below. | ||
|
||
## Creating a certificate with a CA | ||
|
||
Create an 2048 bits RSA private key using the following command: | ||
|
||
$ openssl genrsa -out domainname.key 2048 | ||
``` | ||
openssl genrsa -out domainname.key 2048 | ||
``` | ||
|
||
Then create a Certificate Signing Request (csr): | ||
|
||
$ openssl req -new -key domainname.key -out domainname.csr | ||
``` | ||
openssl req -new -key domainname.key -out domainname.csr | ||
``` | ||
|
||
See the "Certificate data" section below for answering the certificate questions. | ||
|
||
After this is done, you should send the domainname.csr to your CA for signing, and when the transaction is done you get the certificate from the CA. | ||
|
||
Save the certificate as dommainname.crt. | ||
|
||
## Certificate data | ||
|
||
When creating a certificate, you are asked a series of questions, follow this guide: | ||
``` | ||
Two letter country code. | ||
Example: DE. | ||
Two letter country code. Example: DE. | ||
State or Province Name. Example: Bavaria | ||
Locality Name. Example: Munich | ||
Organization Name. The name of your organization or company. Use your name if this certificate is not for any organization) | ||
Organizational Unit Name. The name of your department within your organization, like sysadmin, etc. (can be left blank) | ||
Common Name. The hostname of your server. Example: secure.extatic.org | ||
Your e-mail address | ||
State or Province Name. | ||
Example: Bavaria | ||
Locality Name. | ||
Example: Munich | ||
Organization Name. | ||
Use your name if this certificate is not for any organization. | ||
Organizational Unit Name. | ||
The name of your department within your organization, like sysadmin, etc. | ||
(can be left blank) | ||
Common Name. | ||
The hostname of your server. | ||
Example: secure.extatic.org | ||
Your e-mail address. | ||
Example: [email protected] | ||
``` | ||
|
||
## Giving fingerprint | ||
|
||
Now that you have ssl activated on your hub, you may have to share the certificate fingerprint to your hub user: | ||
Now that you have tls activated on your hub, you may have to share the certificate fingerprint to your hub user: | ||
|
||
Find it by using this commandline: | ||
|
||
$ openssl x509 -noout -fingerprint -sha256 < "/path/to/domainname.crt" | cut -d '=' -f 2 | tr -dc "[A-F][0-9]" | xxd -r -p | base32 | tr -d "=" | ||
``` | ||
openssl x509 -noout -fingerprint -sha256 < "/path/to/domainname.crt" \ | ||
| cut -d '=' -f 2 | tr -dc "[A-F][0-9]" | xxd -r -p | base32 | tr -d "=" | ||
``` | ||
|
||
And give your full uhub address: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters