3

A software system from a collaborating company needs to connect to one of our systems and authenticate against our Azure-B2C Directory. They would like to verify the signature in our JWT Token returned.

I have created a RSA Public Key using the approach described in this topic: Azure AD B2C - Token validation does not work

This has resulted in the following RSA Public Key:

-----BEGIN RSA PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA959e/O3gE574tAdjfjE6
+6OgTBsTGGbDTHBn/w137OTKoH3MnbOX16rrfumVZOr2GisCtIwxJM8ziiqvG1Fj
*more key*
-----END RSA PUBLIC KEY-----

I've used this RSA Public Key to verify the signature of my token in jwt.io, and it works.

The collaborating company however needs a PEM certificate like this:

-----BEGIN CERTIFICATE-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA959e/O3gE574tAdjfjE6
+6OgTBsTGGbDTHBn/w137OTKoH3MnbOX16rrfumVZOr2GisCtIwxJM8ziiqvG1Fj
*more key*
-----END CERTIFICATE-----

Modifying the PEM Header of my RSA Public Key does not work. So now my question is: Is it possible to convert my RSA Public Key to the appropriate Certificate format? If yes, how?

AgitoM
  • 321
  • 1
  • 2
  • 10
  • 1
    Hi @AgitioM Can you use an online converter such as [this](https://superdry.apphb.com/tools/online-rsa-key-converter)? – Chris Padgett Feb 06 '19 at 22:58
  • @Chris Padgett thanks for the suggestion, but that doesn't work, the certificate option is not available in that converter. – AgitoM Feb 07 '19 at 13:21

0 Answers0