lib/r509/certificateauthority/http/server.rb in r509-ca-http-0.2 vs lib/r509/certificateauthority/http/server.rb in r509-ca-http-0.2.1
- old
+ new
@@ -179,14 +179,15 @@
raise ArgumentError, "CA not found"
end
if not serial
raise ArgumentError, "Serial must be provided"
end
- if not reason
- reason = 0
+
+ if not reason.nil? and reason.empty?
+ reason = nil
end
- crl(ca).revoke_cert(serial.to_i, reason.to_i)
+ crl(ca).revoke_cert(serial, reason)
crl(ca).crl.to_pem
end
post '/1/certificate/unrevoke/?' do