Skip to content

Commit

Permalink
fix #56
Browse files Browse the repository at this point in the history
  • Loading branch information
tihmstar committed Jul 18, 2024
1 parent b3aa92d commit f44ac46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions img4tool/img4tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,9 @@ ASN1DERElement tihmstar::img4tool::getBNCNFromIM4R(const ASN1DERElement &im4r){
for (auto elem : set){
if (*(uint8_t*)elem.buf() == (uint8_t)ASN1DERElement::TagPrivate){
size_t privTag = 0;
if (privTag == 'bnch'){
ASN1DERElement octet = elem[1];
ASN1DERElement bncn = parsePrivTag(elem.buf(), elem.size(), &privTag);
if (privTag == *(uint32_t*)"BNCN"){
ASN1DERElement octet = bncn[1];
//convert big endian to little endian
std::string octetString{(char*)octet.payload(),octet.payloadSize()};

Expand Down

0 comments on commit f44ac46

Please sign in to comment.