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"]
|
crate-type = ["dylib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
deltachat = { git = "https://github.com/deltachat/deltachat-core-rust", tag="v1.51.0" }
|
openssl = "0.10.36"
|
||||||
lazy_static = "1.4.0"
|
openssl-src = "300.0.0"
|
||||||
log = "0.4.8"
|
deltachat = { git = "https://github.com/deltachat/deltachat-core-rust", tag = "1.60.0" }
|
||||||
purple-rs = "*"
|
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]
|
[dependencies.async-std]
|
||||||
version = "~1.8"
|
version = "~1.9"
|
||||||
features = ["unstable"]
|
features = ["unstable"]
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
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 video messages
|
||||||
- [ ] Send/receive arbitrary attachments
|
- [ ] Send/receive arbitrary attachments
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Build
|
## 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
|
Since purple-plugin-delta is made to link against libpurple, which is GPLv2
|
||||||
is MPL-licensed.
|
without the "OpenSSL exemption", distributing something that linked against
|
||||||
|
OpenSSL 1 would be a licensing violation. Instead, we configure the build system
|
||||||
`purple-plugin-delta` is GPLv3 without the [OpenSSL exemption](https://people.gnome.org/~markmc/openssl-and-the-gpl.html)
|
so we statically link against a vendored OpenSSL 3 instead. This has only been
|
||||||
|
possible since 2021-09-07.
|
||||||
`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.
|
|
||||||
|
|
||||||
Significant code using the WTFPL includes the [libpurple-rust bindings](https://github.com/sbwtw/libpurple-rust)
|
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
|
and the [pidgin-wechat plugin](https://github.com/sbwtw/pidgin-wechat), which
|
||||||
@@ -57,7 +50,7 @@ against this mess.
|
|||||||
|
|
||||||
## Use
|
## 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
|
`~/.purple/plugins`. When running pidgin, you'll now have the option to add
|
||||||
a "Delta Chat" account.
|
a "Delta Chat" account.
|
||||||
|
|
||||||
|
@@ -1 +1 @@
|
|||||||
1.50.0
|
1.54.0
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
extern crate async_std;
|
extern crate async_std;
|
||||||
|
extern crate deltachat;
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
extern crate log;
|
extern crate log;
|
||||||
extern crate purple_rs as purple;
|
extern crate purple_rs as purple;
|
||||||
|
extern crate openssl;
|
||||||
|
|
||||||
use async_std::sync::Arc; // RwLock
|
use async_std::sync::Arc; // RwLock
|
||||||
use chat_info::{ChatInfo, PartialChatInfo}; //ChatInfoVersion
|
use chat_info::{ChatInfo, PartialChatInfo}; //ChatInfoVersion
|
||||||
@@ -14,6 +16,8 @@ use std::ffi::{CStr, CString};
|
|||||||
//use std::rc::Rc;
|
//use std::rc::Rc;
|
||||||
use std::sync::atomic::{AtomicBool, Ordering};
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
|
|
||||||
|
use deltachat::accounts::Accounts;
|
||||||
|
|
||||||
mod chat_info;
|
mod chat_info;
|
||||||
mod delta;
|
mod delta;
|
||||||
pub mod logging;
|
pub mod logging;
|
||||||
@@ -121,6 +125,8 @@ impl purple::PrplPlugin for PurpleDelta {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn register(&self, context: RegisterContext<Self>) -> RegisterContext<Self> {
|
fn register(&self, context: RegisterContext<Self>) -> RegisterContext<Self> {
|
||||||
|
println!("OpenSSL version: {}", openssl::version::version());
|
||||||
|
|
||||||
let info = purple::PrplInfo {
|
let info = purple::PrplInfo {
|
||||||
id: "prpl-delta".into(),
|
id: "prpl-delta".into(),
|
||||||
name: "Delta Chat".into(),
|
name: "Delta Chat".into(),
|
||||||
|
Reference in New Issue
Block a user