# Yum in RHEL 7 Azure VMs: SSL peer rejected your certificate as expired

**URL:** <https://support.procomputers.com/t/yum-in-rhel-7-azure-vms-ssl-peer-rejected-your-certificate-as-expired/44>\
**Category:** Azure\
**Created:** [February 27, 2023, 9:28pm UTC](https://support.procomputers.com/t/yum-in-rhel-7-azure-vms-ssl-peer-rejected-your-certificate-as-expired/44 "2023-02-27T21:28:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![procomputers](https://dub1.discourse-cdn.com/flex017/user_avatar/support.procomputers.com/procomputers/32/19_2.png) [@procomputers](https://support.procomputers.com/u/procomputers)\
**Post date:** [February 27, 2023, 9:28pm UTC](https://support.procomputers.com/t/yum-in-rhel-7-azure-vms-ssl-peer-rejected-your-certificate-as-expired/44/1 "2023-02-27T21:28:13Z")

</div>

**Affected Products:**

- All ProComputers RHEL 7 images in Azure that includes `rhui-azure-rhel7` package version `2.2-222` and earlier.

**Opened:** 2023-02-27

**Severity:** [Severity 4 (Low)](https://support.procomputers.com/t/procomputers-support-severity-levels-definition/23)

**Symptoms:**  
Starting with February 24th 2023, 18:41:11 GMT, in all affected RHEL 7 VM images, the Azure RHUI (Red Hat Update Infrastructure) is not reachable anymore, and the `yum` command fails with error **“SSL peer rejected your certificate as expired.”**.

> [root@test-rhel7-vm ~]$ **sudo yum update**  
> Loaded plugins: search-disabled-repos  
> openlogic | 2.9 kB 00:00:00  
> rhui-microsoft-azure-rhel7 | 2.1 kB 00:00:00  
> https://rhui-1.microsoft.com/pulp/repos//content/dist/rhel/rhui/server/7/7Server/x86\_64/dotnet/1/os/repodata/repomd.xml: [Errno 14] curl#58 - **“SSL peer rejected your certificate as expired.”**  
> […]

This is due to the fact that the Azure RHUI certificate in the `rhui-azure-rhel7-2.2-222.noarch` package has expired. You can see the certificate expiration date with the command below:

> [root@test-rhel7-vm ~]$ **sudo openssl x509 -in /etc/pki/rhui/product/content.crt -startdate -enddate -noout**  
> notBefore=Feb 24 18:41:11 2021 GMT  
> **notAfter=Feb 24 18:41:11 2023 GMT**

**Solution:**  
To go around this issue, you need to manually update the `rhui-azure-rhel7` package using the commands below:

1. Remove the existing `rhui-azure-rhel7` package

> [root@test-rhel7-vm ~]$ **sudo yum remove rhui-azure-rhel7**  
> […]

1. Install the new `rhui-azure-rhel7` package

> [root@test-rhel7-vm ~]$ **sudo yum --config=https://rhelimage.blob.core.windows.net/repositories/rhui-microsoft-azure-rhel7.config install rhui-azure-rhel7**  
> […]

1. Check the version of the new installed `rhui-azure-rhel7` package

> [root@test-rhel7-vm ~]$ **sudo rpm -qa | grep rhui**  
> rhui-azure-rhel7- **2.2-441**.noarch

1. Check the expiration date of the certificate in the new installed `rhui-azure-rhel7` package

> [root@test-rhel7-vm ~]$ **sudo openssl x509 -in /etc/pki/rhui/product/content.crt -startdate -enddate -noout**  
> notBefore=Feb 14 06:54:16 2023 GMT  
> **notAfter=Feb 13 06:54:16 2025 GMT**

The new installed `rhui-azure-rhel7-2.2-441.noarch` package contains a new certificate that expires on February 13 2025, 06:54:16 GMT.

If you still face the same issue, please contact ProComputers Support as instructed in [this](https://support.procomputers.com/t/start-here-welcome-to-procomputers-support/7) article.
