SubjectKeyIdentifier construction in BC1.6

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SubjectKeyIdentifier construction in BC1.6

Usha Nayak
Hello

We are planning to move to BouncyCastle 1.6 version (bcprov-jdk15on-161.jar). At the moment, we are  not planning to use bkpkix-jdk15on-161.jar.

In our codebase, we were constructing SKI in the following way :
new SubjectKeyIdentifier( SubjectPublicKeyInfo )  -- 

Since, this constructor  longer exists in 1.6, We were thinking of constructing SubjectKeyIdentifier with the byte[] :
new  SubjectKeyIdentifier( SubjectPublicKeyInfo.getEncoded() )  

We are unsure though if this is the right way to generate SKI?

Please do clarify this issue ?

Thanks..
Reply | Threaded
Open this post in threaded view
|

Re: SubjectKeyIdentifier construction in BC1.6

David Hook-3

You need to use the same approach as X509ExtensionUtils.calculateIdentifier() in the bcpkix package.

Regards,

David

On 19/2/19 3:47 am, Usha Nayak wrote:
Hello

We are planning to move to BouncyCastle 1.6 version (bcprov-jdk15on-161.jar). At the moment, we are  not planning to use bkpkix-jdk15on-161.jar.

In our codebase, we were constructing SKI in the following way :
new SubjectKeyIdentifier( SubjectPublicKeyInfo )  -- 

Since, this constructor  longer exists in 1.6, We were thinking of constructing SubjectKeyIdentifier with the byte[] :
new  SubjectKeyIdentifier( SubjectPublicKeyInfo.getEncoded() )  

We are unsure though if this is the right way to generate SKI?

Please do clarify this issue ?

Thanks..