Explorar el Código

print kid for debugging

beltram hace 3 años
padre
commit
8fd0192da3
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7 2
      acme/challenge.go

+ 7 - 2
acme/challenge.go

@@ -19,6 +19,7 @@ import (
 	"errors"
 	"errors"
 	"fmt"
 	"fmt"
 	"io"
 	"io"
+	"log"
 	"net"
 	"net"
 	"net/url"
 	"net/url"
 	"os"
 	"os"
@@ -463,11 +464,15 @@ func wireDPOP01Validate(ctx context.Context, ch *Challenge, db DB, jwk *jose.JSO
 		return NewErrorISE("missing provisioner")
 		return NewErrorISE("missing provisioner")
 	}
 	}
 
 
-	kid, thumbprintErr := jwk.Thumbprint(crypto.SHA256)
+	rawKid, thumbprintErr := jwk.Thumbprint(crypto.SHA256)
 	if thumbprintErr != nil {
 	if thumbprintErr != nil {
 		return storeError(ctx, db, ch, false, WrapError(ErrorServerInternalType, thumbprintErr, "failed to compute JWK thumbprint"))
 		return storeError(ctx, db, ch, false, WrapError(ErrorServerInternalType, thumbprintErr, "failed to compute JWK thumbprint"))
 	}
 	}
 
 
+	kid := string(rawKid)
+
+	log.Printf("kid: %s", kid)
+
 	dpopOptions := provisioner.GetOptions().GetDPOPOptions()
 	dpopOptions := provisioner.GetOptions().GetDPOPOptions()
 	key := dpopOptions.GetSigningKey()
 	key := dpopOptions.GetSigningKey()
 
 
@@ -529,7 +534,7 @@ func wireDPOP01Validate(ctx context.Context, ch *Challenge, db DB, jwk *jose.JSO
 		"--hash-algorithm",
 		"--hash-algorithm",
 		`SHA-256`,
 		`SHA-256`,
 		"--kid",
 		"--kid",
-		string(kid),
+		kid,
 		"--key",
 		"--key",
 		file.Name(),
 		file.Name(),
 	)
 	)