[Pkg-privacy-commits] [msva-perl] 35/356: msva.rb
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:41:37 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository msva-perl.
commit 14f3cf41009bb7ab2b9e5ab83623020935e5cf51
Author: mike castleman <m at mlcastle.net>
Date: Sat Jan 9 18:35:05 2010 -0500
msva.rb
---
msva.rb | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/msva.rb b/msva.rb
new file mode 100644
index 0000000..ca4be59
--- /dev/null
+++ b/msva.rb
@@ -0,0 +1,41 @@
+#!/usr/bin/env ruby
+
+require 'rubygems'
+
+require 'json'
+require 'openssl'
+require 'sinatra'
+
+get '/' do
+ content_type 'text/plain; charset=us-ascii'
+
+ "Hello from your friendly MSVA."
+end
+
+post '/reviewcert' do
+ content_type "application/json"
+
+ begin
+ params = JSON.parse(request.body.string)
+ rescue JSON::ParserError
+ halt({ :valid => false, :message => "couldn't parse JSON query"})
+ end
+
+ unless (params["pkc"] && params["pkc"]["type"] == "x509der")
+ halt({ :valid => false, :message => "pkc not present or of not-understood type" }.to_json)
+ end
+
+ data = params["pkc"]["data"].pack("C*")
+ pkey = OpenSSL::X509::Certificate.new(data).public_key
+
+ { :valid => false, :message => "Just testing!!" }.to_json
+end
+
+get '/noop' do
+ { :available => true, :protoversion => 1, :server => "MSVA-Ruby 0.00001" }.to_json
+end
+
+post '/extracerts' do
+ # TODO: fill in if we need to do so
+ not_found
+end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/msva-perl.git
More information about the Pkg-privacy-commits
mailing list