code: func (d *Accessor) RevokeCertificate(serial, aki string, reasonCode int) error {
  	err := d.checkDB()
  	if err != nil {
  		return err
  	}
  
  	result, err := d.db.NamedExec(updateRevokeSQL, &certdb.CertificateRecord{
  		AKI:    aki,
  		Reason: reasonCode,
  		Serial: serial,
  	})
  	if err != nil {
  		return wrapSQLError(err)
  	}
  
  	numRowsAffected, err := result.RowsAffected()
  
  	if numRowsAffected == 0 {
  		return cferr.Wrap(cferr.CertStoreError, cferr.RecordNotFound, fmt.Errorf("failed to revoke the certificate: certificate not found"))
  	}
  
  	if numRowsAffected != 1 {
  		return wrapSQLError(fmt.Errorf("%d rows are affected, should be 1 row", numRowsAffected))
  	}
  
  	return err
  }
docs: // RevokeCertificate updates a certificate with a given serial number and marks it revoked.