Seiden Group
Modern Development & Open Source for IBM i
  • Link to LinkedIn
  • Link to Mail
  • Home
  • Seiden PHP+
    • Seiden PHP+
    • Install & Learn
    • SmartSupport
    • PHP Migrations & Upgrades
    • Success Stories
    • Free PHP Assessment
    • Documentation
    • What’s New (Changelog)
  • IBM i Services
    • Development
    • Training & Mentoring
    • Open Source Setup & Upgrades
    • SSL/TLS Install & Learn
    • Performance
  • Support
    • Open Source & PHP
    • VS Code for i
    • Developer Support
    • Support Success Stories
  • VS Code for i
    • Support
    • Training
    • Code for i Resource Guide
    • Getting Started Videos
    • Code for IBM i Fridays
  • Free Stuff
    • IBM i Strategy & Tips
    • PHP Upgrade Assessment
    • CNX Valence Assessment
    • VS Code for IBM i Resources
    • Code for IBM i Fridays
    • QCachegrind Download
    • PHP Toolkit for IBM i Resources
    • Qshell on i Library
  • Blog
  • About
    • About Our Team
    • About Alan Seiden
    • Speakers & Sessions
    • In the News
  • Contact
  • 201.447.2437
  • Search
  • Menu Menu

Seiden Group Blog

How to Protect Secure Websites & APIs from Certificates Expiring

March 12, 2024/1 Comment/in API & Web Security /by Alan Seiden

API & web security on IBM iIf you have encrypted your website, API, Telnet server, or other service with TLS (SSL), good for you!

Now, do you know when those certificates will expire? If they expire without renewal, your service could become unavailable without warning.

In the past, to find expiration dates for digital certificates on IBM i, you’d either have to look in the Digital Certificate Manager (DCM), call the Retrieve Certificate Information (QYCURTVCI, QycuRetrieveCertificateInfo) API, or keep extremely good notes!

CERTIFICATE_INFO, an IBM i service recently delivered by IBM, solves all this. This SQL table function, documented here, returns a result table that contains information about server or Certificate Authority (CA) certificates, including their expiration date.

Here’s how to use CERTIFICATE_INFO to find expiring certificates.

Authorities needed

To call CERTIFICATE_INFO, the user must have *ALLOBJ and *SECADM special authorities and pass the certificate store password as a parameter.

Example: Certificates expiring one month out

The IBM documentation provides a practical example: listing certificates from the *SYSTEM certificate store (the default) that will expire within the next month. Note that the SQL below obtains the certificate store password from a global variable, which could be set elsewhere for security.

1
2
3
CREATE VARIABLE MYLIB.SYSTEM_CERT_PW VARCHAR(30);
SET MYLIB.SYSTEM_CERT_PW = 'cert_pwd';
SELECT * FROM TABLE(QSYS2.CERTIFICATE_INFO(CERTIFICATE_STORE_PASSWORD=> MYLIB.SYSTEM_CERT_PW)) WHERE VALIDITY_END < CURRENT DATE + 1 MONTH;

Running a simplified version of the example SQL on our system returned these results:
CERTIFICATE_INFO table function can identify certificates expiring soon

Apache & nginx certificate setup

For fast, reliable help updating your web server certificates, consider our SSL/TLS Install & Learn service. We will walk you through each step, including the configuration of web apps, APIs, FTP, Telenet, etc.

This is just one of many ways to help protect your IBM i when you offer APIs and other online access to your systems.

As reported in a previous article on Apache security fixes, we’re helping clients stay on top of web server security. If you’d like to set up a schedule with us, let me know.

Worry-free open source

This is one of many techniques we recommend to keep our SmartSupport clients’ production environments humming along. Get started with worry-free open source today!

Tags: DCM, IBMi, security, SQL, SSL, TLS
Share this entry
  • Share on Facebook
  • Share on X
  • Share on Pinterest
  • Share on LinkedIn
  • Share on Tumblr
  • Share on Reddit
  • Share by Mail
https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2024-03-12 11:16:462025-08-04 15:10:33How to Protect Secure Websites & APIs from Certificates Expiring
Alan Seiden

About Alan Seiden

Alan works to preserve your investment in IBM enterprise systems by designing and implementing modernization strategies that leverage your existing business logic.

With a passion ...Read More

1 reply
  1. Allister Jenks
    Allister Jenks says:
    November 13, 2024 at 8:03 pm

    We decided to use this table function to send a regular, automated email. However, we thought it would be much more useful if we could see which applications were assigned each certificate. Because this information is not available via SQL, we built a UDTF to do it.

    I have copied a version of the code to GitHub. Included are an RPG module/program and UDTF creation statement, plus a cut-down version of the program we use to combine the information in a meaningful way. What’s missing from this is how we use an internal tool to email the information as an embedded table.

    https://gist.github.com/zkarj735/05074c55aaf5ae4222b12751d255fb1c

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

SUBSCRIBE
Open Thinking
Monthly IBM i Strategy & Tips
  • This field is for validation purposes and should be left unchanged.

IBM i Development

  • RPG, COBOL, SQL, Node,
    PHP, Python, Valance, etc.
  • Modernization. Integration.
  • Web and API Solutions
  • Legacy Maintenance
    ...
LET'S GET IT DONE!

Recent Posts

  • Moving to IBM i 7.6? An SDA Alternative with VS Code and IBM Bob
  • What’s New with Mapepire Database Connector for IBM i
  • Do You Need IBM i Observability?
  • PHP 8.6 is Coming Soon to IBM i
  • Safer npm installation is on the way for Node.js (and all JavaScript)
  • Access Modern Security for IBM i and Connected Web Environments
  • IBM i: A Natural Platform for Agentic AI
  • PHP on IBM i in 2026: The Modernization Engine
  • Your “AS/400” Is a Modern IBM i Platform
  • MCP + AI for IBM i Teams (with a MongoDB example)

SEIDEN GROUP: Modern Development & Open Source for IBM i

Home   |   Seiden PHP+   |   IBM i Services  |   Support   |   VS Code for i   |   Free Stuff   |   Blog  |   Privacy Policy  |   Contact         201.447.2437

© 2026 Seiden Group, LLC
  • Link to LinkedIn
  • Link to Mail
Link to: Node.js v20 and Other Updated Packages Require New IBM i Repositories Link to: Node.js v20 and Other Updated Packages Require New IBM i Repositories Node.js v20 and Other Updated Packages Require New IBM i Repositories Link to: Which PHP Versions Get Critical Security Updates? Link to: Which PHP Versions Get Critical Security Updates? Which PHP Versions Get Critical Security Updates?
Scroll to top Scroll to top Scroll to top