Skip to content
This repository was archived by the owner on Nov 18, 2026. It is now read-only.
This repository was archived by the owner on Nov 18, 2026. It is now read-only.

OpenSSL::PKey::ECError #60

Open
Open

Description

@utiq

I have this piece of code to initialize my client prevouilsy associated to my bitpay account

path = File.join(Rails.root, 'config', 'bitpaykey.pem')
pem = File.read(path)
client = BitPay::SDK::Client.new(api_uri: 'https://test.bitpay.com', pem: pem, insecure: true, debug: true)

But when I try to create an invoice, I get this error:
OpenSSL::PKey::ECError: invalid curve name

I'm using this sdk version
gem 'bitpay-sdk', :git => 'git://github.com/bitpay/ruby-client.git'

Rails 5.1.0
Ruby 2.4

Activity

  1. laura-levelup commented on Mar 7, 2018

    @laura-levelup

    Not sure if you already figured out your issue, but I'm guessing that your certificate is not valid, and it's failing here: https://github.com/bitpay/bitpay-ruby-keyutils/blob/master/lib/bitpay/key_utils.rb#L21

    > OpenSSL::PKey::EC.new('test')
    OpenSSL::PKey::ECError: invalid curve name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions