There was an error while loading. Please reload this page.
1 parent 426562d commit 91cd64aCopy full SHA for 91cd64a
1 file changed
src/crypto/X509Crypto.cpp
@@ -135,7 +135,7 @@ int X509Crypto::compareIssuerToString(string_view name) const
135
136
if(*obj == "STREET"sv)
137
obj++;
138
- ASN1_OBJECT *obja = OBJ_txt2obj(*obj, 0);
+ auto obja = make_unique_ptr<ASN1_OBJECT_free>(OBJ_txt2obj(*obj, 0));
139
if(!obja)
140
return -1;
141
@@ -158,7 +158,7 @@ int X509Crypto::compareIssuerToString(string_view name) const
158
for(int i = 0; i < X509_NAME_entry_count(issuer); ++i)
159
{
160
X509_NAME_ENTRY *entb = X509_NAME_get_entry(issuer, i);
161
- if(OBJ_cmp(obja, X509_NAME_ENTRY_get_object(entb)) != 0)
+ if(OBJ_cmp(obja.get(), X509_NAME_ENTRY_get_object(entb)) != 0)
162
continue;
163
164
char *val = nullptr;
0 commit comments