Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 390735
Collapse All | Expand All

(-)a/lib/pk-libgcrypt.c (-16 / +16 lines)
Lines 112-118 _wrap_gcry_pk_encrypt (gnutls_pk_algorithm_t algo, Link Here
112
      goto cleanup;
112
      goto cleanup;
113
    }
113
    }
114
114
115
  res = gcry_sexp_nth_mpi (list, 1, 0);
115
  res = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
116
  gcry_sexp_release (list);
116
  gcry_sexp_release (list);
117
  if (res == NULL)
117
  if (res == NULL)
118
    {
118
    {
Lines 202-208 _wrap_gcry_pk_decrypt (gnutls_pk_algorithm_t algo, Link Here
202
      goto cleanup;
202
      goto cleanup;
203
    }
203
    }
204
204
205
  res = gcry_sexp_nth_mpi (s_plain, 0, 0);
205
  res = gcry_sexp_nth_mpi (s_plain, 0, GCRYMPI_FMT_USG);
206
  if (res == NULL)
206
  if (res == NULL)
207
    {
207
    {
208
      gnutls_assert ();
208
      gnutls_assert ();
Lines 327-333 _wrap_gcry_pk_sign (gnutls_pk_algorithm_t algo, gnutls_datum_t * signature, Link Here
327
	    goto cleanup;
327
	    goto cleanup;
328
	  }
328
	  }
329
329
330
	res[0] = gcry_sexp_nth_mpi (list, 1, 0);
330
	res[0] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
331
	gcry_sexp_release (list);
331
	gcry_sexp_release (list);
332
332
333
	list = gcry_sexp_find_token (s_sig, "s", 0);
333
	list = gcry_sexp_find_token (s_sig, "s", 0);
Lines 338-344 _wrap_gcry_pk_sign (gnutls_pk_algorithm_t algo, gnutls_datum_t * signature, Link Here
338
	    goto cleanup;
338
	    goto cleanup;
339
	  }
339
	  }
340
340
341
	res[1] = gcry_sexp_nth_mpi (list, 1, 0);
341
	res[1] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
342
	gcry_sexp_release (list);
342
	gcry_sexp_release (list);
343
343
344
	ret = _gnutls_encode_ber_rs (signature, res[0], res[1]);
344
	ret = _gnutls_encode_ber_rs (signature, res[0], res[1]);
Lines 360-366 _wrap_gcry_pk_sign (gnutls_pk_algorithm_t algo, gnutls_datum_t * signature, Link Here
360
	    goto cleanup;
360
	    goto cleanup;
361
	  }
361
	  }
362
362
363
	res[0] = gcry_sexp_nth_mpi (list, 1, 0);
363
	res[0] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
364
	gcry_sexp_release (list);
364
	gcry_sexp_release (list);
365
365
366
	ret = _gnutls_mpi_dprint (res[0], signature);
366
	ret = _gnutls_mpi_dprint (res[0], signature);
Lines 559-565 _dsa_generate_params (bigint_t * resarr, int *resarr_len, int bits) Link Here
559
      return GNUTLS_E_INTERNAL_ERROR;
559
      return GNUTLS_E_INTERNAL_ERROR;
560
    }
560
    }
561
561
562
  resarr[0] = gcry_sexp_nth_mpi (list, 1, 0);
562
  resarr[0] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
563
  gcry_sexp_release (list);
563
  gcry_sexp_release (list);
564
564
565
  list = gcry_sexp_find_token (key, "q", 0);
565
  list = gcry_sexp_find_token (key, "q", 0);
Lines 570-576 _dsa_generate_params (bigint_t * resarr, int *resarr_len, int bits) Link Here
570
      return GNUTLS_E_INTERNAL_ERROR;
570
      return GNUTLS_E_INTERNAL_ERROR;
571
    }
571
    }
572
572
573
  resarr[1] = gcry_sexp_nth_mpi (list, 1, 0);
573
  resarr[1] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
574
  gcry_sexp_release (list);
574
  gcry_sexp_release (list);
575
575
576
  list = gcry_sexp_find_token (key, "g", 0);
576
  list = gcry_sexp_find_token (key, "g", 0);
Lines 581-587 _dsa_generate_params (bigint_t * resarr, int *resarr_len, int bits) Link Here
581
      return GNUTLS_E_INTERNAL_ERROR;
581
      return GNUTLS_E_INTERNAL_ERROR;
582
    }
582
    }
583
583
584
  resarr[2] = gcry_sexp_nth_mpi (list, 1, 0);
584
  resarr[2] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
585
  gcry_sexp_release (list);
585
  gcry_sexp_release (list);
