Skip to content

Commit bf49206

Browse files
committed
updated comments and changed openssh integration script
1 parent ed46cde commit bf49206

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

include/openssl/rsa.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,28 +236,41 @@ OPENSSL_EXPORT const RSA_METHOD *RSA_get_method(const RSA *rsa);
236236
// RSA_meth_free frees the memory associated with |meth|
237237
OPENSSL_EXPORT void RSA_meth_free(RSA_METHOD *meth);
238238

239+
// RSA_METHOD setters
239240
// The following functions set the corresponding fields on |meth|. Returns one
240241
// on success and zero on failure.
242+
243+
// RSA_meth_set_init sets |init| on |meth|.
241244
OPENSSL_EXPORT int RSA_meth_set_init(RSA_METHOD *meth, int (*init) (RSA *rsa));
242245

246+
// RSA_meth_set_finish sets |finish| on |meth|. The |finish| function
247+
// is called in |RSA_free| before freeing the key.
243248
OPENSSL_EXPORT int RSA_meth_set_finish(RSA_METHOD *meth,
244249
int (*finish) (RSA *rsa));
245250

251+
// RSA_meth_set_priv_dec sets |priv_dec| on |meth|. The |priv_dec| function
252+
// should return the number of bytes written to the object |to| or -1 for error.
246253
OPENSSL_EXPORT int RSA_meth_set_priv_dec(RSA_METHOD *meth,
247254
int (*priv_dec) (int max_out, const uint8_t *from,
248255
uint8_t *to, RSA *rsa,
249256
int padding));
250257

258+
// RSA_meth_set_priv_enc sets |priv_enc| on |meth|. The |priv_enc| function
259+
// should return the number of bytes written to the object |to| or -1 for error.
251260
OPENSSL_EXPORT int RSA_meth_set_priv_enc(RSA_METHOD *meth,
252261
int (*priv_enc) (int max_out, const uint8_t *from,
253262
uint8_t *to, RSA *rsa,
254263
int padding));
255264

265+
// RSA_meth_set_pub_dec sets |pub_dec| on |meth|. The |pub_dec| function
266+
// should return the number of bytes written to the object |to| or -1 for error.
256267
OPENSSL_EXPORT int RSA_meth_set_pub_dec(RSA_METHOD *meth,
257268
int (*pub_dec) (int max_out, const uint8_t *from,
258269
uint8_t *to, RSA *rsa,
259270
int padding));
260271

272+
// RSA_meth_set_pub_enc sets |pub_enc| on |meth|. The |pub_enc| function
273+
// should return the number of bytes written to the object |to| or -1 for error.
261274
OPENSSL_EXPORT int RSA_meth_set_pub_enc(RSA_METHOD *meth,
262275
int (*pub_enc) (int max_out, const uint8_t *from,
263276
uint8_t *to, RSA *rsa,

tests/ci/integration/run_openssh_integration.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function openssh_build() {
5252
# The RSA_meth_XXX functions are not implemented by AWS-LC, and the implementation provided by OpenSSH also doesn't compile for us.
5353
# Fortunately, these functions are only needed for pkcs11 support, which is disabled for our build.
5454
# See: https://github.com/openssh/openssh-portable/pull/385
55-
export CFLAGS="-DAWS_LC_INTERNAL_IGNORE_BN_SET_FLAGS=1 -DHAVE_RSA_METH_FREE=1 -DHAVE_RSA_METH_DUP=1 -DHAVE_RSA_METH_SET1_NAME=1 -DHAVE_RSA_METH_SET_PRIV_ENC=1 -DHAVE_RSA_METH_SET_PRIV_DEC=1"
55+
export CFLAGS="-DAWS_LC_INTERNAL_IGNORE_BN_SET_FLAGS=1 -DHAVE_RSA_METH_FREE=1 -DHAVE_RSA_METH_DUP=1 -DHAVE_RSA_METH_SET1_NAME=1 -DHAVE_RSA_METH_GET_FINISH=1 -DHAVE_RSA_METH_SET_PRIV_ENC=1 -DHAVE_RSA_METH_SET_PRIV_DEC=1 -DHAVE_RSA_METH_SET_FINISH=1 "
5656
./configure --with-ssl-dir="${AWS_LC_INSTALL_FOLDER}" --prefix="${OPENSSH_INSTALL_FOLDER}" --disable-pkcs11
5757
make -j "$NUM_CPU_THREADS"
5858
make install

0 commit comments

Comments
 (0)