GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — crypto: show exponent in decimal and hex · nodejs/node@847459c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_crypto.cc
  • test/parallel
    • test-https-foafssl.js
    • test-tls-peer-certificate.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,9 @@ static Local<Object> X509ToObject(Environment* env, X509* cert) {
13711371
String::kNormalString, mem->length));
13721372
(void) BIO_reset(bio);
13731373

1374-
BN_print(bio, rsa->e);
1374+
unsigned long exponent_word = BN_get_word(rsa->e);
1375+
BIO_printf(bio, "0x%lx", exponent_word);
1376+
13751377
BIO_get_mem_ptr(bio, &mem);
13761378
info->Set(env->exponent_string(),
13771379
String::NewFromUtf8(env->isolate(), mem->data,
Collapse file

‎test/parallel/test-https-foafssl.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-https-foafssl.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@ process.on('exit', function() {
8383
'FDA7DE954ED56DC7AD9A47EEBC37D771A366FC60A5BCB72373BEC180649B3EFA0E90' +
8484
'92707210B41B90032BB18BC91F2046EBDAF1191F4A4E26D71879C4C7867B62FCD508' +
8585
'E8CE66E82D128A71E915809FCF44E8DE774067F1DE5D70B9C03687');
86-
assert.equal(exponent, '10001');
86+
assert.equal(exponent, '0x10001');
8787
});
Collapse file

‎test/parallel/test-tls-peer-certificate.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-peer-certificate.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ server.listen(common.PORT, function() {
3838
common.debug(util.inspect(peerCert));
3939
assert.equal(peerCert.subject.emailAddress, '[email protected]');
4040
assert.equal(peerCert.serialNumber, '9A84ABCFB8A72AC0');
41+
assert.equal(peerCert.exponent, '0x10001');
4142
assert.deepEqual(peerCert.infoAccess['OCSP - URI'],
4243
[ 'http://ocsp.nodejs.org/' ]);
4344

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.