I do not think this answers his question since there is no concept of a camera in SDL.
Assuming that you are using SDL_BlitSurface, then have a look at the SDL_SetAlpha function especially with its flag parameter set to SDL_SRCALPHA. This allows for alpha blending. Then use an image with an alpha channel, totally black but with full alpha in a central circle, falling off to 30% or so towards the borders. Set the surface to alpha blending, and blit it so that the destination rectangle matches the current view area. That is already what Orymus3 suggested, but expressed using SDL terms.
I drawed a black square on top of the screen with alpha blending so the game looked like it was dark, but now I have no idea on how to make things visivle and add those "lights".
Notice that the above trick does not lighting but darkening! The state of the destination surface before is a fully lit scene, and then only those parts of the scene that should not be lit are darkened.
Personally, I am using SDL2 with SDL_Texture's and SDL_RenderCopy. However I think I would be able to use SDL_SetTextureAlphaMod to achive the same result.
I think my question was a bit missguided, because my use-case is different.
I want to blend two textures (or surfaces) given a transparency mask where white is 100% image a and black is 100% image b and all shades of gray are a mix of a and b.
My idea was to render image a, then render image b over it with per-pixel alpha applied to it by the mask.
I guess I could use your suggested technique for this.
I don't want to hijack this thread any more though, so I'll just thank you for your feedback, and if I need any additional help, I'll start a new thread =)