~ubuntu-branches/ubuntu/saucy/gnutls26/saucy-updates

« back to all changes in this revision

Viewing changes to lib/x509/privkey.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-12-06 18:29:32 UTC
  • mfrom: (12.1.33 sid)
  • Revision ID: package-import@ubuntu.com-20121206182932-iih7i83juh8cdotf
Tags: 2.12.20-2ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Build gnutls-bin from this source package rather than from gnutls28:
    gnutls28's licensing is currently too strict for many of the free
    software packages built against it in Ubuntu main and we only want to
    support a single version.  Bump its version to achieve this.
* Avoid assuming that gets is declared.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1462
1462
    {
1463
1463
    case GNUTLS_PK_DSA:
1464
1464
      ret = _gnutls_dsa_generate_params (key->params, &params_len, bits);
 
1465
      if (ret < 0)
 
1466
        {
 
1467
          gnutls_assert ();
 
1468
          return ret;
 
1469
        }
 
1470
 
1465
1471
      if (params_len != DSA_PRIVATE_PARAMS)
1466
1472
        {
1467
1473
          gnutls_assert ();
1468
1474
          ret = GNUTLS_E_INTERNAL_ERROR;
1469
 
        }
1470
 
 
1471
 
      if (ret < 0)
1472
 
        {
1473
 
          gnutls_assert ();
1474
 
          return ret;
 
1475
          goto cleanup;
1475
1476
        }
1476
1477
 
1477
1478
      ret = _gnutls_asn1_encode_dsa (&key->key, key->params);
1486
1487
      break;
1487
1488
    case GNUTLS_PK_RSA:
1488
1489
      ret = _gnutls_rsa_generate_params (key->params, &params_len, bits);
 
1490
      if (ret < 0)
 
1491
        {
 
1492
          gnutls_assert ();
 
1493
          return ret;
 
1494
        }
 
1495
 
1489
1496
      if (params_len != RSA_PRIVATE_PARAMS)
1490
1497
        {
1491
1498
          gnutls_assert ();
1492
1499
          ret = GNUTLS_E_INTERNAL_ERROR;
1493
 
        }
1494
 
      if (ret < 0)
1495
 
        {
1496
 
          gnutls_assert ();
1497
 
          return ret;
 
1500
          goto cleanup;
1498
1501
        }
1499
1502
 
1500
1503
      ret = _gnutls_asn1_encode_rsa (&key->key, key->params);