예제 #1
0
gcry_error_t
gcry_md_ctl (gcry_md_hd_t hd, int cmd, void *buffer, size_t buflen)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());
  return gpg_error (_gcry_md_ctl (hd, cmd, buffer, buflen));
}
예제 #2
0
gcry_error_t
gcry_md_setkey (gcry_md_hd_t hd, const void *key, size_t keylen)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());
  return gpg_error (_gcry_md_setkey (hd, key, keylen));
}
예제 #3
0
gcry_error_t
gcry_pk_verify (gcry_sexp_t sigval, gcry_sexp_t data, gcry_sexp_t pkey)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());
  return gpg_error (_gcry_pk_verify (sigval, data, pkey));
}
예제 #4
0
gcry_error_t
gcry_pk_testkey (gcry_sexp_t key)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());
  return gpg_error (_gcry_pk_testkey (key));
}
예제 #5
0
gcry_error_t
gcry_md_enable (gcry_md_hd_t hd, int algo)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());
  return gpg_error (_gcry_md_enable (hd, algo));
}
예제 #6
0
gcry_error_t
gcry_random_add_bytes (const void *buffer, size_t length, int quality)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());
  return gpg_error (_gcry_random_add_bytes (buffer, length, quality));
}
예제 #7
0
gcry_error_t
gcry_cipher_ctl (gcry_cipher_hd_t h, int cmd, void *buffer, size_t buflen)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());

  return _gcry_cipher_ctl (h, cmd, buffer, buflen);
}
예제 #8
0
gcry_error_t
gcry_cipher_checktag (gcry_cipher_hd_t hd, const void *intag, size_t taglen)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());

  return gpg_error (_gcry_cipher_checktag (hd, intag, taglen));
}
예제 #9
0
gcry_error_t
gcry_mac_algo_info (int algo, int what, void *buffer, size_t *nbytes)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());

  return gpg_error (_gcry_mac_algo_info (algo, what, buffer, nbytes));
}
예제 #10
0
gcry_error_t
gcry_cipher_gettag (gcry_cipher_hd_t hd, void *outtag, size_t taglen)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());

  return gpg_error (_gcry_cipher_gettag (hd, outtag, taglen));
}
예제 #11
0
gpg_error_t
gcry_cipher_setctr (gcry_cipher_hd_t hd, const void *ctr, size_t ctrlen)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());

  return gcry_error (_gcry_cipher_setctr (hd, ctr, ctrlen));
}
예제 #12
0
gcry_error_t
gcry_mac_setiv (gcry_mac_hd_t hd, const void *iv, size_t ivlen)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());

  return gpg_error (_gcry_mac_setiv (hd, iv, ivlen));
}
예제 #13
0
gcry_error_t
gcry_md_info (gcry_md_hd_t h, int what, void *buffer, size_t *nbytes)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());

  return gpg_error (_gcry_md_info (h, what, buffer, nbytes));
}
예제 #14
0
gcry_error_t
gcry_mac_read (gcry_mac_hd_t hd, void *outbuf, size_t *outlen)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());

  return gpg_error (_gcry_mac_read (hd, outbuf, outlen));
}
예제 #15
0
gcry_error_t
gcry_mac_verify (gcry_mac_hd_t hd, const void *buf, size_t buflen)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());

  return gpg_error (_gcry_mac_verify (hd, buf, buflen));
}
예제 #16
0
gcry_error_t
gcry_cipher_authenticate (gcry_cipher_hd_t hd, const void *abuf, size_t abuflen)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());

  return gpg_error (_gcry_cipher_authenticate (hd, abuf, abuflen));
}
예제 #17
0
gcry_error_t
gcry_pubkey_get_sexp (gcry_sexp_t *r_sexp, int mode, gcry_ctx_t ctx)
{
  if (!fips_is_operational ())
    {
      *r_sexp = NULL;
      return gpg_error (fips_not_operational ());
    }
  return gpg_error (_gcry_pubkey_get_sexp (r_sexp, mode, ctx));
}
예제 #18
0
gcry_error_t
gcry_pk_encrypt (gcry_sexp_t *result, gcry_sexp_t data, gcry_sexp_t pkey)
{
  if (!fips_is_operational ())
    {
      *result = NULL;
      return gpg_error (fips_not_operational ());
    }
  return _gcry_pk_encrypt (result, data, pkey);
}
예제 #19
0
gcry_sexp_t
gcry_pk_get_param (int algo, const char *name)
{
  if (!fips_is_operational ())
    {
      (void)fips_not_operational ();
      return NULL;
    }
  return _gcry_pk_get_param (algo, name);
}
예제 #20
0
void
gcry_md_write (gcry_md_hd_t hd, const void *buffer, size_t length)
{
  if (!fips_is_operational ())
    {
      (void)fips_not_operational ();
      return;
    }
  _gcry_md_write (hd, buffer, length);
}
예제 #21
0
gcry_error_t
gcry_cipher_decrypt (gcry_cipher_hd_t h,
                     void *out, size_t outsize,
                     const void *in, size_t inlen)
{
  if (!fips_is_operational ())
    return gpg_error (fips_not_operational ());

  return gpg_error (_gcry_cipher_decrypt (h, out, outsize, in, inlen));
}
예제 #22
0
gcry_error_t
gcry_pk_genkey (gcry_sexp_t *r_key, gcry_sexp_t s_parms)
{
  if (!fips_is_operational ())
    {
      *r_key = NULL;
      return gpg_error (fips_not_operational ());
    }
  return gpg_error (_gcry_pk_genkey (r_key, s_parms));
}
예제 #23
0
gcry_error_t
gcry_md_copy (gcry_md_hd_t *bhd, gcry_md_hd_t ahd)
{
  if (!fips_is_operational ())
    {
      *bhd = NULL;
      return gpg_error (fips_not_operational ());
    }
  return gpg_error (_gcry_md_copy (bhd, ahd));
}
예제 #24
0
const char *
gcry_pk_get_curve (gcry_sexp_t key, int iterator, unsigned int *r_nbits)
{
  if (!fips_is_operational ())
    {
      (void)fips_not_operational ();
      return NULL;
    }
  return _gcry_pk_get_curve (key, iterator, r_nbits);
}
예제 #25
0
unsigned char *
gcry_pk_get_keygrip (gcry_sexp_t key, unsigned char *array)
{
  if (!fips_is_operational ())
    {
      (void)fips_not_operational ();
      return NULL;
    }
  return _gcry_pk_get_keygrip (key, array);
}
예제 #26
0
gcry_error_t
gcry_pk_sign (gcry_sexp_t *result, gcry_sexp_t data, gcry_sexp_t skey)
{
  if (!fips_is_operational ())
    {
      *result = NULL;
      return gpg_error (fips_not_operational ());
    }
  return gpg_error (_gcry_pk_sign (result, data, skey));
}
예제 #27
0
int
gcry_md_get_algo (gcry_md_hd_t hd)
{
  if (!fips_is_operational ())
    {
      (void)fips_not_operational ();
      fips_signal_error ("used in non-operational state");
      return 0;
    }
  return _gcry_md_get_algo (hd);
}
예제 #28
0
int
gcry_md_is_enabled (gcry_md_hd_t a, int algo)
{
  if (!fips_is_operational ())
    {
      (void)fips_not_operational ();
      return 0;
    }

  return _gcry_md_is_enabled (a, algo);
}
예제 #29
0
void
gcry_randomize (void *buffer, size_t length, enum gcry_random_level level)
{
  if (!fips_is_operational ())
    {
      (void)fips_not_operational ();
      fips_signal_fatal_error ("called in non-operational state");
      fips_noreturn ();
    }
  _gcry_randomize (buffer, length, level);
}
예제 #30
0
void
gcry_create_nonce (void *buffer, size_t length)
{
  if (!fips_is_operational ())
    {
      (void)fips_not_operational ();
      fips_signal_fatal_error ("called in non-operational state");
      fips_noreturn ();
    }
  _gcry_create_nonce (buffer, length);
}