{"id":13676878,"url":"https://github.com/sebmillet/pkfile","last_synced_at":"2025-04-29T07:33:45.579Z","repository":{"id":202720505,"uuid":"48840232","full_name":"sebmillet/pkfile","owner":"sebmillet","description":null,"archived":false,"fork":false,"pushed_at":"2016-02-24T16:33:05.000Z","size":972,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-11T18:43:41.839Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sebmillet.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-12-31T07:47:45.000Z","updated_at":"2021-03-07T11:55:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"80d112d1-d265-4298-bb16-32cdacf88e42","html_url":"https://github.com/sebmillet/pkfile","commit_stats":null,"previous_names":["sebmillet/pkfile"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebmillet%2Fpkfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebmillet%2Fpkfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebmillet%2Fpkfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebmillet%2Fpkfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebmillet","download_url":"https://codeload.github.com/sebmillet/pkfile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251456067,"owners_count":21592287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T13:00:34.219Z","updated_at":"2025-04-29T07:33:40.572Z","avatar_url":"https://github.com/sebmillet.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"   pkfile, a portable utility to work on pkcs files\r\n   ================================================\r\n\r\nDate: 2016-01-17 11:51 +0100\r\n\r\nContents:\r\n\r\n      I. WHAT IS PKFILE?\r\n     II. WHY PKFILE?\r\n    III. LICENCE\r\n     IV. COMPILATION AND INSTALLATION\r\n      V. CREDITS\r\n\r\n\r\n\r\nI.    WHAT IS PKFILE?\r\n\r\nIt is a program to work on PKCS files.\r\nIt can read PEM-encoded and DER-encoded files and by default it will work out\r\nwhich encoding is being used, unless you force it with -f option.\r\n\r\nIt provides the following features.\r\n\r\nLaunched without option:\r\n- Display DER-encoded data in a hierarchical, tree-like, presentation.\r\n\r\nLaunched with -x option\r\n- Take input and output it in a DER-encoded way.\r\n  If the input is already DER-encoded, no transformation is done and the\r\n  output is just identical to the input.\r\n  If the input is PEM-encoded, pkfile will perform a decoding of PEM content,\r\n  and decrypt data if applicable.\r\n\r\nSee URL\r\n    https://en.wikipedia.org/wiki/X.690#DER_encoding\r\nfor details about DER encoding.\r\n\r\n*IMPORTANT*\r\n  pkfile will decrypt PEM data if need be, and by default will output the\r\n  content in a DER-encoded way =\u003e not encrypted.\r\n  Therefore pkfile is not suitable to deal with private keys in a production\r\n  environment.\r\n\r\n  * IT IS MEANT FOR TRAINING PURPOSES ONLY *\r\n\r\n\r\n\r\nII.   WHY PKFILE?\r\n\r\nIt is meant to be didactic.\r\nIt eases dealing with PKCS files at a low level, like, manually checking a\r\ncertificate by doing the RSA or EC calculations directly with key data.\r\n\r\npkfile will help calculate the hash of TBSCertificate and extract integers\r\nfrom key data.\r\n\r\nUsing -N option, it can also enter a data block (of type BIT STRING or OCTET\r\nSTRING) to parse it as if being a standalone DER-encoded file.\r\n\r\n\r\n\r\nIII.  LICENCE\r\n\r\nSee COPYING file that comes along with the package the program belongs to.\r\n\r\n\r\n\r\nIV.   COMPILATION AND INSTALLATION\r\n\r\nBy default the generation is done with linking against openssl library.\r\nThis allows pkfile to:\r\n- Manage PEM files (decode and decrypt)\r\n- Display the object names after their OID\r\nUnder Linux the link is dynamic, under Windows it is static.\r\n\r\n* LINUX\r\n\r\nTo compile under Linux, execute in the extracted archive root:\r\n    ./configure\r\n    make\r\n    make install (or 'sudo make install')\r\n\r\n  Note about SSL\r\n  The SSL feature requires SSL development library to be available on the\r\n  system you compile on. The package name is libssl-dev for DEB packages and\r\n  openssl-devel (not tested) in RPM ones. For example under Ubuntu, execute:\r\n    sudo apt-get install libssl-dev\r\n\r\n* WINDOWS\r\n\r\n1) Generation with Microsoft Visual C++\r\n\r\nThis generation was checked with msvc version 2015, 32-bit compilation.\r\n\r\n1.1) Compilation of the openssl library with msvc\r\n\r\nSee\r\n    http://developer.covenanteyes.com/building-openssl-for-visual-studio/\r\n\r\nAs compilation is done from MSVC command-line shell, you need a PERL\r\ninterpreter installed on Windows to proceed.\r\nActiveState or Strawberry are fine while ActiveState is said by the URL above\r\nto be more stable.\r\n\r\nFrom msvc command-line and after CDing to the extracted openssl archive, run\r\n(for 32-bit)\r\n\r\nperl Configure VC-WIN32 --prefix=C:\\openssl-msvc\r\n    or (for 64-bit)\r\nperl Configure VC-WIN64 --prefix=C:\\openssl-msvc\r\n\r\nThen\r\nms\\do_ms (for 32-bit) or ms\\do_win64a (for 64-bit)\r\n\r\nThen\r\nnmake -f ms\\nt.mak\r\nnmake -f ms\\nt.mak install\r\n\r\n1.2) pkfile.exe generation\r\n\r\nTo compile under Windows with Microsoft Visual C++ 2015, launch MSVC\r\ncommand-line and, in the extracted archive root, execute:\r\n    nmake -f makefile.vc\r\n\r\nYou may need to update makefile.vc depending on where you built openssl lib\r\nin.\r\n\r\n2) Generation with Mingw\r\n\r\nThis generation was checked using Mingw 32-bit.\r\n\r\n2.1) Compiling the openssl library with mingw\r\n\r\nTo build a static version of openssl with mingw, see the following URLs:\r\n    http://stackoverflow.com/questions/9379363/how-to-build-openssl-with-mingw-in-windows\r\n    http://www.wagner.pp.ru/~vitus/articles/openssl-mingw.html\r\n    http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2008-February/001644.html\r\n\r\n  Instructions:\r\n\r\n  1. Download the source from there and extract it:\r\n     http://www.openssl.org/source/openssl-1.0.2e.tar.gz\r\n     (select the last version ; as of January 5th, 2016, it is 1.0.2e)\r\n  2. Open a MSYS window (from MinGW\\msys\\1.0\\msys.bat)\r\n  3. Run the command (32 bits)\r\n     perl Configure mingw no-shared no-asm --prefix=/c/openssl\r\n     Or (64 bits)\r\n     perl Configure mingw64 no-shared no-asm --prefix=/c/openssl-x64\r\n  4. Run\r\n     make\r\n     make install\r\n  5. Under the directory you built openssl in, you will find the libraries, example:\r\n     C:\\openssl\\lib\\libcrypto.a\r\n\r\n2.2) pkfile.exe generation\r\n\r\nTo compile under Windows with mingw, in the extracted archive root, execute:\r\n    mingw32-make -f makefile.mingw\r\n\r\nYou may need to update makefile.mingw depending on where you built openssl lib\r\nin.\r\n\r\n\r\n\r\nV.    CREDITS\r\n\r\nThe code to detect charset and print the tree elements has been taken from\r\ntree source, version 1.7.0.\r\nThe \"TREE COMMAND FOR LINUX HOMEPAGE\" is here:\r\n    http://mama.indstate.edu/users/ice/tree\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebmillet%2Fpkfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebmillet%2Fpkfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebmillet%2Fpkfile/lists"}