586
586
587
  list = gcry_sexp_find_token (key, "y", 0);
587
  list = gcry_sexp_find_token (key, "y", 0);
Lines 592-598 _dsa_generate_params (bigint_t * resarr, int *resarr_len, int bits) Link Here
592
      return GNUTLS_E_INTERNAL_ERROR;
592
      return GNUTLS_E_INTERNAL_ERROR;
593
    }
593
    }
594
594
595
  resarr[3] = gcry_sexp_nth_mpi (list, 1, 0);
595
  resarr[3] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
596
  gcry_sexp_release (list);
596
  gcry_sexp_release (list);
597
597
598
598
Lines 604-610 _dsa_generate_params (bigint_t * resarr, int *resarr_len, int bits) Link Here
604
      return GNUTLS_E_INTERNAL_ERROR;
604
      return GNUTLS_E_INTERNAL_ERROR;
605
    }
605
    }
606
606
607
  resarr[4] = gcry_sexp_nth_mpi (list, 1, 0);
607
  resarr[4] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
608
608
609
  gcry_sexp_release (list);
609
  gcry_sexp_release (list);
610
  gcry_sexp_release (key);
610
  gcry_sexp_release (key);
Lines 653-659 _rsa_generate_params (bigint_t * resarr, int *resarr_len, int bits) Link Here
653
      return GNUTLS_E_INTERNAL_ERROR;
653
      return GNUTLS_E_INTERNAL_ERROR;
654
    }
654
    }
655
655
656
  resarr[0] = gcry_sexp_nth_mpi (list, 1, 0);
656
  resarr[0] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
657
  gcry_sexp_release (list);
657
  gcry_sexp_release (list);
658
658
659
  list = gcry_sexp_find_token (key, "e", 0);
659
  list = gcry_sexp_find_token (key, "e", 0);
Lines 664-670 _rsa_generate_params (bigint_t * resarr, int *resarr_len, int bits) Link Here
664
      return GNUTLS_E_INTERNAL_ERROR;
664
      return GNUTLS_E_INTERNAL_ERROR;
665
    }
665
    }
666
666
667
  resarr[1] = gcry_sexp_nth_mpi (list, 1, 0);
667
  resarr[1] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
668
  gcry_sexp_release (list);
668
  gcry_sexp_release (list);
669
669
670
  list = gcry_sexp_find_token (key, "d", 0);
670
  list = gcry_sexp_find_token (key, "d", 0);
Lines 675-681 _rsa_generate_params (bigint_t * resarr, int *resarr_len, int bits) Link Here
675
      return GNUTLS_E_INTERNAL_ERROR;
675
      return GNUTLS_E_INTERNAL_ERROR;
676
    }
676
    }
677
677
678
  resarr[2] = gcry_sexp_nth_mpi (list, 1, 0);
678
  resarr[2] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
679
  gcry_sexp_release (list);
679
  gcry_sexp_release (list);
680
680
681
  list = gcry_sexp_find_token (key, "p", 0);
681
  list = gcry_sexp_find_token (key, "p", 0);
Lines 686-692 _rsa_generate_params (bigint_t * resarr, int *resarr_len, int bits) Link Here
686
      return GNUTLS_E_INTERNAL_ERROR;
686
      return GNUTLS_E_INTERNAL_ERROR;
687
    }
687
    }
688
688
689
  resarr[3] = gcry_sexp_nth_mpi (list, 1, 0);
689
  resarr[3] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
690
  gcry_sexp_release (list);
690
  gcry_sexp_release (list);
691
691
692
692
Lines 698-704 _rsa_generate_params (bigint_t * resarr, int *resarr_len, int bits) Link Here
698
      return GNUTLS_E_INTERNAL_ERROR;
698
      return GNUTLS_E_INTERNAL_ERROR;
699
    }
699
    }
700
700
701
  resarr[4] = gcry_sexp_nth_mpi (list, 1, 0);
701
  resarr[4] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
702
  gcry_sexp_release (list);
702
  gcry_sexp_release (list);
703
703
704
704
Lines 710-716 _rsa_generate_params (bigint_t * resarr, int *resarr_len, int bits) Link Here
710
      return GNUTLS_E_INTERNAL_ERROR;
710
      return GNUTLS_E_INTERNAL_ERROR;
711
    }
711
    }
712
712
713
  resarr[5] = gcry_sexp_nth_mpi (list, 1, 0);
713
  resarr[5] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
714
714
715
  gcry_sexp_release (list);
715
  gcry_sexp_release (list);
716
  gcry_sexp_release (key);
716
  gcry_sexp_release (key);

Return to bug 390735