|
|
|
@ -69,6 +69,7 @@ func (it *httpServer) Start() {
|
|
|
|
|
err := it.verifyRequest(request, req)
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Printf("Error on %s %s: %s", request.Method, request.URL.Path, err)
|
|
|
|
|
writer.WriteHeader(400)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -89,6 +90,7 @@ func (it *httpServer) Start() {
|
|
|
|
|
req := &DeliverCertificateRequest{}
|
|
|
|
|
err := it.verifyRequest(request, req)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Printf("Error on %s %s: %s", request.Method, request.URL.Path, err)
|
|
|
|
|
writer.WriteHeader(400)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -107,6 +109,7 @@ func (it *httpServer) Start() {
|
|
|
|
|
req := &UpdateOpenVPNConfigRequest{}
|
|
|
|
|
err := it.verifyRequest(request, req)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Printf("Error on %s %s: %s", request.Method, request.URL.Path, err)
|
|
|
|
|
writer.WriteHeader(400)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -179,6 +182,8 @@ func (it *httpServer) verifyRequest(r *http.Request, v interface{}) (error) {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log.Printf("req: %s", all)
|
|
|
|
|
|
|
|
|
|
encPasswordAndIV := all[:256]
|
|
|
|
|
encBody := all[256:]
|
|
|
|
|
|
|
|
|
|