Skip to content

Commit

Permalink
move Arti RPC calls to x_acme_ experimental namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEnbyperor committed Oct 1, 2024
1 parent 32b8506 commit b9f4044
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "certbot-onion"
version = "0.3.0"
version = "0.3.1"
description = "Certbot authenticator plugin for the onion-csr-01 challenge"
authors = [
{name = "Q Misell", email = "[email protected]"}
Expand Down
8 changes: 4 additions & 4 deletions rust/src/arti.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl ArtiClient {
}

fn get_onion_service(&self, domain: &str) -> PyResult<ArtiOnionService> {
let resp = self.client.execute(&ArtiRequest::new(self.client.session().unwrap(), "arti:get_onion_service", ArtiOnionServiceRequest {
let resp = self.client.execute(&ArtiRequest::new(self.client.session().unwrap(), "arti:x_acme_get_onion_service", ArtiOnionServiceRequest {
domain
}).encode())
.map_err(|e| PyErr::new::<pyo3::exceptions::PyConnectionError, _>(format!("protocol error: {}", e)))?
Expand All @@ -81,7 +81,7 @@ impl ArtiClient {
#[pymethods]
impl ArtiOnionService {
fn onion_name(&self) -> PyResult<String> {
let resp = self.client.execute(&ArtiRequest::new(&self.object_id, "arti:onion_service_name", ArtiOnionServiceNameRequest {}).encode())
let resp = self.client.execute(&ArtiRequest::new(&self.object_id, "arti:x_acme_onion_service_name", ArtiOnionServiceNameRequest {}).encode())
.map_err(|e| PyErr::new::<pyo3::exceptions::PyConnectionError, _>(format!("protocol error: {}", e)))?
.map_err(|e| PyErr::new::<pyo3::exceptions::PyValueError, _>(format!("unable to get onion service name: {}", e)))?;

Expand All @@ -90,7 +90,7 @@ impl ArtiOnionService {
}

fn make_csr(&self, ca_nonce: &[u8]) -> PyResult<std::borrow::Cow<[u8]>> {
let resp = self.client.execute(&ArtiRequest::new(&self.object_id, "arti:onion_service_csr", ArtiCsrRequest {
let resp = self.client.execute(&ArtiRequest::new(&self.object_id, "arti:x_acme_onion_service_csr", ArtiCsrRequest {
ca_nonce: base64ct::Base64::encode_string(ca_nonce)
}).encode())
.map_err(|e| PyErr::new::<pyo3::exceptions::PyConnectionError, _>(format!("protocol error: {}", e)))?
Expand All @@ -104,7 +104,7 @@ impl ArtiOnionService {
}

fn sign_caa(&self, expiry: u32) -> PyResult<OnionCAA> {
let resp = self.client.execute(&ArtiRequest::new(&self.object_id, "arti:onion_service_caa", ArtiCaaRequest {
let resp = self.client.execute(&ArtiRequest::new(&self.object_id, "arti:x_acme_onion_service_caa", ArtiCaaRequest {
expiry,
}).encode())
.map_err(|e| PyErr::new::<pyo3::exceptions::PyConnectionError, _>(format!("protocol error: {}", e)))?
Expand Down

0 comments on commit b9f4044

Please sign in to comment.