Commit Graph

2 Commits

Author SHA1 Message Date
Tom Thorogood b6ecf29d98 Improve performance by addressing some low hanging fruit. (#444)
* Remove unused bytes.Buffer from dns/idn.encode.

This buffer is truncated and written to but never read from. It
serves no purpose and all tests pass with it removed.

It appears to have been introduced when puncycode.go was first
added in miekg/dns@e3c2c07.

* Produce less pointless garbage.

This change:
- removes several needless []byte -> string conversions,
- removes two needless append calls in HashName, and
- writes the hash to the same nsec3 []byte in HashName rather
  than creating a new []byte on each of the k iterations.

These are all minor performance improvements that will likely
go entirely unnoticed. The changes will reduce the ammount of
garbage produced when calling CertificateToDANE, HashName,
(*SIG).Sign and TsigGenerate.
2017-02-02 07:33:49 +00:00
Miek Gieben 46df8c9462 Fix for miekg/dns issue #289: support the SMIMEA record (#410)
1) Refactoring of tlsa.go
   - moved routine to create the certificate rdata to its own go module
     as this is shared between TLSA and SMIMEA records
2) Added support for creating an SMIMEA domain name
3) Developed in accordance with draft-ietf-dane-smime-12 RFC

Miek,

Submitting for your review. Happy to make any recommended changes or
address omissions.

Lightly tested against our internal DNS service which hosts DANE
SMIMEA records for our email certificates.

Parse tests are added.
2016-10-17 18:09:52 +01:00