func NewPublicCertificate(publicKeyPem string) (Certificate, error) {
	publicKey, err := jwt.ParseRSAPublicKeyFromPEM([]byte(publicKeyPem))
	if err != nil {
		return nil, fmt.Errorf("error with public key: %w", err)
	}
	publicPem := []byte(publicKeyPem)

	return &certificate{
		publicKey:     publicKey,
		publicCertPem: publicPem,
	}, nil
}
// creates a certificate from only the public key, in the case of the aspsp public cert to validate signatures
creates a certificate from only the public key, in the case of the aspsp public cert to validate signatures
// creates a certificate from only the public key in the case of the aspsp public cert to validate signatures
func NewPublicCertificate(publicKeyPem string) (Certificate, error) {
	publicKey, err := jwt.ParseRSAPublicKeyFromPEM([]byte(publicKeyPem))
	if err != nil {
		return nil, fmt.Errorf("error with public key: %w", err)
	}
	publicPem := []byte(publicKeyPem)
	return &certificate{
		publicKey:     publicKey,
		publicCertPem: publicPem,
	}, nil
}
func NewPublicCertificate ( publicKeyPem string ) ( Certificate , error ) { publicKey , err := jwt . ParseRSAPublicKeyFromPEM ( [ ] byte ( publicKeyPem ) ) if err != nil { return nil , fmt . Errorf ( " " , err ) } publicPem := [ ] byte ( publicKeyPem ) return & certificate { publicKey : publicKey , publicCertPem : publicPem , } , nil }
creates a certificate from only the public key, in the case of the aspsp public cert to validate signatures
creates a certificate from only the public key in the case of the aspsp public cert to validate signatures