aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2009-06-09 13:27:59 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2009-06-09 13:27:59 +0200
commit2d870072fa22ce4fa06d3103ec65b2b12fcd6ff7 (patch)
tree11ec0cc56bbf1b18a284586b3caf159f436621a2 /src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c
parenta038ef2bb133f8915637d654e4f83ce50d4966b8 (diff)
downloadstrongswan-2d870072fa22ce4fa06d3103ec65b2b12fcd6ff7.tar.bz2
strongswan-2d870072fa22ce4fa06d3103ec65b2b12fcd6ff7.tar.xz
asn1_integer() ensures correct DER encoding of ASN1_INTEGER (two's complement)
Diffstat (limited to 'src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c')
-rw-r--r--src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c b/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c
index 4c84ad632..bdb5d7feb 100644
--- a/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c
+++ b/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c
@@ -216,8 +216,8 @@ static identification_t *get_id(private_gcrypt_rsa_public_key_t *this,
static chunk_t get_encoding(private_gcrypt_rsa_public_key_t *this)
{
return asn1_wrap(ASN1_SEQUENCE, "mm",
- asn1_wrap(ASN1_INTEGER, "m", gcrypt_rsa_find_token(this->key, "n")),
- asn1_wrap(ASN1_INTEGER, "m", gcrypt_rsa_find_token(this->key, "e")));
+ asn1_integer("m", gcrypt_rsa_find_token(this->key, "n")),
+ asn1_integer("m", gcrypt_rsa_find_token(this->key, "e")));
}
/**