summaryrefslogtreecommitdiff
path: root/lib/x509
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-12-08 23:32:14 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-12-08 23:32:14 +0100
commit0ffb3240c6dbd8c834d2617ed0e0397f5809f807 (patch)
treec306193c7c22e6e163f850140ff2d23bd02e5b84 /lib/x509
parentec2ee9f941065ac96843b0174cf39e349b2752f4 (diff)
downloadgnutls-0ffb3240c6dbd8c834d2617ed0e0397f5809f807.tar.gz
export_raw() functions now add leading zero in mpis.
Diffstat (limited to 'lib/x509')
-rw-r--r--lib/x509/privkey.c26
-rw-r--r--lib/x509/x509.c12
2 files changed, 19 insertions, 19 deletions
diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c
index 367f901bb2..baa39db8f7 100644
--- a/lib/x509/privkey.c
+++ b/lib/x509/privkey.c
@@ -957,7 +957,7 @@ gnutls_x509_privkey_export_rsa_raw2 (gnutls_x509_privkey_t key,
goto error;
}
- ret = _gnutls_mpi_dprint (pk_params.params[0], m);
+ ret = _gnutls_mpi_dprint_lz (pk_params.params[0], m);
if (ret < 0)
{
gnutls_assert ();
@@ -965,7 +965,7 @@ gnutls_x509_privkey_export_rsa_raw2 (gnutls_x509_privkey_t key,
}
/* E */
- ret = _gnutls_mpi_dprint (pk_params.params[1], e);
+ ret = _gnutls_mpi_dprint_lz (pk_params.params[1], e);
if (ret < 0)
{
gnutls_assert ();
@@ -973,7 +973,7 @@ gnutls_x509_privkey_export_rsa_raw2 (gnutls_x509_privkey_t key,
}
/* D */
- ret = _gnutls_mpi_dprint (pk_params.params[2], d);
+ ret = _gnutls_mpi_dprint_lz (pk_params.params[2], d);
if (ret < 0)
{
gnutls_assert ();
@@ -981,7 +981,7 @@ gnutls_x509_privkey_export_rsa_raw2 (gnutls_x509_privkey_t key,
}
/* P */
- ret = _gnutls_mpi_dprint (pk_params.params[3], p);
+ ret = _gnutls_mpi_dprint_lz (pk_params.params[3], p);
if (ret < 0)
{
gnutls_assert ();
@@ -989,7 +989,7 @@ gnutls_x509_privkey_export_rsa_raw2 (gnutls_x509_privkey_t key,
}
/* Q */
- ret = _gnutls_mpi_dprint (pk_params.params[4], q);
+ ret = _gnutls_mpi_dprint_lz (pk_params.params[4], q);
if (ret < 0)
{
gnutls_assert ();
@@ -997,7 +997,7 @@ gnutls_x509_privkey_export_rsa_raw2 (gnutls_x509_privkey_t key,
}
/* U */
- ret = _gnutls_mpi_dprint (key->params[5], u);
+ ret = _gnutls_mpi_dprint_lz (key->params[5], u);
if (ret < 0)
{
gnutls_assert ();
@@ -1007,7 +1007,7 @@ gnutls_x509_privkey_export_rsa_raw2 (gnutls_x509_privkey_t key,
/* E1 */
if (e1)
{
- ret = _gnutls_mpi_dprint (key->params[6], e1);
+ ret = _gnutls_mpi_dprint_lz (key->params[6], e1);
if (ret < 0)
{
gnutls_assert ();
@@ -1018,7 +1018,7 @@ gnutls_x509_privkey_export_rsa_raw2 (gnutls_x509_privkey_t key,
/* E2 */
if (e2)
{
- ret = _gnutls_mpi_dprint (key->params[7], e2);
+ ret = _gnutls_mpi_dprint_lz (key->params[7], e2);
if (ret < 0)
{
gnutls_assert ();
@@ -1072,7 +1072,7 @@ gnutls_x509_privkey_export_dsa_raw (gnutls_x509_privkey_t key,
}
/* P */
- ret = _gnutls_mpi_dprint (key->params[0], p);
+ ret = _gnutls_mpi_dprint_lz (key->params[0], p);
if (ret < 0)
{
gnutls_assert ();
@@ -1080,7 +1080,7 @@ gnutls_x509_privkey_export_dsa_raw (gnutls_x509_privkey_t key,
}
/* Q */
- ret = _gnutls_mpi_dprint (key->params[1], q);
+ ret = _gnutls_mpi_dprint_lz (key->params[1], q);
if (ret < 0)
{
gnutls_assert ();
@@ -1090,7 +1090,7 @@ gnutls_x509_privkey_export_dsa_raw (gnutls_x509_privkey_t key,
/* G */
- ret = _gnutls_mpi_dprint (key->params[2], g);
+ ret = _gnutls_mpi_dprint_lz (key->params[2], g);
if (ret < 0)
{
gnutls_assert ();
@@ -1101,7 +1101,7 @@ gnutls_x509_privkey_export_dsa_raw (gnutls_x509_privkey_t key,
/* Y */
- ret = _gnutls_mpi_dprint (key->params[3], y);
+ ret = _gnutls_mpi_dprint_lz (key->params[3], y);
if (ret < 0)
{
gnutls_assert ();
@@ -1112,7 +1112,7 @@ gnutls_x509_privkey_export_dsa_raw (gnutls_x509_privkey_t key,
}
/* X */
- ret = _gnutls_mpi_dprint (key->params[4], x);
+ ret = _gnutls_mpi_dprint_lz (key->params[4], x);
if (ret < 0)
{
gnutls_assert ();
diff --git a/lib/x509/x509.c b/lib/x509/x509.c
index c9b756a6f6..12d13320d9 100644
--- a/lib/x509/x509.c
+++ b/lib/x509/x509.c
@@ -2933,14 +2933,14 @@ gnutls_x509_crt_get_pk_rsa_raw (gnutls_x509_crt_t crt,
return ret;
}
- ret = _gnutls_mpi_dprint (params[0], m);
+ ret = _gnutls_mpi_dprint_lz (params[0], m);
if (ret < 0)
{
gnutls_assert ();
goto cleanup;
}
- ret = _gnutls_mpi_dprint (params[1], e);
+ ret = _gnutls_mpi_dprint_lz (params[1], e);
if (ret < 0)
{
gnutls_assert ();
@@ -3004,7 +3004,7 @@ gnutls_x509_crt_get_pk_dsa_raw (gnutls_x509_crt_t crt,
/* P */
- ret = _gnutls_mpi_dprint (params[0], p);
+ ret = _gnutls_mpi_dprint_lz (params[0], p);
if (ret < 0)
{
gnutls_assert ();
@@ -3012,7 +3012,7 @@ gnutls_x509_crt_get_pk_dsa_raw (gnutls_x509_crt_t crt,
}
/* Q */
- ret = _gnutls_mpi_dprint (params[1], q);
+ ret = _gnutls_mpi_dprint_lz (params[1], q);
if (ret < 0)
{
gnutls_assert ();
@@ -3022,7 +3022,7 @@ gnutls_x509_crt_get_pk_dsa_raw (gnutls_x509_crt_t crt,
/* G */
- ret = _gnutls_mpi_dprint (params[2], g);
+ ret = _gnutls_mpi_dprint_lz (params[2], g);
if (ret < 0)
{
gnutls_assert ();
@@ -3033,7 +3033,7 @@ gnutls_x509_crt_get_pk_dsa_raw (gnutls_x509_crt_t crt,
/* Y */
- ret = _gnutls_mpi_dprint (params[3], y);
+ ret = _gnutls_mpi_dprint_lz (params[3], y);
if (ret < 0)
{
gnutls_assert ();