In MOSS 2007 I want to add a custom control to the global link section of a master page and have it only visible to a particular audience.
The audience are the members of an active directory group who have logged in via SSL and need to be given a link which will log them out.
How can I filter a custom control so that only these users will see it? Is there an API or something like Sharepoint:SPSecurityTrimmedControl
which might help?
Yes there is an API for audiences. Here are some links from MSDN to get you started:
I haven't come across a security trimmed control for audiences but it should be fairly easy to write one.