[strongSwan] file content is not binary ASN.1
Andreas Steffen
andreas.steffen at strongswan.org
Thu Oct 6 10:08:44 CEST 2016
Hi Ravi,
: 08[ASN] file content is not binary ASN.1
is just an informational message telling you that an
automatic conversion from PEM to ASN.1 format
is being tried. If the pem plugin is present then
this operation should succeed.
Regards
Andreas
P.S. Please do not cross-post to the developers list.
On 05.10.2016 22:07, Ravi Kanth Vanapalli wrote:
> Hi all,
> I am trying to use TLS to setup a connection to a gateway
> programmatically.
>
> Used the code below.
> ------------------------
>
>
>
> private_key_t *key;
> char path[512]="/system/etc/user1_private.pem";
> key = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, KEY_RSA,
> BUILD_FROM_FILE, path, BUILD_END);
> if (!key) {
> DBG1(DBG_DMN, "Parsing private key failed");
> }
>
>
> ----------------------------------
> On running, I do not see "Parsing private key failed". But I see the
> print as below
>
>
> 10-05 15:31:37.266 4630 4650 D : 08[ASN] file content is not
> binary ASN.1
> 10-05 15:31:37.266 4630 4650 D : 08[ASN] -----BEGIN RSA PRIVATE
> KEY---
> 10-05 15:31:37.266 4630 4650 D : 08[ASN] -----END RSA PRIVATE
> KEY-----
>
> My private key file is below. Can you help me find the issue
>
> -----BEGIN RSA PRIVATE KEY-----
> MIIEpAIBAAKCAQEAsVqa9nZctF/gxA26RTN3oSs6MbNiJYFP6jKpVJRAjflB17rC
> 7Pg6bf5NBr4SdgR0YyklI17wvzwEWxCDjJZHAw/CxeN/icSCsN6VehHoJ6ROhPOo
> jdRs2MsyYyut8OZiSoG/jHVmLQWVgJIZvSOxxCGDj+xYqEbd6YhO8ejPrrh4v3/r
> NJW6glu6PbbrgNfwtozMeNOQrXnETmSLBNJ5RlM+sntzivq6t8QJzDcjmf2OV3Xk
> GwvNaLeOvoq55dbPf1wpuVyaU3npZphQe4EDsrX3p05DhYEW6rwUXc9iyF98D/HR
> JTEnCN+Ri/pwXWyuUlEN/1Bq09nU/L6KfAQ8HwIDAQABAoIBADnNvhP2H+DqHufH
> UZ6cV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qErTWgqRkc95A1qCyqsl/oU1swLMDmqe6F4rceFvdXuHkIyWGzL
> Op8l/Nj1YzDRiGcQEyEooaGrgS1rvas2Q+nzxHMFBypVQsZE4y6F1qJ5dyr0xRGE
> XeWrqWY/8UjLZzgDktjghg7DCoQEjI+c0rUs8ld6fFv4iK9ecI0Gng==
> -----END RSA PRIVATE KEY-----
>
>
>
> --
> Regards,
> RaviKanth VN Vanapalli
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.strongswan.org
> https://lists.strongswan.org/mailman/listinfo/users
>
--
======================================================================
Andreas Steffen andreas.steffen at strongswan.org
strongSwan - the Open Source VPN Solution! www.strongswan.org
Institute for Internet Technologies and Applications
University of Applied Sciences Rapperswil
CH-8640 Rapperswil (Switzerland)
===========================================================[ITA-HSR]==
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3859 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.strongswan.org/pipermail/users/attachments/20161006/068e2218/attachment-0001.bin>
More information about the Users
mailing list