m_store = X509_STORE_new();
if (!m_store)
VcoreThrowMsg(CRLException::StorageError,
m_store = X509_STORE_new();
if (!m_store)
VcoreThrowMsg(CRLException::StorageError,
VcoreThrowMsg(CRLException::StorageError,
"Failed to add lookup dir for PEM files");
}
VcoreThrowMsg(CRLException::StorageError,
"Failed to add lookup dir for PEM files");
}
// STORE is responsible for LOOKUP release
// X509_LOOKUP_free(m_lookup);
X509_STORE_free(m_store);
// STORE is responsible for LOOKUP release
// X509_LOOKUP_free(m_lookup);
X509_STORE_free(m_store);
X509_REVOKED rev;
rev.serialNumber = X509_get_serialNumber(argCert->getX509());
// sk_X509_REVOKED_find returns index if serial number is found on list
retVal = sk_X509_REVOKED_find(crlInternal->crl->revoked, &rev);
X509_CRL_free(crlInternal);
retStatus.isRevoked = retVal != -1;
X509_REVOKED rev;
rev.serialNumber = X509_get_serialNumber(argCert->getX509());
// sk_X509_REVOKED_find returns index if serial number is found on list
retVal = sk_X509_REVOKED_find(crlInternal->crl->revoked, &rev);
X509_CRL_free(crlInternal);
retStatus.isRevoked = retVal != -1;
CRL::RevocationStatus certResult = checkCertificate(*it);
ret.isCRLValid &= certResult.isCRLValid;
ret.isRevoked |= certResult.isRevoked;
CRL::RevocationStatus certResult = checkCertificate(*it);
ret.isCRLValid &= certResult.isCRLValid;
ret.isRevoked |= certResult.isRevoked;
VerificationStatus CRLImpl::checkEndEntity(CertificateCollection &chain)
{
if (!chain.sort() && !chain.empty()) {
VerificationStatus CRLImpl::checkEndEntity(CertificateCollection &chain)
{
if (!chain.sort() && !chain.empty()) {
bool CRLImpl::updateList(const CertificatePtr &argCert,
const CRL::UpdatePolicy updatePolicy)
{
bool CRLImpl::updateList(const CertificatePtr &argCert,
const CRL::UpdatePolicy updatePolicy)
{
// Retrieve distribution points
CRL::StringList crlUris = getCrlUris(argCert);
FOREACH(it, crlUris) {
// Try to get CRL from database
// Retrieve distribution points
CRL::StringList crlUris = getCrlUris(argCert);
FOREACH(it, crlUris) {
// Try to get CRL from database
X509_CRL_get_issuer(crl), &obj);
X509_STORE_CTX_free(ctx);
if (0 >= retVal) {
X509_CRL_get_issuer(crl), &obj);
X509_STORE_CTX_free(ctx);
if (0 >= retVal) {
const char *pattern = "-----BEGIN X509 CRL-----";
std::string content(crl->buffer, crl->length);
if (content.find(pattern) != std::string::npos) {
const char *pattern = "-----BEGIN X509 CRL-----";
std::string content(crl->buffer, crl->length);
if (content.find(pattern) != std::string::npos) {
message.setHeader("Host", host);
if (SoupMessageSendSync::REQUEST_STATUS_OK != message.sendSync()) {
message.setHeader("Host", host);
if (SoupMessageSendSync::REQUEST_STATUS_OK != message.sendSync()) {