  We present the model of cosmic rays acceleration at ultrarelativistic
subshocks and confront it with the observations of gamma-ray bursts and
blazars. We investigate cosmic rays acceleration in shocks with Lorentz factors
in the range 3 - 40. We show that fluctuations of the magnetic field downstream
of the shock do not play an important role in the acceleration process. Results
of numerical simulations for shocks with considered Lorentz factors and
perpendicular magnetic field inclinations are presented. We fit the derived
particle energy spectral index dependence on fluctuations of the magnetic field
upstream and Lorentz factor of the shock with a function.
