File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
include/libcryptosec/exception Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class Pkcs12Exception : public LibCryptoSecException
15
15
KEY_AND_CERT_DO_NOT_MATCH,
16
16
PARSE_ERROR,
17
17
MAC_VERIFY_FAILURE,
18
+ ASN1_INVALID_OBJECT_ENCODING,
18
19
};
19
20
20
21
Pkcs12Exception (std::string where)
@@ -73,12 +74,9 @@ class Pkcs12Exception : public LibCryptoSecException
73
74
case Pkcs12Exception::PARSE_ERROR :
74
75
ret = " Parse error" ;
75
76
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 ;
82
80
}
83
81
return ret;
84
82
}
Original file line number Diff line number Diff line change @@ -144,10 +144,12 @@ void Pkcs12::parse(string password) throw(Pkcs12Exception)
144
144
case PKCS12_R_MAC_VERIFY_FAILURE :
145
145
throw Pkcs12Exception (Pkcs12Exception::PARSE_ERROR, " Pkcs12::parse" );
146
146
break ;
147
-
148
147
case PKCS12_R_PARSE_ERROR :
149
148
throw Pkcs12Exception (Pkcs12Exception::MAC_VERIFY_FAILURE, " Pkcs12::parse" );
150
149
break ;
150
+ case ASN1_R_INVALID_OBJECT_ENCODING :
151
+ throw Pkcs12Exception (Pkcs12Exception::ASN1_INVALID_OBJECT_ENCODING, " Pkcs12::parse" );
152
+ break ;
151
153
}
152
154
}
153
155
You can’t perform that action at this time.
0 commit comments