use rocket; use rocket::response::content; mod upload; #[get("/key/")] fn key_by_fingerprint(fpr: String) -> String { format!("{}", fpr) } #[derive(FromForm)] struct KeySubmissionForm { key: String, } #[post("/keys", data = "")] fn submit_key(data: String) -> String { //use multipart::server::Multipart; //use openpgp::TPK; format!("{:?}", data)/* let strm = form.open(); match TPK::from_reader(strm) { Ok(tpk) => { match tpk.userids().next() { Some(uid) => { format!("Hello, {:?}", uid.userid()) } None => { format!("Hello, {:?}", tpk.primary().fingerprint()) } } } Err(e) => { format!("Error: {:?}", e) } }*/ } #[get("/")] fn root() -> content::Html<&'static str> { content::Html(" Garbage Pile Public Key Server

Garbage Pile Public Key Server

The verifying PGP key server. Powered by p≡pnology!

Search for keys

Upload your key

") } fn main() { rocket::ignite().mount("/", routes![ upload::multipart_upload, key_by_fingerprint, root]).launch(); } //POST /keys //GET /keys/