Aborts `NewAuthorization` when SA RPC fails.

The RA performs an RPC to the SA's `GetValidAuthorizations` function
when attempting to find existing valid authorizations to reuse. Prior to
this commit, ff the RPC fails (e.g. due to a timeout) the calling code
logs the failure as a warning but fails to return the error and cease
processing. This results in a nil panic when we later try to index
`auths`

This commit inserts the missing `return` to ensure we don't process
further, thereby resolving #2274.
This commit is contained in:
Daniel 2016-10-26 13:00:32 -04:00
parent b407cf4861
commit f52f340a1e
No known key found for this signature in database
GPG Key ID: 08FB2BFC470E75B4
1 changed files with 1 additions and 0 deletions

View File

@ -373,6 +373,7 @@ func (ra *RegistrationAuthorityImpl) NewAuthorization(ctx context.Context, reque
fmt.Sprintf("unable to get existing validations for regID: %d, identifier: %s",
regID, identifier.Value))
ra.log.Warning(string(outErr))
return authz, outErr
}
if existingAuthz, ok := auths[identifier.Value]; ok {