Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin committed Nov 19, 2024
1 parent f87e63c commit edd4679
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ PyObject *aws_py_rsa_private_key_from_der_data(PyObject *self, PyObject *args) {
goto on_done;
}

struct aws_byte_cursor raw_der = aws_byte_cursor_from_buf(decoded_buffer);
struct aws_byte_cursor raw_der = aws_byte_cursor_from_buf(&decoded_buffer);

struct aws_rsa_key_pair *key_pair = aws_rsa_key_pair_new_from_private_key_pkcs1(allocator, raw_der);

Expand Down Expand Up @@ -417,15 +417,15 @@ PyObject *aws_py_rsa_public_key_from_der_data(PyObject *self, PyObject *args) {
PyErr_AwsLastError();
goto on_done;
}

aws_byte_buf_init(&decoded_buffer, allocator, decoded_len);

if (aws_base64_decode(&der_data_cur, &decoded_buffer)) {
PyErr_AwsLastError();
goto on_done;
}

struct aws_byte_cursor raw_der = aws_byte_cursor_from_buf(decoded_buffer);
struct aws_byte_cursor raw_der = aws_byte_cursor_from_buf(&decoded_buffer);

struct aws_rsa_key_pair *key_pair = aws_rsa_key_pair_new_from_public_key_pkcs1(allocator, raw_der);

Expand Down

0 comments on commit edd4679

Please sign in to comment.