'Mercure - Symfony - Algorithm rsa.sha256

I'm working on

  • Symfony 5.3
  • Mercure bundle 0.3.4
  • php 8.1

I would like to bind my API with my mercure HUB, I use the mercure bundle 0.3.4, and in my mercure.yaml I'm trying to change the algorithm to 'rsa.sha256' but everytime I update an entity bound with mercure (annotations mercure: true), I get an error thrown that say:

It was not possible to parse your key, reason: error:0909006C:PEM routines:get_name:no start line

Here is my mercure.yaml:

mercure:
    hubs:
        default:
            url: '%env(MERCURE_URL)%'
            public_url: '%env(MERCURE_PUBLIC_URL)%'
            jwt:
                secret: '%env(MERCURE_JWT_SECRET)%'
                publish: ['*']
                subscribe: ['*']
                algorithm: 'rsa.sha256'

I think there might be a situation with the private and the public key but I can't figure out how to solve this... Does anyone know how to help me ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source