Skip to content

tls-sni-02: bad SAN-B calculation #21

Description

@shred

In va.go, the tls-sni-02 challenge's SAN-B is calculated by accessing task.Challenge.KeyAuthorization. However, that value seems to be empty there, so the calculated SAN-B is bad and the challenge fails.

After I replaced it with this code:

	// Compute the digest for the SAN B that will appear in the certificate
	expectedKeyAuthorization := task.Challenge.ExpectedKeyAuthorization(task.Registration.Key)
	hb := sha256.Sum256([]byte(expectedKeyAuthorization))
	zb := hex.EncodeToString(hb[:])
	sanBName := fmt.Sprintf("%s.%s.%s.%s", zb[:32], zb[32:], tlsSNIKaID, tlsSNISuffix)

the challenge could be completed successfully. I'm not fluent with Go, so I don't know if this is an acceptable solution.

dns-01 also accesses the task.Challenge.KeyAuthorization field, so I guess it would fail as well, but I couldn't test it.

(Background: I am the author of the Java client acme4j. I am preparing the client to be compliant with the latest ACME draft, and I'd like to use pebble for integration tests.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions