Commit Graph

49 Commits

Author SHA1 Message Date
Miek Gieben 68d2f49caa another nil test 2011-08-08 10:30:28 +02:00
Miek Gieben 91fdd69c80 no panic in the lib 2011-08-08 10:29:30 +02:00
Miek Gieben 4671072027 Error handling
Handle semantic errors in the input stream.
Try to use Ragel's error handling when seeing a non-supported
class. This does not work yet.
2011-07-24 17:08:33 +02:00
Miek Gieben da0603089a gofmt -w 2011-07-23 23:43:43 +02:00
Miek Gieben a1a0034733 More Go like
Make a Parser type and define methods on that.
* Zone()    parse and return entire zone
* RR()      parse and return 1 RR
* PrivateKey parse a private key file
2011-07-22 23:51:30 +02:00
Miek Gieben 2a8d7f9694 Make the API more Go like 2011-07-22 23:28:04 +02:00
Miek Gieben ab6e700ce1 comments 2011-07-22 19:35:11 +02:00
Miek Gieben 7c716e66c0 Parsing zone files - does not work (yet) 2011-07-18 20:47:03 +02:00
Miek Gieben 0742f1e75f parsing tweaks 2011-07-18 18:53:33 +02:00
Miek Gieben 91b41d02bb SetString for DNSKEY and RRSIG 2011-07-18 15:49:20 +02:00
Miek Gieben fd0064c805 Parsings works - clean up the tests
RR_DNSKEY has now a
* Read (to read an RR)
* ReadPrivateKey (to read an private key file)

Together you have enough data to sign and verify DNSSEC data.
I'm thinking about a better API, but I think one will emerge
whenever I complete the zone parsin.
2011-07-17 20:51:27 +02:00
Miek Gieben 8c595abe56 More parsing stuff 2011-07-17 15:47:03 +02:00
Miek Gieben b2c50a39f6 parse private key files
Reading a key should go as this:
k := new(key)
k.ReadPublic(File)
k.ReadPrivate(File)

For RSA enough public material is stored in the priv. key that we do it
in one swoop. This should really be two steps.
2011-07-17 12:03:04 +02:00
Miek Gieben 3f9b67632a RSA priv key reading works again 2011-07-08 18:21:29 +02:00
Miek Gieben 4c26df63ba Drop the Alg and Hash prefixes 2011-07-08 17:27:44 +02:00
Miek Gieben b84e27535c More ECC updates - we should be able to sign 2011-07-08 14:51:40 +02:00
Miek Gieben e73c759491 More curve updates 2011-07-08 11:08:31 +02:00
Miek Gieben 328931d079 implement (part of) ecdsa256/384 2011-07-08 10:41:07 +02:00
Miek Gieben 6f0f2cc4fd Fix the removal of encoding/line 2011-07-04 19:54:56 +02:00
Elazar 904e322dfd Ran gofix, and manually bring code up to latest go release.
1) Ran gofix on all files.
2) Added "tcp" and "udp" to Resolve* functions in server.go
3) Generated primes to the primes array and not to two predefined
   struct members (P and Q), since now rsa support multi-factor primes.
2011-06-02 13:31:12 +03:00
Miek Gieben 8aa88a0bd3 normalize errors 2011-03-25 11:19:35 +01:00
Miek Gieben d8d4d000bc Fix test and robustness 2011-03-24 09:02:19 +01:00
Miek Gieben 369d06f1c7 Use line.Readline() 2011-03-23 18:53:16 +01:00
Miek Gieben 3af023bda9 Use bufio.Reader in private key reading 2011-03-23 16:10:15 +01:00
Miek Gieben 98f1f80088 update TODO 2011-03-15 20:52:12 +01:00
Miek Gieben 6a31a5d51c comment updates 2011-01-27 20:54:30 +01:00
Miek Gieben d9dfd913a7 documentation updates 2011-01-27 09:29:11 +01:00
Miek Gieben 7e1f9490f2 Cert RR added
PubKey is named PublicKey in the RR_DNSKEY
2011-01-25 13:57:54 +01:00
Miek Gieben 9eea4682fd Fix documentation 2011-01-17 21:10:48 +01:00
Miek Gieben 96a55dee9b Less verbose tests 2011-01-17 20:29:40 +01:00
Miek Gieben 48cbf55a23 completely fix private key reading 2011-01-17 20:18:51 +01:00
Miek Gieben 1f6a221bd8 Private key completely works. Can read BIND9 files 2011-01-17 19:52:28 +01:00
Miek Gieben ea08cb2d7b Fix all exponent issues in rsa keys 2011-01-17 18:13:52 +01:00
Miek Gieben 74796c8672 Add SRV and NAPTR record support 2011-01-17 10:30:20 +01:00
Miek Gieben 79f61af370 Fix private Key reading (only for RSA atm) 2011-01-16 19:03:19 +01:00
Miek Gieben 2cfa45408d trying to set the pubkey from the private key 2011-01-16 18:37:29 +01:00
Miek Gieben 96457a435a Parsing .private files work - needs some cleaning up 2011-01-16 17:59:04 +01:00
Miek Gieben 317b23ceaf Parsing private key almost there 2011-01-16 17:43:41 +01:00
Miek Gieben 8ed6c8a8f4 more parsing: from private key file - not finished 2011-01-16 16:22:31 +01:00
Miek Gieben f274433c46 Put string.go inside DNS package 2011-01-15 12:24:09 +01:00
Miek Gieben f06fbca2e2 Add private (rsa) key to string method 2011-01-15 12:18:18 +01:00
Miek Gieben 117ab83ba4 Remove println 2011-01-15 10:38:35 +01:00
Miek Gieben 54f158c23d Helper functions for base64 encoding/decoding 2011-01-15 10:38:14 +01:00
Miek Gieben 3e11fafac5 Fix the keygen alg: fill the correct bytes 2011-01-14 19:15:25 +01:00
Miek Gieben ab4a5b5477 Love interfaces
Using interfaces to make key.Generate and Sign much more generic
2011-01-14 18:25:36 +01:00
Miek Gieben 8582967bab enforce the keysize 2011-01-13 08:48:05 +01:00
Miek Gieben 1ee22eb579 more happy with the interface 2011-01-12 16:33:56 +01:00
Miek Gieben 99d40351b8 Put GRONGs responder here 2011-01-11 09:55:01 +01:00
Miek Gieben 578304226f Add dnskey gen for RSA keys 2011-01-10 16:10:15 +01:00