-
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.
Signed-off-by: El Mostafa Idrassi <[email protected]>
- Loading branch information
0 parents
commit 52ce699
Showing
8 changed files
with
530 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 El Mostafa Idrassi | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,35 @@ | ||
## goMutualAuthServer | ||
|
||
goMutualAuthServer implements a localhost TLS server in Golang, which can be used to perform Mutual Authentication (A.K.A Client-Side Authentication). | ||
|
||
This allows for testing Client-Side Authentication, using certificates in various formats : | ||
|
||
- PKCS#11 certificates | ||
- KSP / CSP certificates | ||
- CryptoTokenKit certificates | ||
|
||
## Installation | ||
|
||
The goMutualAuthServer executable is installable using : `go install github.com/ElMostafaIdrassi/goMutualAuthServer@latest`. | ||
|
||
Official releases can also be downloaded from the [Releases](https://github.com/ElMostafaIdrassi/goMutualAuthServer/releases) section. | ||
|
||
## Usage | ||
|
||
``` | ||
goMutualAuthServer (-cert /path/to/server/cert) (-key /path/to/server/key) (-port serverPort) (-tlsVersion version) | ||
-cert /path/to/server/cert | ||
Path to server's certificate in PEM format | ||
-key /path/to/server/key | ||
Path to server's private key in PEM format | ||
-port serverPort | ||
Server port (default is 443) | ||
-tlsVersion version | ||
TLS version of the server (default is "1.2", possible values "1.0", "1.1", "1.2", "1.3") | ||
``` | ||
|
||
If neither of `-cert` and `-key` are set, the TLS server will default to using a default [key](https://raw.githubusercontent.com/ElMostafaIdrassi/goMutualAuthServer/master/tls_server_key.pem) and [certificate](https://raw.githubusercontent.com/ElMostafaIdrassi/goMutualAuthServer/master/tls_server_cert.pem). | ||
|
||
Both `-cert` and `-key` must be set to override this behaviour. | ||
|
||
Finally, make sure you trust the CA certificate that issued the TLS server certificate to avoid in-browser warnings. If using the default TLS server certificate, its CA can be found [here](https://raw.githubusercontent.com/ElMostafaIdrassi/goMutualAuthServer/master/tls_server_ca.crt). |
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,5 @@ | ||
module github.com/ElMostafaIdrassi/goMutualAuthServer | ||
|
||
go 1.17 | ||
|
||
require github.com/grantae/certinfo v0.0.0-20170412194111-59d56a35515b |
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,2 @@ | ||
github.com/grantae/certinfo v0.0.0-20170412194111-59d56a35515b h1:NGgE5ELokSf2tZ/bydyDUKrvd/jP8lrAoPNeBuMOTOk= | ||
github.com/grantae/certinfo v0.0.0-20170412194111-59d56a35515b/go.mod h1:zT/uzhdQGTqlwTq7Lpbj3JoJQWfPfIJ1tE0OidAmih8= |
Oops, something went wrong.