code: function(desc) {
    switch(desc) {
    case true:
      return true;
    case tls.Alert.Description.bad_certificate:
      return forge.pki.certificateError.bad_certificate;
    case tls.Alert.Description.unsupported_certificate:
      return forge.pki.certificateError.unsupported_certificate;
    case tls.Alert.Description.certificate_revoked:
      return forge.pki.certificateError.certificate_revoked;
    case tls.Alert.Description.certificate_expired:
      return forge.pki.certificateError.certificate_expired;
    case tls.Alert.Description.certificate_unknown:
      return forge.pki.certificateError.certificate_unknown;
    case tls.Alert.Description.unknown_ca:
      return forge.pki.certificateError.unknown_ca;
    default:
      return forge.pki.certificateError.bad_certificate;
    }
  }
docs: Maps a tls.Alert.Description to a pki.certificateError.
  
  @param desc the alert description.
  
  @return the certificate error.