Commit Graph

127 Commits

Author SHA1 Message Date
kmkaplan 976fd2c002
[secDNS] EPP <create> command (#20) 2023-04-18 15:57:57 +02:00
Dirkjan Ochtman c0e58dec04 Warn when not using Self 2023-04-14 12:40:54 +02:00
Dirkjan Ochtman 5371ba573a Warn on unreachable_pub lint
This makes it easier to track visibility/compatibility during review.
2023-04-14 12:40:54 +02:00
kmkaplan 7024bcd7a5
Frnic contact create (#16) 2023-04-14 10:10:06 +02:00
Kim Minh Kaplan 1b6a774232 Order derive implementations alphabetically. 2023-04-03 13:18:58 +02:00
Kim Minh Kaplan 1451ffb8e5 Make contact's organization, province, postal code and voice optional.
This changes the signature for `contact::Address::new`,
`contact::ContactCreate::new` and the type of fields
`contact::InfoData::voice` and `contact::ContactCreateRequest::voice`.

Fixes issue #13.
2023-04-03 13:18:58 +02:00
kmkaplan 6551749b77
Do not emit empty `svcExtension` XML element (#12)
Co-authored-by: Kim Minh Kaplan <kimminh.kaplan+git@afnic.fr>
2023-03-31 15:31:01 +02:00
Dirkjan Ochtman e42b953052 Expose poll module 2023-03-02 21:03:30 +01:00
Dirkjan Ochtman f18e47e38a Export poll::PollData from the crate root
Missed this in #7, so now the PollData type cannot be named.
2023-03-02 21:03:30 +01:00
Dirkjan Ochtman 0901fab3d7 Remove Message prefixes from poll types 2023-03-02 17:19:33 +01:00
Dirkjan Ochtman 0c6283fbf4 Provide more precise types for poll/ack commands
Ideally we might have modeled this with an enum with one named
field in the variants, but instant-xml is not yet up to the task;
in the mean-time, this provides more robust types, and manual
ToXml implementations aren't too verbose anyway.
2023-03-02 17:19:33 +01:00
Dirkjan Ochtman f5ea188fbb Move poll module to the top level 2023-03-02 17:19:33 +01:00
Dirkjan Ochtman 10eedb6045 Merge poll and ack modules 2023-03-02 17:19:33 +01:00
Dirkjan Ochtman f2194c818c Use enum type to represent host::Status 2023-03-02 16:42:44 +01:00
Dirkjan Ochtman 96268d9528 Use enum type to represent contact::Status 2023-03-02 16:42:44 +01:00
Dirkjan Ochtman cd92b45156 Use enum type to represent domain::Status 2023-03-02 16:42:44 +01:00
Dirkjan Ochtman 01a9b6ceb8 Clean up debugging cruft 2023-03-02 16:42:44 +01:00
Dirkjan Ochtman ef2abd64c6 Clean up XML entities in doc strings 2023-03-02 16:26:12 +01:00
Dirkjan Ochtman 3905881b55 Update README and clean up documentation 2023-03-02 15:30:22 +01:00
Dirkjan Ochtman 3565e8eb07 Use Cow for NameServers::ns 2023-03-02 14:02:48 +01:00
Dirkjan Ochtman 9aae46dd5d Move module.rs files into module/mod.rs
This style puts the root modules closer to the contained modules,
which better aligns the on-disk structure with the module hierarchy.
2023-02-28 17:04:58 +01:00
Dirkjan Ochtman 844f84dbef Align response type names with XML 2023-02-28 17:04:58 +01:00
Dirkjan Ochtman 6b2b9d1a7f Use inline format arguments 2023-02-28 17:04:58 +01:00
Dirkjan Ochtman c4684a526f Update Cargo metadata 2023-02-28 17:04:58 +01:00
Dirkjan Ochtman 3829ed77fa Switch from quick-xml to instant-xml 2023-02-28 17:04:58 +01:00
Dirkjan Ochtman 75f1dfe03e Make MessageData non-exhaustive to minimize semver issues 2023-02-21 22:36:01 +01:00
Dirkjan Ochtman 7e3006825f Add support for Verisign low balance mapping extension 2023-02-21 20:50:41 +01:00
Dirkjan Ochtman 46d23efacd Log offending XML on deserialization failure 2023-02-21 19:55:15 +01:00
Dirkjan Ochtman 75f466c1ce Update to 2021 edition 2022-12-14 19:41:48 +01:00
Dirkjan Ochtman eab64aa740 Look up server IP address on every connect 2022-12-14 19:41:48 +01:00
Rudi Floren ed3bfdbcfa add consts for common periods
This allows using common periods without checking the error at runtime.
2022-11-29 22:43:10 +08:00
Dirkjan Ochtman 0f052ea125 Bump quick-xml to 0.26 2022-11-29 22:43:10 +08:00
Dirkjan Ochtman a34dbdcf82 Apply clippy suggestions 2022-11-29 22:43:10 +08:00
Dirkjan Ochtman 698bab9b2b Reduce Error type size by boxing result state 2022-11-29 22:43:10 +08:00
Dirkjan Ochtman 406f63e02e Update to work around deprecated chrono API 2022-11-29 22:43:10 +08:00
Mari 71b6bac96a change doc tests 2022-09-07 06:03:16 +08:00
Mari 391df88509 rust fmt 2022-09-07 06:03:16 +08:00
Mari cc08819fdc Allow changing passwords 2022-09-07 06:03:16 +08:00
Dirkjan Ochtman 14ffc8db01 Change MessageAck message_id to be a &str
While all the examples in RFC 5730 use numbers, there is nothing
normative in section 2.9.2.3 that constrains msgID to be a number.
And if we look at the XML Schema, we find that msgID is defined
to be of type `token`, which seems to be defined as a string
that does not contain line feeds, carriage returns, tabs, leading
or trailing spaces or multiple spaces.

While we might define a more specific token type in the future,
for now sticking with just &str seems reasonable and this also
matches the type for `MessageQueue::id`.
2022-08-05 02:22:54 +08:00
Ritesh Chitlangi 20ab056dcf update doc and release 0.4 2022-07-26 14:49:37 +08:00
Dirkjan Ochtman ca19e545fd Flatten XML abstraction 2022-03-22 16:47:12 +08:00
Dirkjan Ochtman 3f91647370 Move response deserialization into client 2022-03-22 16:47:12 +08:00
Dirkjan Ochtman dd5fbc60ce Simplify response tests with a helper 2022-03-22 16:47:12 +08:00
Dirkjan Ochtman 5dce8501d5 Let callers create CommandDocument directly 2022-03-22 16:47:12 +08:00
Dirkjan Ochtman dd07ecc4b8 Externalize handling of command serialization 2022-03-22 16:47:12 +08:00
Nicholas Rempel dd3c60f50e Move request/response debug logging to client 2022-03-14 23:41:41 +08:00
Dirkjan Ochtman ae4c9869ab Improve robustness against dropping futures 2022-03-14 23:41:41 +08:00
Dirkjan Ochtman 478e686f24 Add more logging around reconnects 2022-03-14 23:41:41 +08:00
Dirkjan Ochtman aa589197a1 Track connection state and reconnect on invalid state
The external client/connection interface expects that to complete
full request/response cycles. However, at await points the stack
could simply be dropped, meaning the connection is left in an
inconsistent state. One relatively likely scenario is that a
transaction might be dropped while waiting for a response from the
server. For example, this might happen if the connection was
initiated by a HTTP request which was canceled/aborted.

There are different failure modes which can result from similar
scenarios depending on during what await point the future was
dropped. Since it's relatively difficult to protect against
these scenarios and some of them might manifest in indirect ways
(for example, a deserialization error might happen because the
incoming response was for a different kind of request), this PR
takes the approach of tracking in the connection whether we're
(supposedly) at a point where the connection is ready to send
another request. If transact() is called while the connection is
not in such a state, the connection will transparently attempt
to reconnect to clean up any erroneous state.
2022-03-07 21:51:00 +01:00
Dirkjan Ochtman 7e0a51bebb Use DateTime types where possible 2022-02-25 00:12:48 +08:00