From 605b1310fb6e1c1fa1382df76a1d52954fc82ba7 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 4 Dec 2015 17:40:32 +0100 Subject: Update Signer --- messages.go | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'messages.go') diff --git a/messages.go b/messages.go index cb10a79..b5a1738 100644 --- a/messages.go +++ b/messages.go @@ -1,5 +1,10 @@ package acme +import ( + "net" + "time" +) + const ( // LEV1 Let's Encrytpt V1 LEV1 = `https://acme-v01.api.letsencrypt.org/directory` @@ -27,11 +32,11 @@ type Registration struct { // RegistrationResp ... type RegistrationResp struct { - ID int `json:"id"` - Key Key `json:"key"` - Contact []string `json:"contact"` - InitialIP string `json:"initalIp"` // not in draft - CreatedAt string `json:"createdAt"` // 2006-01-02T15:04:05.999999999Z + ID int `json:"id"` + Key Key `json:"key"` + Contact []string `json:"contact"` + InitialIP net.IP `json:"initialIp"` // not in draft + CreatedAt time.Time `json:"createdAt"` // 2006-01-02T15:04:05.999999999Z } // Key contains public part of jose.JsonWebKey @@ -50,7 +55,7 @@ type Authorization struct { // AuthorizationResp Objects type AuthorizationResp struct { Identifier Identifier `json:"identifier"` - Status string `json:"status,omitemtpy"` // e.g. valid + Status Status `json:"status,omitemtpy"` // e.g. valid Expires string `json:"expires,omitempty"` // 2006-01-02 Challenges []Challenge `json:"challenges"` Combinations [][]int `json:"combinations,omitemtpy"` @@ -65,7 +70,7 @@ type Identifier struct { // Challege ... type Challege struct { Type string `json:"type"` // http-01 - Status string `json:"status"` // e.g. valid + Status Status `json:"status"` // e.g. valid Validated string `json:"validated"` // 2006-01-02T15:04Z KeyAuthorization string `json:"keyAuthorization"` } -- cgit v1.2.3