ProcessRequest validates and processes the incoming request. It is a wrapper around a validator and the ParseRequest function.
(req *CertificateRequest)
| 370 | // ProcessRequest validates and processes the incoming request. It is |
| 371 | // a wrapper around a validator and the ParseRequest function. |
| 372 | func (g *Generator) ProcessRequest(req *CertificateRequest) (csr, key []byte, err error) { |
| 373 | |
| 374 | log.Info("generate received request") |
| 375 | err = g.Validator(req) |
| 376 | if err != nil { |
| 377 | log.Warningf("invalid request: %v", err) |
| 378 | return nil, nil, err |
| 379 | } |
| 380 | |
| 381 | csr, key, err = ParseRequest(req) |
| 382 | if err != nil { |
| 383 | return nil, nil, err |
| 384 | } |
| 385 | return |
| 386 | } |
| 387 | |
| 388 | // IsNameEmpty returns true if the name has no identifying information in it. |
| 389 | func IsNameEmpty(n Name) bool { |