CAPICOM KeyUsage IsDecipherOnlyEnabled crap

Posted on December 9, 2009. Filed under: Woes, bugs | Tags: |

I was trying to parse a certificate (in VBScript) and found that CAPICOM is returning true for call

Certificate.KeyUsage.IsDecipherOnlyEnabled

But in my certificate the DER BITSTRING is set to B1 (10110001). This means Decipher Only bit is not set and should not be considered (actual DER coding is like this 030200b1 . For a NamedBitString unused/unset trailing bits are removed before encoding. )

So I wondered why CAPICOM is showing it as true when this bit is not set. I looked up into capicom.dll and found this:

CKeyUsage::get_IsDigitalSignatureEnabled and CKeyUsage::get_IsDecipherOnlyEnabled are both set to same address of the function implementation and it looks like code inside returns DigitalSignature flag bit.

Because in my certificate DigitalSignature bit is set, I’m getting back true even for “DecipherOnly” flag. GAAAH!!!


Read Full Post | Make a Comment ( None so far )

Recently on A Glitch in Code Takes Nine Department...

BinScope and other SDL tools

Posted on September 24, 2009. Filed under: Tools |

Clearcase MVFS corrupts file – Cannot delete file “Invalid DOS Function”

Posted on June 30, 2009. Filed under: Debugging, Woes |

FRAVIA Passed Away

Posted on June 24, 2009. Filed under: Uncategorized |

Overview on rootkits

Posted on May 20, 2009. Filed under: Uncategorized |

WinDbg 6.11.1.402 released

Posted on February 8, 2009. Filed under: Uncategorized |

WinDbg internal release with CLR support

Posted on December 11, 2008. Filed under: Debugging, Tools | Tags: |

Storing your Debug Symbols

Posted on December 2, 2008. Filed under: Debugging | Tags: , |

WinDbg New Release 6.10.3.233

Posted on November 23, 2008. Filed under: Debugging | Tags: |

Aphorism for Christmas 2008

Posted on November 21, 2008. Filed under: bugs | Tags: |

IGroupPolicyObject::New will fail if thread is impersonating or identity or delegation

Posted on November 18, 2008. Filed under: Debugging, Woes | Tags: , |

    About

    Debugging, gedubbing and all other rotting things in between.

    RSS

    Subscribe Via RSS

    • Subscribe with Bloglines
    • Add your feed to Newsburst from CNET News.com
    • Subscribe in Google Reader
    • Add to My Yahoo!
    • Subscribe in NewsGator Online
    • The latest comments to all posts in RSS
    • Subscribe in Rojo

    Meta

Liked it here?
Why not try sites on the blogroll...