4 Commits

Author SHA1 Message Date
Filippo Valsorda
fcebdc9845 nss: use certutil from $PATH if found on macOS (#71)
Fixes #70

Thanks to @hostep for testing and fixing the patch.
2018-08-25 15:52:43 -06:00
Herby Gillot
5f8e78d012 Nitpicky fix on Macports install info (#68) 2018-08-24 21:37:51 -06:00
Filippo Buletto
4f4405fc0c Add scoop install for Windows (#65) 2018-08-23 11:42:19 -06:00
Filippo Valsorda
f42b073e94 LICENSE+AUTHORS: follow appropriate company policies 2018-08-21 11:09:52 -06:00
7 changed files with 30 additions and 68 deletions

14
AUTHORS
View File

@@ -1,3 +1,11 @@
# This source code refers to The Go Authors for copyright purposes.
# The master list of authors is in the main Go distribution,
# visible at https://tip.golang.org/AUTHORS.
# This is the list of mkcert authors for copyright purposes.
#
# This does not necessarily list everyone who has contributed code, since in
# some cases, their employer may be the copyright holder. To see the full list
# of contributors, see the revision history in source control.
Google LLC
Adam Shannon
Chad Retz
Travis Campbell
Carl Henrik Lunde

View File

@@ -1,28 +0,0 @@
# How to Contribute
We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.
## Contributor License Agreement
Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution;
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.
## Code reviews
All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.
## Community Guidelines
This project follows [Google's Open Source Community
Guidelines](https://opensource.google.com/conduct/).

View File

@@ -1,3 +0,0 @@
# This source code was written by the Go contributors.
# The master list of contributors is in the main Go distribution,
# visible at https://tip.golang.org/CONTRIBUTORS.

View File

@@ -1,4 +1,4 @@
Copyright (c) 2018 The Go Authors. All rights reserved.
Copyright (c) 2018 The mkcert Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are

22
PATENTS
View File

@@ -1,22 +0,0 @@
Additional IP Rights Grant (Patents)
"This implementation" means the copyrightable works distributed by
Google as part of the Go project.
Google hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section)
patent license to make, have made, use, offer to sell, sell, import,
transfer and otherwise run, modify and propagate the contents of this
implementation of Go, where such license applies only to those patent
claims, both currently owned or controlled by Google and acquired in
the future, licensable by Google that are necessarily infringed by this
implementation of Go. This grant does not include claims that would be
infringed only as a consequence of further modification of this
implementation. If you or your agent or exclusive licensee institute or
order or agree to the institution of patent litigation against any
entity (including a cross-claim or counterclaim in a lawsuit) alleging
that this implementation of Go or any code incorporated within this
implementation of Go constitutes direct or contributory patent
infringement, or inducement of patent infringement, then any patent
rights granted to you under this License for this implementation of Go
shall terminate as of the date such litigation is filed.

View File

@@ -41,11 +41,12 @@ brew install mkcert
brew install nss # if you use Firefox
```
or MacPorts.
or [MacPorts](https://www.macports.org/).
```
sudo port sync
sudo port selfupdate
sudo port install mkcert
sudo port install nss # if you use Firefox
```
### Linux
@@ -89,6 +90,12 @@ On Windows, use Chocolatey
choco install mkcert
```
or use Scoop
```
scoop install mkcert
```
or build from source (requires Go 1.10+), or use [the pre-built binaries](https://github.com/FiloSottile/mkcert/releases).
## Supported root stores
@@ -131,7 +138,3 @@ Installing in the trust store does not require the CA key, so you can export the
* run `mkcert -install`
Remember that mkcert is meant for development purposes, not production, so it should not be used on end users' machines, and that you should *not* export or share `rootCA-key.pem`.
---
This is not an official Google project, just some code that happens to be owned by Google.

View File

@@ -28,13 +28,17 @@ func init() {
switch runtime.GOOS {
case "darwin":
out, err := exec.Command("brew", "--prefix", "nss").Output()
var err error
certutilPath, err = exec.LookPath("certutil")
if err != nil {
return
var out []byte
out, err = exec.Command("brew", "--prefix", "nss").Output()
if err != nil {
return
}
certutilPath = filepath.Join(strings.TrimSpace(string(out)), "bin", "certutil")
_, err = os.Stat(certutilPath)
}
certutilPath = filepath.Join(strings.TrimSpace(string(out)), "bin", "certutil")
_, err = os.Stat(certutilPath)
hasCertutil = err == nil
case "linux":