summaryrefslogtreecommitdiff
path: root/src/scepclient
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/scepclient
parent1ac70afcc1f7d6d2738a34308810719b0976d29f (diff)
downloadvyos-strongswan-b8064f4099997a9e2179f3ad4ace605f5ccac3a1.tar.gz
vyos-strongswan-b8064f4099997a9e2179f3ad4ace605f5ccac3a1.zip
[svn-upgrade] new version strongswan (4.4.1)
Diffstat (limited to 'src/scepclient')
-rw-r--r--src/scepclient/Makefile.in2
-rw-r--r--src/scepclient/scep.c2
-rw-r--r--src/scepclient/scepclient.c15
3 files changed, 9 insertions, 10 deletions
diff --git a/src/scepclient/Makefile.in b/src/scepclient/Makefile.in
index db930756a..7832e5f66 100644
--- a/src/scepclient/Makefile.in
+++ b/src/scepclient/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/scepclient/scep.c b/src/scepclient/scep.c
index 598705636..29f6eab70 100644
--- a/src/scepclient/scep.c
+++ b/src/scepclient/scep.c
@@ -281,7 +281,7 @@ void scep_generate_transaction_id(public_key_t *key, chunk_t *transID,
bool msb_set;
u_char *pos;
- key->get_encoding(key, KEY_PUB_ASN1_DER, &keyEncoding);
+ key->get_encoding(key, PUBKEY_ASN1_DER, &keyEncoding);
keyInfo = asn1_wrap(ASN1_SEQUENCE, "mm",
asn1_algorithmIdentifier(OID_RSA_ENCRYPTION),
diff --git a/src/scepclient/scepclient.c b/src/scepclient/scepclient.c
index 385f6f328..5c32bbdef 100644
--- a/src/scepclient/scepclient.c
+++ b/src/scepclient/scepclient.c
@@ -398,7 +398,7 @@ int main(int argc, char **argv)
transID = chunk_empty;
fingerprint = chunk_empty;
encoding = chunk_empty;
- pkcs10_encoding = chunk_empty;
+ pkcs10_encoding = chunk_empty;
issuerAndSubject = chunk_empty;
challengePassword = chunk_empty;
getCertInitial = chunk_empty;
@@ -866,7 +866,7 @@ int main(int argc, char **argv)
{
exit_scepclient("generating pkcs10 request failed");
}
- pkcs10_encoding = pkcs10_req->get_encoding(pkcs10_req);
+ pkcs10_req->get_encoding(pkcs10_req, CERT_ASN1_DER, &pkcs10_encoding);
fingerprint = scep_generate_pkcs10_fingerprint(pkcs10_encoding);
plog(" fingerprint: %s", fingerprint.ptr);
}
@@ -900,7 +900,7 @@ int main(int argc, char **argv)
DBG(DBG_CONTROL,
DBG_log("building pkcs1 object:")
)
- if (!private_key->get_encoding(private_key, KEY_PRIV_ASN1_DER, &pkcs1) ||
+ if (!private_key->get_encoding(private_key, PRIVKEY_ASN1_DER, &pkcs1) ||
!chunk_write(pkcs1, path, "pkcs1", 0066, force))
{
exit_scepclient("could not write pkcs1 file '%s'", path);
@@ -941,8 +941,7 @@ int main(int argc, char **argv)
{
char *path = concatenate_paths(HOST_CERT_PATH, file_out_cert_self);
- encoding = x509_signer->get_encoding(x509_signer);
- if (!encoding.ptr)
+ if (!x509_signer->get_encoding(x509_signer, CERT_ASN1_DER, &encoding))
{
exit_scepclient("encoding certificate failed");
}
@@ -964,7 +963,7 @@ int main(int argc, char **argv)
*/
{
char *path = concatenate_paths(CA_CERT_PATH, file_in_cacert_enc);
-
+
x509_ca_enc = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509,
BUILD_FROM_FILE, path, BUILD_END);
if (!x509_ca_enc)
@@ -1138,8 +1137,8 @@ int main(int argc, char **argv)
{
exit_scepclient("multiple certs received, only first stored");
}
- encoding = cert->get_encoding(cert);
- if (!chunk_write(encoding, path, "requested cert", 0022, force))
+ if (!cert->get_encoding(cert, CERT_ASN1_DER, &encoding) ||
+ !chunk_write(encoding, path, "requested cert", 0022, force))
{
exit_scepclient("could not write cert file '%s'", path);
}