summaryrefslogtreecommitdiff
path: root/src/openac/build.c
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2008-03-30 08:31:24 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2008-03-30 08:31:24 +0000
commit1c088a8b6237ec67f63c23f97a0f2dc4e99af869 (patch)
tree7fff7c8329d19bbaa910312e746a116f28fbfaf5 /src/openac/build.c
parentbcc8f7ca7fd8e8ff6e8a4d579251458313133598 (diff)
downloadvyos-strongswan-1c088a8b6237ec67f63c23f97a0f2dc4e99af869.tar.gz
vyos-strongswan-1c088a8b6237ec67f63c23f97a0f2dc4e99af869.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.1.11)
Diffstat (limited to 'src/openac/build.c')
-rw-r--r--src/openac/build.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/openac/build.c b/src/openac/build.c
index d03e73048..40c8b7964 100644
--- a/src/openac/build.c
+++ b/src/openac/build.c
@@ -13,7 +13,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
- * RCSID $Id: build.c 3270 2007-10-08 20:09:57Z andreas $
+ * RCSID $Id: build.c 3424 2008-01-22 10:34:44Z andreas $
*/
#include <stdlib.h>
@@ -167,7 +167,7 @@ static chunk_t build_attr_cert_info(void)
ASN1_INTEGER_1,
build_holder(),
build_v2_form(),
- ASN1_sha1WithRSA_id,
+ asn1_algorithmIdentifier(OID_SHA1_WITH_RSA),
asn1_simple_object(ASN1_INTEGER, serial),
build_attr_cert_validity(),
build_attributes(),
@@ -180,21 +180,14 @@ static chunk_t build_attr_cert_info(void)
*/
chunk_t build_attr_cert(void)
{
- u_char *pos;
- chunk_t rawSignature, signatureValue;
+ chunk_t signatureValue;
chunk_t attributeCertificateInfo = build_attr_cert_info();
- /* build the signature */
signerkey->build_emsa_pkcs1_signature(signerkey, HASH_SHA1,
- attributeCertificateInfo, &rawSignature);
- pos = build_asn1_object(&signatureValue, ASN1_BIT_STRING,
- 1 + rawSignature.len);
- *pos++ = 0x00;
- memcpy(pos, rawSignature.ptr, rawSignature.len);
- free(rawSignature.ptr);
+ attributeCertificateInfo, &signatureValue);
return asn1_wrap(ASN1_SEQUENCE, "mcm",
attributeCertificateInfo,
- ASN1_sha1WithRSA_id,
- signatureValue);
+ asn1_algorithmIdentifier(OID_SHA1_WITH_RSA),
+ asn1_bitstring("m", signatureValue));
}