Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7053381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:29:54+00:00 2026-05-28T03:29:54+00:00

How to fetch the expiry date from PKCS12 certificate using iOS security framework? Alternately

  • 0

How to fetch the expiry date from PKCS12 certificate using iOS security framework?
Alternately can I use openssl? if yes, please point me towards relevant API’s

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:29:55+00:00Added an answer on May 28, 2026 at 3:29 am

    Great question! If I were doing this coding, I would first try to think of a solution using Keychain Services.

    First, you’d need to fetch the keychain item. Say, via `SecItemCopyMatching()’.

    This returns a reference to the found items. Preferably a SecCertificateRef (which is described more in detail in Apple’s Keychain Services Reference guide).

    I don’t see an easy way to explicitly fetch the metadata (or expiration date) from a SecCertificateRef off the top of my head. There’s a code snippet I found on books.google.com from “IOS 5 Programming Pushing the Limits: Developing Extraordinary Mobile Apps” called “Checking Certificate Validity” (pages 218 & 219 — I’ve linked it for you) which basically checks to see if a certificate allows usage based on matching keys (in their example, it’s the subject or domain name; for you, it would be the expiration date). Their technique may help you out.

    As for using OpenSSL, I found an answer where you can come up with the expiration date from the command line using the openssl tool. If you can get a handle to your certificate, I’m pretty certain this can be done programmatically as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I fetch data in a Winforms application or ASP.NET form from a
How can I fetch images from a server? I've got this bit of code
My application often fetch data from a webpage using WebRequest, but it isn't possible
i try to fetch data from web,but the page use a 302 redirect how
I want to fetch some content from a webserver using Net:HTTP, like this: url
I'm using PHP cURL to fetch information from another website and insert it into
I fetch data from a database and use File.AppendAllText to write each database row
We fetch some image data from Picasa, using yoxview and whilst the data is
I fetch a JSON array from a web service with touchJSON. Which looks like
I'm trying to fetch some HTML from various blogs and have noticed that different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.