FAQ

On Friday, October 12, 2012 3:31:25 AM UTC-4, Paul van Brouwershaven wrote:

I'm try to get the bit size of the public key part of a certificate but
for some reason this is not listed by default in the go x509 Certificate
struct.

http://golang.org/pkg/crypto/x509/#Certificate

Does anyone know an other (easy) way to calculate the key size of a
certificate?
The public key bitsize is obviously meaningless unless you know the
algorithm so you can do a type switch on PublicKey and access it from
there. (Of course, you have to handle the case where the type is unknown in
order to be future proof.)


Cheers

AGL

--

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedOct 12, '12 at 7:31a
activeOct 13, '12 at 9:13p
posts3
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase