Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify tests for DC #62

Closed
armfazh opened this issue Mar 10, 2021 · 3 comments
Closed

Verify tests for DC #62

armfazh opened this issue Mar 10, 2021 · 3 comments
Assignees
Labels
pqxp PostQuantum Experimentation question

Comments

@armfazh
Copy link
Contributor

armfazh commented Mar 10, 2021

Tests for DCs fail when running isolated, but they pass when invoked as a batch (i.e. go test -v -run=.)

What did you do?

$ cd src/crypto/tls
$ ../../../bin/go test -v -run=DC

What did you expect to see?

=== RUN   TestDCHandshakeServerAuth
--- PASS: TestDCHandshakeServerAuth (0.14s)
=== RUN   TestDCHandshakeClientAuth
--- PASS: TestDCHandshakeClientAuth (0.14s)
=== RUN   TestDCHandshakeClientAndServerAuth
--- PASS: TestDCHandshakeClientAndServerAuth (0.03s)

What did you see instead?

    delegated_credentials_test.go:592: test #1 dcCounter:1, (tls13: DC server and client support) fails: x509: certificate signed by unknown authority
    delegated_credentials_test.go:598: test #1 (tls13: DC server and client support) usedDC = false; expected true
    delegated_credentials_test.go:592: test #1 dcCounter:2, (tls13: DC server and client support) fails: x509: certificate signed by unknown authority
    delegated_credentials_test.go:598: test #1 (tls13: DC server and client support) usedDC = false; expected true
    delegated_credentials_test.go:592: test #1 dcCounter:3, (tls13: DC server and client support) fails: x509: certificate signed by unknown authority
    delegated_credentials_test.go:598: test #1 (tls13: DC server and client support) usedDC = false; expected true

@armfazh armfazh added question pqxp PostQuantum Experimentation labels Mar 10, 2021
@claucece
Copy link
Contributor

claucece commented Mar 11, 2021

Yes, I see. I'm not really sure why is only flagged in this case of testing but I can take a look at this next week.

The problem is that we are providing a mock of a certificate (without the correct root and chain and all), as it is only for testing.

We can provide that whole chain, though it might be too much for testing. Or just set the c.config.InsecureSkipVerify to true, as it is often on testing, which will invalidate the check (as it fails on verifyServerCertificate).

claucece added a commit that referenced this issue Mar 15, 2021
@claucece
Copy link
Contributor

I added a PR @armfazh ;) Let me know your thoughts.

claucece added a commit that referenced this issue Mar 15, 2021
claucece added a commit that referenced this issue Mar 15, 2021
@claucece
Copy link
Contributor

Merged now.

cjpatton pushed a commit that referenced this issue Aug 20, 2021
crypto/tls: Implement draft-ietf-tls-subcerts-10

crypto/tls: fixes individual testing by adding insecure verify #62

crypto/tls: define api for delegated credentials so they are fetched using the same mechanisms used to fetch certificates #67 (#69)

Refactor new API

Address comments from review

Address comments from review 2

Address comments from review 3

crypto/tls: allow the usage of other keyUsage when checking for the dc extension #72 (#73)
cjpatton pushed a commit that referenced this issue Aug 23, 2021
crypto/tls: Implement draft-ietf-tls-subcerts-10

crypto/tls: fixes individual testing by adding insecure verify #62

crypto/tls: define api for delegated credentials so they are fetched using the same mechanisms used to fetch certificates #67 (#69)

Refactor new API

Address comments from review

Address comments from review 2

Address comments from review 3

crypto/tls: allow the usage of other keyUsage when checking for the dc extension #72 (#73)
cjpatton pushed a commit that referenced this issue Aug 23, 2021
crypto/tls: Implement draft-ietf-tls-subcerts-10

crypto/tls: fixes individual testing by adding insecure verify #62

crypto/tls: define api for delegated credentials so they are fetched using the same mechanisms used to fetch certificates #67 (#69)

Refactor new API

Address comments from review

Address comments from review 2

Address comments from review 3

crypto/tls: allow the usage of other keyUsage when checking for the dc extension #72 (#73)
cjpatton pushed a commit that referenced this issue Aug 23, 2021
crypto/tls: Implement draft-ietf-tls-subcerts-10

crypto/tls: fixes individual testing by adding insecure verify #62

crypto/tls: define api for delegated credentials so they are fetched using the same mechanisms used to fetch certificates #67 (#69)

Refactor new API

Address comments from review

Address comments from review 2

Address comments from review 3

crypto/tls: allow the usage of other keyUsage when checking for the dc extension #72 (#73)
cjpatton pushed a commit that referenced this issue Aug 23, 2021
crypto/tls: Implement draft-ietf-tls-subcerts-10

crypto/tls: fixes individual testing by adding insecure verify #62

crypto/tls: define api for delegated credentials so they are fetched using the same mechanisms used to fetch certificates #67 (#69)

Refactor new API

Address comments from review

Address comments from review 2

Address comments from review 3

crypto/tls: allow the usage of other keyUsage when checking for the dc extension #72 (#73)
cjpatton pushed a commit that referenced this issue Aug 23, 2021
crypto/tls: Implement draft-ietf-tls-subcerts-10

crypto/tls: fixes individual testing by adding insecure verify #62

crypto/tls: define api for delegated credentials so they are fetched using the same mechanisms used to fetch certificates #67 (#69)

Refactor new API

Address comments from review

Address comments from review 2

Address comments from review 3

crypto/tls: allow the usage of other keyUsage when checking for the dc extension #72 (#73)
cjpatton pushed a commit that referenced this issue Aug 23, 2021
crypto/tls: Implement draft-ietf-tls-subcerts-10

crypto/tls: fixes individual testing by adding insecure verify #62

crypto/tls: define api for delegated credentials so they are fetched using the same mechanisms used to fetch certificates #67 (#69)

Refactor new API

Address comments from review

Address comments from review 2

Address comments from review 3

crypto/tls: allow the usage of other keyUsage when checking for the dc extension #72 (#73)
cjpatton pushed a commit that referenced this issue Aug 23, 2021
crypto/tls: Implement draft-ietf-tls-subcerts-10

crypto/tls: fixes individual testing by adding insecure verify #62

crypto/tls: define api for delegated credentials so they are fetched using the same mechanisms used to fetch certificates #67 (#69)

Refactor new API

Address comments from review

Address comments from review 2

Address comments from review 3

crypto/tls: allow the usage of other keyUsage when checking for the dc extension #72 (#73)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pqxp PostQuantum Experimentation question
Projects
None yet
Development

No branches or pull requests

2 participants