Skip to content

Commit

Permalink
Merge pull request #132 from AdguardTeam/fix/update_hash_obtain_command
Browse files Browse the repository at this point in the history
Update command for obtaining TBSCertificate hash
  • Loading branch information
grumaxxx authored Sep 25, 2023
2 parents cd41961 + 0122ec2 commit b41e7dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/miscellaneous/create-dns-stamp.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Types of Secure DNS include `DNS-over-HTTPS (DoH)`, `DNS-over-QUIC (DoQ)`, and `
To fill in the **Hashes of the server's certificate** field, you can use the following command, replacing `<IP_ADDRESS>`, `<PORT>`, and `<SERVER_NAME>` with the corresponding values for your DNS server:

```bash
echo | openssl s_client -connect <IP_ADDRESS>:<PORT> -servername <SERVER_NAME> 2>/dev/null | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256
echo | openssl s_client -connect <IP_ADDRESS>:<PORT> -servername <SERVER_NAME> 2>/dev/null | openssl x509 -outform der | openssl asn1parse -inform der -strparse 4 -noout -out - | openssl dgst -sha256
```

:::caution
Expand Down Expand Up @@ -88,10 +88,10 @@ Let's go through an example of creating a stamp for AdGuard DNS using DoT:
Execute the command

```bash
echo | openssl s_client -connect 94.140.14.14:853 -servername dns.adguard-dns.com 2>/dev/null | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256
echo | openssl s_client -connect 94.140.14.14:853 -servername dns.adguard-dns.com 2>/dev/null | openssl x509 -outform der | openssl asn1parse -inform der -strparse 4 -noout -out - | openssl dgst -sha256
```

The result is `a54670fda8ed13bded0a9515f35d0a2bed937e100aa6282703cb3b87282055ec`
The result is `1ebea9685d57a3063c427ac4f0983f34e73c129b06e7e7705640cacd40c371c8`
Paste this SHA256 hash of the server's certificate into the field.
4. Leave the Properties section blank.
Expand Down

0 comments on commit b41e7dc

Please sign in to comment.