summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/pkcs1
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2010-08-09 08:09:54 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2010-08-09 08:09:54 +0000
commitb8064f4099997a9e2179f3ad4ace605f5ccac3a1 (patch)
tree81778e976b476374c48b4fe83d084b986b890421 /src/libstrongswan/plugins/pkcs1
parent1ac70afcc1f7d6d2738a34308810719b0976d29f (diff)
downloadvyos-strongswan-b8064f4099997a9e2179f3ad4ace605f5ccac3a1.tar.gz
vyos-strongswan-b8064f4099997a9e2179f3ad4ace605f5ccac3a1.zip
[svn-upgrade] new version strongswan (4.4.1)
Diffstat (limited to 'src/libstrongswan/plugins/pkcs1')
-rw-r--r--src/libstrongswan/plugins/pkcs1/Makefile.in2
-rw-r--r--src/libstrongswan/plugins/pkcs1/pkcs1_encoder.c30
-rw-r--r--src/libstrongswan/plugins/pkcs1/pkcs1_encoder.h4
3 files changed, 18 insertions, 18 deletions
diff --git a/src/libstrongswan/plugins/pkcs1/Makefile.in b/src/libstrongswan/plugins/pkcs1/Makefile.in
index 3fdcd0590..947f52d82 100644
--- a/src/libstrongswan/plugins/pkcs1/Makefile.in
+++ b/src/libstrongswan/plugins/pkcs1/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
diff --git a/src/libstrongswan/plugins/pkcs1/pkcs1_encoder.c b/src/libstrongswan/plugins/pkcs1/pkcs1_encoder.c
index e46062d97..6957b2ad1 100644
--- a/src/libstrongswan/plugins/pkcs1/pkcs1_encoder.c
+++ b/src/libstrongswan/plugins/pkcs1/pkcs1_encoder.c
@@ -26,8 +26,8 @@ bool build_pub(chunk_t *encoding, va_list args)
{
chunk_t n, e;
- if (key_encoding_args(args, KEY_PART_RSA_MODULUS, &n,
- KEY_PART_RSA_PUB_EXP, &e, KEY_PART_END))
+ if (cred_encoding_args(args, CRED_PART_RSA_MODULUS, &n,
+ CRED_PART_RSA_PUB_EXP, &e, CRED_PART_END))
{
*encoding = asn1_wrap(ASN1_SEQUENCE, "mm",
asn1_wrap(ASN1_INTEGER, "c", n),
@@ -44,8 +44,8 @@ bool build_pub_info(chunk_t *encoding, va_list args)
{
chunk_t n, e;
- if (key_encoding_args(args, KEY_PART_RSA_MODULUS, &n,
- KEY_PART_RSA_PUB_EXP, &e, KEY_PART_END))
+ if (cred_encoding_args(args, CRED_PART_RSA_MODULUS, &n,
+ CRED_PART_RSA_PUB_EXP, &e, CRED_PART_END))
{
*encoding = asn1_wrap(ASN1_SEQUENCE, "mm",
asn1_algorithmIdentifier(OID_RSA_ENCRYPTION),
@@ -65,11 +65,11 @@ bool build_priv(chunk_t *encoding, va_list args)
{
chunk_t n, e, d, p, q, exp1, exp2, coeff;
- if (key_encoding_args(args, KEY_PART_RSA_MODULUS, &n,
- KEY_PART_RSA_PUB_EXP, &e, KEY_PART_RSA_PRIV_EXP, &d,
- KEY_PART_RSA_PRIME1, &p, KEY_PART_RSA_PRIME2, &q,
- KEY_PART_RSA_EXP1, &exp1, KEY_PART_RSA_EXP2, &exp2,
- KEY_PART_RSA_COEFF, &coeff, KEY_PART_END))
+ if (cred_encoding_args(args, CRED_PART_RSA_MODULUS, &n,
+ CRED_PART_RSA_PUB_EXP, &e, CRED_PART_RSA_PRIV_EXP, &d,
+ CRED_PART_RSA_PRIME1, &p, CRED_PART_RSA_PRIME2, &q,
+ CRED_PART_RSA_EXP1, &exp1, CRED_PART_RSA_EXP2, &exp2,
+ CRED_PART_RSA_COEFF, &coeff, CRED_PART_END))
{
*encoding = asn1_wrap(ASN1_SEQUENCE, "cmmssssss",
ASN1_INTEGER_0,
@@ -138,20 +138,20 @@ static bool build_sha1(chunk_t *encoding, va_list args)
/**
* See header.
*/
-bool pkcs1_encoder_encode(key_encoding_type_t type, chunk_t *encoding,
+bool pkcs1_encoder_encode(cred_encoding_type_t type, chunk_t *encoding,
va_list args)
{
switch (type)
{
- case KEY_ID_PUBKEY_INFO_SHA1:
+ case KEYID_PUBKEY_INFO_SHA1:
return build_info_sha1(encoding, args);
- case KEY_ID_PUBKEY_SHA1:
+ case KEYID_PUBKEY_SHA1:
return build_sha1(encoding, args);
- case KEY_PUB_ASN1_DER:
+ case PUBKEY_ASN1_DER:
return build_pub(encoding, args);
- case KEY_PUB_SPKI_ASN1_DER:
+ case PUBKEY_SPKI_ASN1_DER:
return build_pub_info(encoding, args);
- case KEY_PRIV_ASN1_DER:
+ case PRIVKEY_ASN1_DER:
return build_priv(encoding, args);
default:
return FALSE;
diff --git a/src/libstrongswan/plugins/pkcs1/pkcs1_encoder.h b/src/libstrongswan/plugins/pkcs1/pkcs1_encoder.h
index 11d9f27f2..2eec736f1 100644
--- a/src/libstrongswan/plugins/pkcs1/pkcs1_encoder.h
+++ b/src/libstrongswan/plugins/pkcs1/pkcs1_encoder.h
@@ -21,12 +21,12 @@
#ifndef PKCS1_ENCODER_H_
#define PKCS1_ENCODER_H_
-#include <credentials/keys/key_encoding.h>
+#include <credentials/cred_encoding.h>
/**
* Encoding function for PKCS#1/ASN.1 fingerprints/key formats.
*/
-bool pkcs1_encoder_encode(key_encoding_type_t type, chunk_t *encoding,
+bool pkcs1_encoder_encode(cred_encoding_type_t type, chunk_t *encoding,
va_list args);
#endif /** PKCS1_ENCODER_H_ @}*/