from cryptography.hazmat.primitives import serialization

with open("vapid_private.pem", "rb") as f:
    key_data = f.read()

try:
    private_key = serialization.load_pem_private_key(key_data, password=None)
    print("PEM loaded successfully!")
except Exception as e:
    print("Failed to load PEM:", e)
