62 #ifndef OPENSSL_NO_ENGINE
139 #ifdef OPENSSL_NO_ENGINE
199 return store->
meth->
ctrl(store, cmd, i, p,
f);
209 new_func, dup_func, free_func);
236 #define check_store(s,fncode,fnname,fnerrcode) \
239 if ((s) == NULL || (s)->meth == NULL) \
241 STOREerr((fncode), ERR_R_PASSED_NULL_PARAMETER); \
244 if ((s)->meth->fnname == NULL) \
246 STOREerr((fncode), (fnerrcode)); \
264 attributes, parameters);
265 if (!
object || !object->
data.
x509.certificate)
273 REF_PRINT(
"X509",
data);
275 x =
object->data.x509.certificate;
299 REF_PRINT(
"X509",data);
301 object->data.x509.certificate =
data;
304 object, attributes, parameters);
325 search_attributes, add_attributes, modify_attributes,
326 delete_attributes, parameters))
342 attributes, parameters))
358 attributes, parameters))
395 if (!
object || !object->
data.
x509.certificate)
403 REF_PRINT(
"X509",
data);
405 x =
object->data.x509.certificate;
448 attributes, parameters);
449 if (!
object || !object->
data.
key)
457 REF_PRINT(
"EVP_PKEY",
data);
459 pkey =
object->data.key;
474 attributes, parameters);
483 REF_PRINT(
"EVP_PKEY",
data);
485 pkey =
object->data.key;
516 REF_PRINT(
"EVP_PKEY",data);
518 object->data.key =
data;
521 attributes, parameters);
542 search_attributes, add_attributes, modify_attributes,
543 delete_attributes, parameters))
561 attributes, parameters);
579 attributes, parameters))
597 attributes, parameters);
624 REF_PRINT(
"EVP_PKEY",
data);
626 pkey =
object->data.key;
669 attributes, parameters);
678 REF_PRINT(
"EVP_PKEY",
data);
680 pkey =
object->data.key;
711 REF_PRINT(
"EVP_PKEY",data);
713 object->data.key =
data;
716 attributes, parameters);
737 search_attributes, add_attributes, modify_attributes,
738 delete_attributes, parameters))
756 attributes, parameters);
774 attributes, parameters))
792 attributes, parameters);
819 REF_PRINT(
"EVP_PKEY",
data);
821 pkey =
object->data.key;
864 attributes, parameters);
865 if (!
object || !object->
data.
crl)
873 REF_PRINT(
"X509_CRL",
data);
875 crl =
object->data.
crl;
890 attributes, parameters);
891 if (!
object || !object->
data.
crl)
899 REF_PRINT(
"X509_CRL",
data);
901 crl =
object->data.
crl;
925 REF_PRINT(
"X509_CRL",data);
927 object->data.crl =
data;
930 attributes, parameters);
951 search_attributes, add_attributes, modify_attributes,
952 delete_attributes, parameters))
968 attributes, parameters))
986 attributes, parameters);
1005 if (!
object || !object->
data.
crl)
1013 REF_PRINT(
"X509_CRL",
data);
1015 crl =
object->data.
crl;
1065 object->data.number =
data;
1068 attributes, parameters);
1089 search_attributes, add_attributes, modify_attributes,
1090 delete_attributes, parameters))
1116 n =
object->data.number;
1117 object->data.number = NULL;
1155 object->data.arbitrary =
data;
1158 attributes, parameters);
1179 search_attributes, add_attributes, modify_attributes,
1180 delete_attributes, parameters))
1199 attributes, parameters);
1206 b =
object->
data.arbitrary;
1207 object->data.arbitrary = NULL;
1240 X509_free(data->
data.
x509.certificate);
1243 X509_CRL_free(data->
data.
crl);
1276 #define ATTR_IS_SET(a,i) ((i) > 0 && (i) < STORE_ATTR_TYPE_NUM \
1277 && ((a)->set[(i) / 8] & (1 << ((i) % 8))))
1278 #define SET_ATTRBIT(a,i) ((a)->set[(i) / 8] |= (1 << ((i) % 8)))
1279 #define CLEAR_ATTRBIT(a,i) ((a)->set[(i) / 8] &= ~(1 << ((i) % 8)))
1322 STORE_ATTR_INFO_attr_free(attrs, i);
1385 char *cstr,
size_t cstr_size)
1405 unsigned char *sha1str,
size_t sha1str_size)
1467 char *cstr,
size_t cstr_size)
1484 unsigned char *sha1str,
size_t sha1str_size)
1672 static int attr_info_compare_compute_range(
1673 const unsigned char *abits,
const unsigned char *bbits,
1674 unsigned int *alowp,
unsigned int *ahighp,
1675 unsigned int *blowp,
unsigned int *bhighp)
1677 unsigned int alow = (
unsigned int)-1, ahigh = 0;
1678 unsigned int blow = (
unsigned int)-1, bhigh = 0;
1685 if (*abits < *bbits) res = -1;
1686 if (*abits > *bbits) res = 1;
1690 if (alow == (
unsigned int)-1)
1693 if (!(*abits & 0x01)) alow++;
1694 if (!(*abits & 0x02)) alow++;
1695 if (!(*abits & 0x04)) alow++;
1696 if (!(*abits & 0x08)) alow++;
1697 if (!(*abits & 0x10)) alow++;
1698 if (!(*abits & 0x20)) alow++;
1699 if (!(*abits & 0x40)) alow++;
1702 if (!(*abits & 0x80)) ahigh++;
1703 if (!(*abits & 0x40)) ahigh++;
1704 if (!(*abits & 0x20)) ahigh++;
1705 if (!(*abits & 0x10)) ahigh++;
1706 if (!(*abits & 0x08)) ahigh++;
1707 if (!(*abits & 0x04)) ahigh++;
1708 if (!(*abits & 0x02)) ahigh++;
1712 if (blow == (
unsigned int)-1)
1715 if (!(*bbits & 0x01)) blow++;
1716 if (!(*bbits & 0x02)) blow++;
1717 if (!(*bbits & 0x04)) blow++;
1718 if (!(*bbits & 0x08)) blow++;
1719 if (!(*bbits & 0x10)) blow++;
1720 if (!(*bbits & 0x20)) blow++;
1721 if (!(*bbits & 0x40)) blow++;
1724 if (!(*bbits & 0x80)) bhigh++;
1725 if (!(*bbits & 0x40)) bhigh++;
1726 if (!(*bbits & 0x20)) bhigh++;
1727 if (!(*bbits & 0x10)) bhigh++;
1728 if (!(*bbits & 0x08)) bhigh++;
1729 if (!(*bbits & 0x04)) bhigh++;
1730 if (!(*bbits & 0x02)) bhigh++;
1733 if (ahigh + alow < bhigh + blow) res = -1;
1734 if (ahigh + alow > bhigh + blow) res = 1;
1735 if (alowp) *alowp = alow;
1736 if (ahighp) *ahighp = ahigh;
1737 if (blowp) *blowp = blow;
1738 if (bhighp) *bhighp = bhigh;
1745 if (a == b)
return 0;
1748 return attr_info_compare_compute_range((*a)->set, (*b)->set, 0, 0, 0, 0);
1753 unsigned int alow, ahigh, blow, bhigh;
1755 if (a == b)
return 1;
1758 attr_info_compare_compute_range(a->
set, b->
set,
1759 &alow, &ahigh, &blow, &bhigh);
1760 if (alow >= blow && ahigh <= bhigh)
1767 unsigned char *abits, *bbits;
1770 if (a == b)
return 1;
1777 if (*abits && (*bbits & *abits) != *abits)
1787 if (a == b)
return 1;