|
@@ -145,6 +145,20 @@ void certstore_add ( struct x509_certificate *cert ) {
|
145
|
145
|
x509_name ( cert ) );
|
146
|
146
|
}
|
147
|
147
|
|
|
148
|
+/**
|
|
149
|
+ * Remove certificate from store
|
|
150
|
+ *
|
|
151
|
+ * @v cert X.509 certificate
|
|
152
|
+ */
|
|
153
|
+void certstore_del ( struct x509_certificate *cert ) {
|
|
154
|
+
|
|
155
|
+ /* Remove certificate from store */
|
|
156
|
+ DBGC ( &certstore, "CERTSTORE removed certificate %s\n",
|
|
157
|
+ x509_name ( cert ) );
|
|
158
|
+ list_del ( &cert->store.list );
|
|
159
|
+ x509_put ( cert );
|
|
160
|
+}
|
|
161
|
+
|
148
|
162
|
/**
|
149
|
163
|
* Discard a stored certificate
|
150
|
164
|
*
|
|
@@ -158,10 +172,7 @@ static unsigned int certstore_discard ( void ) {
|
158
|
172
|
*/
|
159
|
173
|
list_for_each_entry_reverse ( cert, &certstore.links, store.list ) {
|
160
|
174
|
if ( cert->refcnt.count == 0 ) {
|
161
|
|
- DBGC ( &certstore, "CERTSTORE discarded certificate "
|
162
|
|
- "%s\n", x509_name ( cert ) );
|
163
|
|
- list_del ( &cert->store.list );
|
164
|
|
- x509_put ( cert );
|
|
175
|
+ certstore_del ( cert );
|
165
|
176
|
return 1;
|
166
|
177
|
}
|
167
|
178
|
}
|