npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jsrsasign-oid-jpcomreg

v0.9.2

Published

jsrsasign add-on for Japanese Commercial Registry object identifier definitions

Downloads

80

Readme

jsrsasign | 他のアドオン | English

jsrsasign-oid-jpcomreg

jsrsasignは、JavaScript実装の暗号、PKIライブラリです。jsrsasignはアドオンで拡張することが可能で、本パッケージを追加することで、法務省の商業登記証明書で使われるオブジェクト識別子とその名前の定義をjsrsasignに追加することができます。

アドオンの追加方法

var jsrsasign = require("jsrsasign");
require("jsrsasign-oid-jpcomreg").addon(jsrsasign);

定義されたオブジェクト識別子の名称(文字列)

名称定義されたオブジェクト識別子はソースコードで確認できます。

使用例

アドオンを読み込んで以降、定義されたオブジェクト識別子名が使用できます。例えば、jsrsasignではASN1HEX.dumpでASN.1ダンプの文字列が得られますが、商業登記証明書の拡張領域の表示では拡張名が表示されます。

jsrsasign.ASN1HEX.dump("3081...")

以下のようにオブジェクト識別子の名称(jpcomreg-*)が表示されます。

SEQUENCE
  ObjectIdentifier jpcomreg-certificatePolicies (1 2 392 100300 1 1 1)
  OCTETSTRING, encapsulates
    SEQUENCE
  後略

SEQUENCE
  ObjectIdentifier jpcomreg-registrar (1 2 392 100300 1 1 2)
  OCTETSTRING, encapsulates
    UTF8String '東京法務局登記官'

SEQUENCE
  ObjectIdentifier jpcomreg-registeredCorporationInfo (1 2 392 100300 1 1 3)
  OCTETSTRING, encapsulates
    SEQUENCE
      [0]
        UTF8String 'サンプル株式会社'
      [1]
        PrintableString '010701111111'
      [2]
        UTF8String '東京都渋谷区宇田川町1番1号'
      [3]
        UTF8String '山田太郎'
      [4]
        UTF8String '代表取締役'
      [6]
        UTF8String '東京法務局渋谷出張所'

また、証明書拡張をOID名で取得することができるようになります。

var x = new rs.X509(pem);
var hExtV = rs.ASN1HEX.getTLV(x.hex, x.getExtInfo("jpcomreg-registrar").vidx);
console.log(rs.ASN1HEX.parse(hExtV));
// 出力 { utf8str: { str: '東京法務局登記官' } }

参考

  • 商業登記法 英訳付き
    • http://www.japaneselawtranslation.go.jp/law/detail/?id=1863&vm=04&re=01
  • 商業登記証明書の証明書プロファイル (拡張部分)
    • https://www.moj.go.jp/ONLINE/CERTIFICATION/SYSTEM/PDF/main.pdf#page=6