Hello Ain, 
Did u find any solution to this. Even Iam facing same issue.

On Saturday, January 30, 2016 at 10:06:16 PM UTC+5:30, Ain wrote:
>
> Hi
>
> I created an self signed pk/cert using command:
>
> openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 
> -nodes
>
> (btw openssl version reports "OpenSSL 1.0.1f 6 Jan 2014"). But trying to 
> use this key with
> x509.ParsePKCS1PrivateKey()
> fails with following error:
>
> asn1: structure error: tags don't match (2 vs {class:0 tag:16 length:13 
> isCompound:true}) {optional:false explicit:false application:false 
> defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false 
> omitEmpty:false}  @5
>
> I found an old (in the end of 2011) thread 
> https://groups.google.com/forum/#!msg/golang-nuts/hHFbXwyePDA/8l6IcVwncnwJ 
> where AGL suggest to use command
>
> openssl rsa -in key.pem -out rsakey.pem
>
> to convert the key. Indeed that works, but AGL also wrote that he made the 
> nessesary changes so that the both key formats would be accepted. Now has 
> something changed again or is it me doing something wrong? Should this be 
> filed as bug?
>
> go version go1.5.2 linux/amd64
>
>
> TIA
> ain
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/f8aeef48-ba6c-4d33-b8e3-b63bf5380428%40googlegroups.com.

Reply via email to