On an FreeBSD 9 while trying to install python or something else via pkg you may get this:

pkg search python pkg: Repository FreeBSD missing. 'pkg update' required pkg: Error loading trusted certificates pkg: Error loading trusted certificates pkg: Repository FreeBSD cannot be opened. 'pkg update' required

To solve it, fetch the current official repository key:

mkdir -p /usr/share/keys/pkg/trusted /usr/share/keys/pkg/revoked
svn export https://svn0.us-west.FreeBSD.org/base/head/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 /usr/share/keys/pkg/trusted/

Then set the repo:

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes

Next, running pkg udpate should work:

$ pkg update
Updating FreeBSD repository catalogue...
[ca2.route.mx] Fetching meta.txz: 100%    968 B   1.0kB/s    00:01
[ca2.route.mx] Fetching packagesite.txz: 100%    5 MiB   5.7MB/s    00:01
Processing entries: 100%
FreeBSD repository update completed. 25174 packages processed.