Commit graph

10 commits

Author SHA1 Message Date
David Hill
66afd1dbc9 Use NewReader instead of NewBuffer. 2014-06-05 13:52:37 -04:00
Dave Collins
bf90ed2142 Add 2014 to copyright dates. 2014-01-08 23:49:06 -06:00
Owain G. Ainsworth
e43c79c74d add TlsRpcCommand and TlsRawRpcCommand.
These act the same as the !tls versions of this code but they take a PEM
encoded certificate chain to be used to verify certificates (ca verified
certs could use /etc/ssl/certs.pem) and a parameter to skip cert
verification and will use https internally.
2013-11-19 14:46:17 +00:00
John C. Vernaleo
b0ca6d5903 Fix typo in comment. 2013-08-15 10:15:25 -04:00
Dave Collins
10542e0573 Optimize and improve credential stripping code.
Since we already have the specific username and password we want to strip
from errors, use a specific search string rather than a generic regular
expression.  This is quite a bit more efficient than using regular
expressions and also has the benefit of being more accurate.

Also, rather than using the added overhead of fmt to convert the error to
a string, just call Error() directly on it to get the string.

Finally, instead of just stripping it, replace it with the literal
string "<username>:<password>" to avoid any possible confusion in the
error messages where it might otherwise appear the url was being
constructed incorrectly.

ok jcv@
2013-06-14 11:32:50 -05:00
John C. Vernaleo
2a475d7299 Need to test for nil before regex. 2013-06-14 11:47:09 -04:00
John C. Vernaleo
e4a80edc95 Clean the error message on connect failure so username and password is not shown. 2013-06-14 11:32:05 -04:00
AndreasM
27b69ccca3 unhide error message from jsonRpcSend 2013-06-13 19:16:41 +03:00
John C. Vernaleo
2fc8982be5 Add tests for MarshallAndSend function. 2013-05-15 10:08:05 -04:00
John C. Vernaleo
d0d58c54db Initial implementation. 2013-05-13 12:25:41 -04:00