Skip to content

Commit

Permalink
bumped to v0.2.2
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Rana <[email protected]>
  • Loading branch information
vishr committed Nov 8, 2016
1 parent 84e7810 commit 3857de8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:edge
MAINTAINER Vishal Rana <[email protected]>

ENV VERSION 0.2.1
ENV VERSION 0.2.2

# https://letsencrypt.org
RUN apk add --no-cache ca-certificates
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 0.2.1
VERSION = 0.2.2

build:
GOOS=linux GOARCH=amd64 go build -o build/armor-$(VERSION)_linux-64 github.com/labstack/armor/cmd/armor
Expand Down
2 changes: 1 addition & 1 deletion armor.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ type (
)

const (
Version = "0.2.1"
Version = "0.2.2"
)
7 changes: 5 additions & 2 deletions http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,13 @@ func (h *HTTP) startTLS(a *armor.Armor, e *echo.Echo) error {
}

s.TLSConfig.GetCertificate = func(clientHello *tls.ClientHelloInfo) (*tls.Certificate, error) {
if a.TLS.Auto {
if cert, ok := s.TLSConfig.NameToCertificate[clientHello.ServerName]; ok {
// Use provided certificate
return cert, nil
} else if a.TLS.Auto {
return h.tlsManager.GetCertificate(clientHello)
}
return nil, nil // Certificate will be looked in `NameToCertificate`
return nil, nil // No certificate
}

return e.StartServer(s)
Expand Down
2 changes: 1 addition & 1 deletion website/content/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Type `armor` in your terminal
| _ || | | || ||_|| || || | | |
|__| |__||___| |_||_| |_||_______||___| |_|

https://armor.labstack.com v0.2.1
https://armor.labstack.com v0.2.2

Uncomplicated HTTP server, supports HTTP/2 and
auto TLS
Expand Down

0 comments on commit 3857de8

Please sign in to comment.