File tree Expand file tree Collapse file tree
include/libcryptosec/exception Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class Pkcs12Exception : public LibCryptoSecException
1515 KEY_AND_CERT_DO_NOT_MATCH,
1616 PARSE_ERROR,
1717 MAC_VERIFY_FAILURE,
18+ ASN1_INVALID_OBJECT_ENCODING,
1819 };
1920
2021 Pkcs12Exception (std::string where)
@@ -73,12 +74,9 @@ class Pkcs12Exception : public LibCryptoSecException
7374 case Pkcs12Exception::PARSE_ERROR :
7475 ret = " Parse error" ;
7576 break ;
76- // case Pkcs12Exception:::
77- // ret = "";
78- // break;
79- // case Pkcs12Exception:::
80- // ret = "";
81- // break;
77+ case Pkcs12Exception::ASN1_INVALID_OBJECT_ENCODING :
78+ ret = " ASN1 invalid enconding" ;
79+ break ;
8280 }
8381 return ret;
8482 }
Original file line number Diff line number Diff line change @@ -144,10 +144,12 @@ void Pkcs12::parse(string password) throw(Pkcs12Exception)
144144 case PKCS12_R_MAC_VERIFY_FAILURE :
145145 throw Pkcs12Exception (Pkcs12Exception::PARSE_ERROR, " Pkcs12::parse" );
146146 break ;
147-
148147 case PKCS12_R_PARSE_ERROR :
149148 throw Pkcs12Exception (Pkcs12Exception::MAC_VERIFY_FAILURE, " Pkcs12::parse" );
150149 break ;
150+ case ASN1_R_INVALID_OBJECT_ENCODING :
151+ throw Pkcs12Exception (Pkcs12Exception::ASN1_INVALID_OBJECT_ENCODING, " Pkcs12::parse" );
152+ break ;
151153 }
152154 }
153155
You can’t perform that action at this time.
0 commit comments