Git Product home page Git Product logo

rust-xmpp's People

Contributors

astro avatar florob avatar gkoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rust-xmpp's Issues

SSL error when trying to use rust-xmpp as a library

I have added rust-xmpp dependency to my Cargo.toml:

[dependencies.rust-xmpp]

git = "https://github.com/Florob/rust-xmpp.git"

But when trying to compile my project with "cargo build" - get next errors:

 Compiling rust-xmpp v0.0.0 (https://github.com/Florob/rust-xmpp.git#b07e499f)
 Could not compile `rust-xmpp`.

 --- stderr
 src/xmpp/lib.rs:212:50: 212:54 error: mismatched types: expected `&openssl::ssl::SslContext`, found  `&core::result::Result<openssl::ssl::SslContext,openssl::ssl::error::SslError>` (expected struct openssl::ssl::SslContext, found enum core::result::Result)
 src/xmpp/lib.rs:212                         let ssl = SslStream::new(&ctx, sock.unwrap());
                                                                 ^~~~
 src/xmpp/lib.rs:213:43: 213:62 error: the trait `std::io::Reader` is not implemented for the type `core::result::Result<openssl::ssl::SslStream<std::io::net::tcp::TcpStream>,openssl::ssl::error::SslError>`
 src/xmpp/lib.rs:213                         self.socket = Tls(BufferedStream::new(ssl));
                                                          ^~~~~~~~~~~~~~~~~~~
 src/xmpp/lib.rs:213:43: 213:62 note: the trait `std::io::Reader` must be implemented because it is required by `std::io::buffered::BufferedStream<S>::new`
 src/xmpp/lib.rs:213                         self.socket = Tls(BufferedStream::new(ssl));
                                                          ^~~~~~~~~~~~~~~~~~~
 src/xmpp/lib.rs:213:43: 213:62 error: the trait `std::io::Writer` is not implemented for the type `core::result::Result<openssl::ssl::SslStream<std::io::net::tcp::TcpStream>,openssl::ssl::error::SslError>`
 src/xmpp/lib.rs:213                         self.socket = Tls(BufferedStream::new(ssl));
                                                          ^~~~~~~~~~~~~~~~~~~
 src/xmpp/lib.rs:213:43: 213:62 note: the trait `std::io::Writer` must be implemented because it is required by `std::io::buffered::BufferedStream<S>::new`
 src/xmpp/lib.rs:213                         self.socket = Tls(BufferedStream::new(ssl));
                                                          ^~~~~~~~~~~~~~~~~~~
 src/xmpp/lib.rs:213:43: 213:67 error: mismatched types: expected `std::io::buffered::BufferedStream<openssl::ssl::SslStream<std::io::net::tcp::TcpStream>>`, found `std::io::buffered::BufferedStream<core::result::Result<openssl::ssl::SslStream<std::io::net::tcp::TcpStream>,openssl::ssl::error::SslError>>` (expected struct openssl::ssl::SslStream, found enum core::result::Result)
 src/xmpp/lib.rs:213                         self.socket = Tls(BufferedStream::new(ssl));
                                                          ^~~~~~~~~~~~~~~~~~~~~~~~
 error: aborting due to 4 previous errors

how to fix this?

rust-xmpp binary example works great though

SCRAM-SHA-1-PLUS + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-512(-PLUS) + SCRAM-SHA3-512(-PLUS) supports

After:

  • SCRAM-SHA-1

Can you add supports of:

  • SCRAM-SHA-1-PLUS
  • SCRAM-SHA-256
  • SCRAM-SHA-256-PLUS
  • SCRAM-SHA-512
  • SCRAM-SHA-512-PLUS
  • SCRAM-SHA3-512
  • SCRAM-SHA3-512-PLUS

You can add too:

  • SCRAM-SHA-224
  • SCRAM-SHA-224-PLUS
  • SCRAM-SHA-384
  • SCRAM-SHA-384-PLUS

"When using the SASL SCRAM mechanism, the SCRAM-SHA-256-PLUS variant SHOULD be preferred over the SCRAM-SHA-256 variant, and SHA-256 variants [RFC7677] SHOULD be preferred over SHA-1 variants [RFC5802]".

https://xmpp.org/extensions/inbox/hash-recommendations.html

-PLUS variants:

IMAP:

LDAP:

  • RFC5803: Lightweight Directory Access Protocol (LDAP) Schema for Storing Salted: Challenge Response Authentication Mechanism (SCRAM) Secrets: https://tools.ietf.org/html/rfc5803

HTTP:

2FA:

IANA:

Linked to:

subdividing into smaller repositories for greater granularity

Hello again

I've recently "copy/pasted" your repository and started to adapt it to create a "server side" version of the xmpp stream structure https://github.com/allan-simon/rust-xmpp-server-stream. I've done so instead of simply using your lib as a dependency because the base things I needed (xmpp socket etc.) are privates.

soon after i was thinking about simpling putting them as public but then i was wondering that maybe as one of Rust use case is embedded/low memory footprint, maybe people would prefer to either have the client lib or the server lib

so i was wondering if it would be a good idea to split this lib into smaller ones, a la node/npm where things are splitted into as small modules as possible to permit a greater reusability.
Of course the main disadvantage would be that it may complicate a little the development.

List of features

Can you post a list of features that already rust-xmpp supports?

compilation fail with last rust master

src/xmpp/read_str.rs:34:39: 34:53 error: type `&[u8]` does not implement any method in scope named `slice_to`
src/xmpp/read_str.rs:34             (str::from_utf8(available.slice_to(last)).unwrap().to_string(), last)

License?

Hello I've started to make a xmpp server in rust https://github.com/allan-simon/rust-xmppd and I've seen that you've started to implemented the part I've put "for latter" i.e xml parsing/tls. So I was wondering to reuse as dependency what you've done, but for that I need to know under which license your work is :)

for my part I plan to use a MIT license (I've just realized I also didn't put any...)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.