cfg80211: make certificate generation more robust