x509_vfy.cpp 1.1 KB

123456789101112131415161718192021222324252627282930
  1. #include "x509_vfy.h"
  2. namespace NOpenSSL {
  3. TX509LookupMethod::TX509LookupMethod(
  4. const char* name,
  5. int (*newItem) (X509_LOOKUP *ctx),
  6. void (*free) (X509_LOOKUP *ctx),
  7. int (*init) (X509_LOOKUP *ctx),
  8. int (*shutdown) (X509_LOOKUP *ctx),
  9. X509_LOOKUP_ctrl_fn ctrl,
  10. X509_LOOKUP_get_by_subject_fn getBySubject,
  11. X509_LOOKUP_get_by_issuer_serial_fn getByIssuerSerial,
  12. X509_LOOKUP_get_by_fingerprint_fn getByFingerprint,
  13. X509_LOOKUP_get_by_alias_fn getByAlias
  14. )
  15. : THolder(name)
  16. {
  17. X509_LOOKUP_meth_set_new_item(*this, newItem);
  18. X509_LOOKUP_meth_set_free(*this, free);
  19. X509_LOOKUP_meth_set_init(*this, init);
  20. X509_LOOKUP_meth_set_shutdown(*this, shutdown);
  21. X509_LOOKUP_meth_set_ctrl(*this, ctrl);
  22. X509_LOOKUP_meth_set_get_by_subject(*this, getBySubject);
  23. X509_LOOKUP_meth_set_get_by_issuer_serial(*this, getByIssuerSerial);
  24. X509_LOOKUP_meth_set_get_by_fingerprint(*this, getByFingerprint);
  25. X509_LOOKUP_meth_set_get_by_alias(*this, getByAlias);
  26. }
  27. } // namespace NOpenSSL