lib/acme/client/jwk/ecdsa.rb in acme-client-2.0.17 vs lib/acme/client/jwk/ecdsa.rb in acme-client-2.0.18
- old
+ new
@@ -48,12 +48,12 @@
# Returns a Hash.
def to_h
{
crv: @curve_params[:jwa_crv],
kty: 'EC',
- x: Acme::Client::Util.urlsafe_base64(coordinates[:x].to_s(2)),
- y: Acme::Client::Util.urlsafe_base64(coordinates[:y].to_s(2))
+ x: Acme::Client::Util.urlsafe_base64(coordinates[:x]),
+ y: Acme::Client::Util.urlsafe_base64(coordinates[:y])
}
end
# Sign a message with the private key.
#
@@ -90,11 +90,11 @@
data_len = hex.length - 2
hex_x = hex[2, data_len / 2]
hex_y = hex[2 + data_len / 2, data_len / 2]
{
- x: OpenSSL::BN.new([hex_x].pack('H*'), 2),
- y: OpenSSL::BN.new([hex_y].pack('H*'), 2)
+ x: [hex_x].pack('H*'),
+ y: [hex_y].pack('H*')
}
end
end
def public_key