Commit Graph

193 Commits

Author SHA1 Message Date
ice_iix d31a58b3eb Remove anonymous trait parameters, name _ for Rust 2018
https://rust-lang-nursery.github.io/edition-guide/rust-2018/trait-system/no-anon-params.html
2018-11-04 11:48:34 -08:00
ice_iix 5bedf46353 Remove anonymous trait parameters, name _ for Rust 2018
https://rust-lang-nursery.github.io/edition-guide/rust-2018/trait-system/no-anon-params.html
2018-11-04 11:48:34 -08:00
iceiix 2be7a2ba6b Remove use of OpenSSL for RSA PKCS1 encryption (#12). Closes #2
* Add handwritten RSA PKCS1 encryption using num-bigint and simple_asn1

* Add more logging to compare OpenSSL with/without side-by-side

* Log message and ciphertext in hex

* Print N and e as hexadecimal integers

* Fix bad encryption caused by zeros in PKCS1 padding

PS field in https://tools.ietf.org/html/rfc8017#section-7.2.1
Must be nonzero

* Use rand fill instead of rand_bytes

* Remove OpenSSL!

* Update CI scripts and docs to not install OpenSSL

* Remove copying OpenSSL DLLs (libeay and ssleay) in AppVeyor script

* Change rsa_public_encrypt_pkcs1 to return a Result<Vec<u8>, String>

* Add error checking, returning Err<String> on failure; RFC comments

* Add the required message representative range checking

* Use expect() instead of unwrap() on from_der

* Map the ASN.1 error to a String to return it from rsa_public_encrypt_pkcs1() instead of panicking

* Move RSA to a new crate, rsa_public_encrypt_pkcs1

https://github.com/iceiix/rsa_public_encrypt_pkcs1

* Update to rsa_public_encrypt_pkcs1 with simple_asn 0.1.0

https://github.com/iceiix/rsa_public_encrypt_pkcs1/issues/1

* Update to published version of rsa_public_encrypt_pkcs1, 0.1.0

* Remove unnecessarily added blank line

* Remove libssl-dev from .travis.yml
2018-11-04 09:40:51 -08:00
iceiix d95b99c175 Support beta Rust release. Closes #8 (#11)
* Remove seemingly unneeded const on MetadataKey<T> new

* Change biome temperature/moisture to integer, x100 to remove floating-point so can use within stable 'const fn'

* Remove unstable const_fn feature, now using stable const fn: see https://www.reddit.com/r/rust/comments/9msqfn/const_fn_soon_on_stable_rust/

* Test on Rust beta (awaiting 1.31 release for stable)

* Update readme for beta Rust support
2018-11-02 16:57:23 -07:00
iceiix 38543feae7 Switch to RustCrypto for Cfb8 symmetric crypto, instead of OpenSSL (#10) (#2)
* Encrypt with both RustCrypto cfb8 and OpenSSL

* Switch to RustCrypto for decrypting

* Show encryption for both RustCrypto and OpenSSL, for comparison...

* Correct off-by-one error in encryption, cfb8 doesn't need extra byte

* Remove OpenSSL for symmetric crypto

* Update Cargo.lock
2018-11-01 20:46:21 -07:00
ice_iix 9840a01262 Update to rust-openssl 0.10.15 (from 0.7.8)
Major API change, the last of the outdated dependencies
Closes https://github.com/iceiix/steven/issues/4

Note: would still like to replace the last usages of the OpenSSL crate
https://github.com/iceiix/steven/issues/2 but it is needed for CFB8
until a replacement is available (maybe https://github.com/RustCrypto/stream-ciphers/issues/4)
2018-10-27 19:56:34 -07:00
iceiix 88563ba894 Replace hyper with reqwest (#7)
An old version of hyper was used before (0.8.0), in the process of updating to hyper 0.12.11, found this higher-level replacement/wrapper, reqwest 0.9.4 which is simpler to use than the latest hyper and serves the purpose of a simple HTTP client well

* Begin updating to hyper 0.12.11

https://github.com/iceiix/steven/issues/4#issuecomment-425759778

* Use type variables for hyper::Client

* Fix setting header syntax, Content-Type: application/json, 17->13

* Parse strings into URLs with url.parse::<hyper::Uri>().unwrap()

b20971cb4e/examples/client.rs (L25)

* Use hyper::Request::post() then client.request() since client.post() removed

* wait() on the ResponseFuture to get the Result

* try! to unwrap the Result

* status() is now a method

* Concatenate body chunks unwrap into bytes, then parse JSON from byte slice, instead of from_reader which didn't compile

* Replace send() with wait() on ResponseFuture

* Parse HeaderValue to u64

* Slices implement std::io::Read trait

* Read into_bytes() instead of read_to_end()

* Disable boxed logger for now to workaround 'expected function, found macro'

* Remove unnecessary mutability, warnings

* Hack to parse twice to avoid double move

* Use hyper-rustls pure Rust implementation for TLS for HTTPS in hyper

* Start converting to reqwest: add Protocol::Error and reqwest::Error conversion

* Use reqwest, replacing hyper, in protocol

* Convert resources to use reqwest instead of hyper

* Convert skin download to reqwest, instead of hyper

* Remove hyper

* Revert unnecessary variable name change req/body to reduce diff

* Revert unnecessary whitespace change to reduce diff, align indentation on .

* Fix authenticating to server, wrong method and join URL

* Update Cargo.lock
2018-10-27 17:03:34 -07:00
iceiix 7e5bb999e4 Update to serde_json 1.0 (#6)
* Replace find() with get()

* Update for renamed as_string->as_str and as_boolean->as_bool

https://github.com/serde-rs/json/releases/tag/v0.8.0
Value::as_string() has been renamed to as_str() and Value::as_boolean() has been renamed to as_bool() to improve consistency
https://github.com/serde-rs/json/issues/126

* No serde_json::Value::I64/U64/F64 anymore, only Number

* Update from lookup() to pointer(), using JSON pointer syntax

https://github.com/iceiix/steven/pull/6#issuecomment-432472123

* Remove unused and removed ObjectBuilder import

* Use into_iter().collect() to convert BTreeMap to serde_json::Map

* Change parse_rules to accept serde_json::Map instead of BTreeMap

* Remove unused serde_json macro_use

* Update Cargo.lock
2018-10-23 18:47:21 -07:00
iceiix b2b1ec00ed Update to serde_json 1.0 (#6)
* Replace find() with get()

* Update for renamed as_string->as_str and as_boolean->as_bool

https://github.com/serde-rs/json/releases/tag/v0.8.0
Value::as_string() has been renamed to as_str() and Value::as_boolean() has been renamed to as_bool() to improve consistency
https://github.com/serde-rs/json/issues/126

* No serde_json::Value::I64/U64/F64 anymore, only Number

* Update from lookup() to pointer(), using JSON pointer syntax

https://github.com/iceiix/steven/pull/6#issuecomment-432472123

* Remove unused and removed ObjectBuilder import

* Use into_iter().collect() to convert BTreeMap to serde_json::Map

* Change parse_rules to accept serde_json::Map instead of BTreeMap

* Remove unused serde_json macro_use

* Update Cargo.lock
2018-10-23 18:47:21 -07:00
ice_iix ca79b0c735 Use the RustCrypto sha-1 crate instead of sha1
For https://github.com/iceiix/steven/issues/2#issuecomment-425769562
2018-10-03 18:28:05 -07:00
ice_iix ce8d17cd8d Use hex module for hex decoding, removing deprecated rustc-serialize for https://github.com/iceiix/steven/issues/4 2018-09-30 18:14:36 -07:00
ice_iix c3e4824a04 Update to flate2 1.0.2
https://github.com/iceiix/steven/issues/4
2018-09-30 16:19:24 -07:00
ice_iix ecbc7abc58 Use std::time for server ping, getting closer to eliminating use of 'time' crate, https://github.com/iceiix/steven/issues/3 2018-09-29 22:57:55 -07:00
ice_iix 04ca22729e Use sha1 module for hashing instead of openssl, part of https://github.com/iceiix/steven/issues/2 2018-09-29 22:23:48 -07:00
ice_iix b7326badd6 Fix warning: variable does not need to be mutable, in nightly-2017-08-31
https://github.com/iceiix/steven/issues/3
2018-09-29 18:42:13 -07:00
Techcable 6fcf121241 Update to Minecraft 1.11 (Fixes #63) 2016-12-09 14:32:02 +00:00
llogiq 0f41b0effe Fixed another batch of clippy warnings
Those are mostly readability-related. Also did a cargo update.
2016-09-15 15:15:52 +01:00
Techcable 40f146ac65 Update to minecraft 1.10.2 2016-07-10 12:23:59 +01:00
Techcable 49b1ae1dbc Update to minecraft 1.10.2 2016-07-10 12:23:59 +01:00
Thinkofname 03e6af8cb9 Fix a large number of warnings 2016-04-16 21:44:05 +01:00
Thinkofname 862cf97331 Clean up the protocol implementation to use generics instead of trait objects 2016-04-08 18:46:07 +01:00
Thinkofname 8f976b3014 Clean up the protocol implementation to use generics instead of trait objects 2016-04-08 18:46:07 +01:00
Thinkofname 4d8e3db793 Store the client's UUID and username when logging in 2016-04-06 22:50:31 +01:00
Thinkofname d1b3180e9a Drop steven_openssl in favor of using the openssl crate (Closes #31) 2016-04-05 19:36:59 +01:00
Thinkofname 5614fa07b5 Track player list information 2016-04-05 18:50:53 +01:00
Thinkofname 844d78ac8e Fix the formatting of StatusResponse's example 2016-04-04 23:58:40 +01:00
Thinkofname 24bdeb7d8f Allow documentation on packets to be actually be considered documentation by rustdoc 2016-04-04 23:50:27 +01:00
Thinkofname d0704b2a67 Block entity support, implement signs 2016-04-04 22:08:24 +01:00
Thinkofname 5f6e41f700 Optimize chunk loading 2016-04-04 12:37:21 +01:00
Thinkofname f282afe887 Replace usages of x,y,z for block positions with Position 2016-04-03 20:53:40 +01:00
Thinkofname da40508291 Replace usages of x,y,z for block positions with Position 2016-04-03 20:53:40 +01:00
Thinkofname 9fef9aa8f1 Support connecting to offline mode servers 2016-04-03 11:20:31 +01:00
llogiq 469a2af1d4 Fixed various clippy warnings 2016-04-03 01:26:31 +01:00
Thinkofname df9db09004 Fix a bit::Map overflow on 32 bit machines 2016-04-02 16:24:50 +01:00
Thinkofname 565e5110db Support Minecraft 1.9.2 2016-03-31 20:51:58 +01:00
Thinkofname 88c0f3da28 Handle block updates from the server 2016-03-31 15:26:07 +01:00
Thinkofname 463ca00dd7 Handle block updates from the server 2016-03-31 15:26:07 +01:00
Thinkofname 9593f56eee Only trim_left the hash string 2016-03-28 22:10:33 +01:00
Thinkofname 3f8bc10bb0 Initial entity work, moved self handling to an entity 2016-03-26 22:21:47 +00:00
Thinkofname f3377c17c6 Follow some of clippy's suggestions 2016-03-26 14:24:26 +00:00
Thinkofname 2589b169ca Follow some of clippy's suggestions 2016-03-26 14:24:26 +00:00
Thinkofname f6ac1123a2 Implement stairs 2016-03-26 13:21:19 +00:00
Thinkofname 9a69cd1fa7 Move Direction and BlockVertex into better locations 2016-03-26 11:46:37 +00:00
Thinkofname 57bced4a9b Collisions and normal style movement 2016-03-26 10:19:16 +00:00
Thinkofname 780676ec65 Update to 1.9.0 2016-03-25 20:56:45 +00:00
Thinkofname 03bdb015e5 Update to 1.9.0 2016-03-25 20:56:45 +00:00
Thinkofname ce6f5c963c Initial block model support 2016-03-24 15:39:57 +00:00
Thinkofname 122978fc49 Use read_exact instead of take & read_to_end 2016-03-23 23:28:33 +00:00
Thinkofname 411bfe6915 Fix a bug in twos_compliment's implementation 2016-03-23 22:58:09 +00:00
Thinkofname a89aff3f1f Rework block system 2016-03-23 21:10:40 +00:00
Thinkofname a42c1e412a Implement chunk loading 2016-03-21 14:05:13 +00:00
Thinkofname 418f3380b5 Implement chunk loading 2016-03-21 14:05:13 +00:00
Thinkofname 4129f09c77 Remove old test code 2016-03-21 10:55:50 +00:00
Thinkofname 883bc07d62 Allow connecting to servers 2016-03-21 10:55:31 +00:00
Thinkofname 46c91db4e0 Remove old debug messages 2016-03-21 00:15:57 +00:00
Thinkofname 0d42d59ed9 Fully implement the login screen (Closes #6) 2016-03-20 23:43:31 +00:00
Thinkofname 3d6f5ba904 Work on login screen, added ui buttons and textboxes (plus tab fixes) 2016-03-20 20:17:21 +00:00
Thinkofname 458a36bbf2 Initial work on connecting to servers 2016-03-20 12:04:02 +00:00
Thinkofname ddf3a7981c Base implementation for worlds/blocks 2016-03-18 22:24:30 +00:00
Thinkofname ba1fe8e766 Base implementation for worlds/blocks 2016-03-18 22:24:30 +00:00
Thinkofname f4f0b71e79 Correctly mark 15w39c as the supported version 2016-03-18 11:46:37 +00:00
Thinkofname 826602b459 Automatically allocate packet ids (Fixes #13) 2016-03-18 11:39:03 +00:00
Thinkofname eaea15e4a1 Allow searching for entities within the manager 2016-03-18 10:25:09 +00:00
Thinkofdeath 469afb228b Implementation of components for the entity component system 2016-03-17 22:18:25 +00:00
Thinkofdeath 4cce36bf9c Update copyright 2016-03-16 18:25:35 +00:00
Thinkofdeath 30c7dbeaea Update copyright 2016-03-16 18:25:35 +00:00
Thinkofdeath 6d34f11989 Clean up 2016-03-16 18:01:33 +00:00
Thinkofdeath 75654bbc66 Clean up 2016-03-16 18:01:33 +00:00
Thinkofdeath d9e9ddc2b2 Reformat using rustfmt 2015-10-07 19:36:59 +01:00
Thinkofdeath 35306c62e1 Reformat using rustfmt 2015-10-07 19:36:59 +01:00
Thinkofdeath 46adad0555 Tidy up 2015-09-29 20:09:36 +01:00
Thinkofdeath dc810c15dd Tidy up 2015-09-29 20:09:36 +01:00
Thinkofdeath ec9159a75b Minor changes 2015-09-27 19:38:58 +01:00
Thinkofdeath 70a3683df2 Clean up 2015-09-25 15:20:55 +01:00
Thinkofdeath c9f7cf384f Clean up 2015-09-25 15:20:55 +01:00
Thinkofdeath 12847e9686 Kinda functional server list 2015-09-25 14:00:49 +01:00
Thinkofdeath 1897492cf4 Kinda functional server list 2015-09-25 14:00:49 +01:00
Thinkofdeath 1920e9e9e2 Base of server list 2015-09-23 20:16:25 +01:00
Thinkofdeath 63731ca450 Basic logo work 2015-09-21 13:08:06 +01:00
Thinkofdeath 999dde1931 Base of ui system 2015-09-18 22:02:08 +01:00
Thinkofdeath 906a44d9d4 Add license 2015-09-17 16:23:07 +01:00
Thinkofdeath 5681f1d69c Add license 2015-09-17 16:23:07 +01:00
Thinkofdeath b9d7063099 Base of ui complete 2015-09-17 16:04:25 +01:00
Thinkofdeath 0f13be54fa Base of ui complete 2015-09-17 16:04:25 +01:00
Thinkofdeath 2d10d38e4c Complete protocol implementation 2015-09-12 20:31:26 +01:00
Thinkofdeath 880cf0d912 Complete protocol implementation 2015-09-12 20:31:26 +01:00
Thinkofdeath 25a033268c Tabs to spaces 2015-09-10 11:58:42 +01:00
Thinkofdeath c5d00f6dc8 Tabs to spaces 2015-09-10 11:58:42 +01:00
Thinkofdeath fe6a56ce3a Main part of the protocol complete 2015-09-10 11:49:41 +01:00
Thinkofdeath 11c33e2d8d Main part of the protocol complete 2015-09-10 11:49:41 +01:00
Thinkofdeath 1ed844a699 Clean up protocol encoding/decoding 2015-09-08 12:57:24 +01:00
Thinkofdeath 7c6070fb18 Improve the bit map 2015-09-07 21:52:36 +01:00
Thinkofdeath 3cedeb792e Initial commit 2015-09-07 21:11:00 +01:00