Use OpenSSL 3
This commit is contained in:
983
Cargo.lock
generated
983
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
19
Cargo.toml
19
Cargo.toml
@@ -9,15 +9,22 @@ path = "src/lib.rs"
|
||||
crate-type = ["dylib"]
|
||||
|
||||
[dependencies]
|
||||
deltachat = { git = "https://github.com/deltachat/deltachat-core-rust", tag="v1.51.0" }
|
||||
lazy_static = "1.4.0"
|
||||
log = "0.4.8"
|
||||
purple-rs = "*"
|
||||
openssl = "0.10.36"
|
||||
openssl-src = "300.0.0"
|
||||
deltachat = { git = "https://github.com/deltachat/deltachat-core-rust", tag = "1.60.0" }
|
||||
lazy_static = "*"
|
||||
log = "*"
|
||||
purple-rs = { git = "https://github.com/Flared/purple-rs", branch = "master" }
|
||||
|
||||
## Keep in sync with deltachat-core-rust ##
|
||||
|
||||
# Keep in sync with deltachat-core-rust
|
||||
[dependencies.async-std]
|
||||
version = "~1.8"
|
||||
version = "~1.9"
|
||||
features = ["unstable"]
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
||||
[patch.crates-io]
|
||||
openssl-sys = { git = "https://github.com/lupine/rust-openssl", branch = "upgrade-openssl-3" }
|
||||
openssl-src = { git = "https://github.com/lupine/openssl-src-rs", branch = "upgrade-openssl-3" }
|
||||
|
21
README.md
21
README.md
@@ -33,22 +33,15 @@ Starting again from scratch in Rust. So currently, nothing works. TODO list:
|
||||
- [ ] Send/receive video messages
|
||||
- [ ] Send/receive arbitrary attachments
|
||||
|
||||
|
||||
|
||||
## Build
|
||||
|
||||
There are some licensing issues at present, so you shouldn't build this plugin.
|
||||
To get a `target/debug/libpurple_delta.so`, just run `cargo build`.
|
||||
|
||||
`deltachat-core-rust` uses a vendored openssl 1, unconditionally links it, and
|
||||
is MPL-licensed.
|
||||
|
||||
`purple-plugin-delta` is GPLv3 without the [OpenSSL exemption](https://people.gnome.org/~markmc/openssl-and-the-gpl.html)
|
||||
|
||||
`libpurple` itself is GPLv2 without the OpenSSL exemption.
|
||||
|
||||
There's no point to `purple-plugin-delta` adding the OpenSSL exemption because
|
||||
`libpurple` lacks it, and in any event, it will be unnecessary with the next
|
||||
major version of OpenSSL. So, time should resolve this for us one way or another.
|
||||
Since purple-plugin-delta is made to link against libpurple, which is GPLv2
|
||||
without the "OpenSSL exemption", distributing something that linked against
|
||||
OpenSSL 1 would be a licensing violation. Instead, we configure the build system
|
||||
so we statically link against a vendored OpenSSL 3 instead. This has only been
|
||||
possible since 2021-09-07.
|
||||
|
||||
Significant code using the WTFPL includes the [libpurple-rust bindings](https://github.com/sbwtw/libpurple-rust)
|
||||
and the [pidgin-wechat plugin](https://github.com/sbwtw/pidgin-wechat), which
|
||||
@@ -57,7 +50,7 @@ against this mess.
|
||||
|
||||
## Use
|
||||
|
||||
The easiest way to use this is to copy the `libdelta.so` file into
|
||||
The easiest way to use this is to copy the `libpurple_delta.so` file into
|
||||
`~/.purple/plugins`. When running pidgin, you'll now have the option to add
|
||||
a "Delta Chat" account.
|
||||
|
||||
|
@@ -1 +1 @@
|
||||
1.50.0
|
||||
1.54.0
|
||||
|
@@ -1,7 +1,9 @@
|
||||
extern crate async_std;
|
||||
extern crate deltachat;
|
||||
extern crate lazy_static;
|
||||
extern crate log;
|
||||
extern crate purple_rs as purple;
|
||||
extern crate openssl;
|
||||
|
||||
use async_std::sync::Arc; // RwLock
|
||||
use chat_info::{ChatInfo, PartialChatInfo}; //ChatInfoVersion
|
||||
@@ -14,6 +16,8 @@ use std::ffi::{CStr, CString};
|
||||
//use std::rc::Rc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
|
||||
use deltachat::accounts::Accounts;
|
||||
|
||||
mod chat_info;
|
||||
mod delta;
|
||||
pub mod logging;
|
||||
@@ -121,6 +125,8 @@ impl purple::PrplPlugin for PurpleDelta {
|
||||
}
|
||||
}
|
||||
fn register(&self, context: RegisterContext<Self>) -> RegisterContext<Self> {
|
||||
println!("OpenSSL version: {}", openssl::version::version());
|
||||
|
||||
let info = purple::PrplInfo {
|
||||
id: "prpl-delta".into(),
|
||||
name: "Delta Chat".into(),
|
||||
|
Reference in New Issue
Block a user