zoukankan      html  css  js  c++  java
  • security Export/import

    export [-k keychain] [-t type] [-f format] [-w] [-p format] [-P passphrase] [-o outfile]
                Export one or more items from a keychain to one of a number of external representations.  If
                keychain isn't provided, items will be exported from the user's default keychain.
    
       import inputfile [-k keychain] [-t type] [-f format] [-w] [-P passphrase] [options...]
                Import one or more items from inputfile into a keychain. If keychain isn't provided, items will
                be imported into the user's default keychain.
    
                Options:
                -k keychain     Specify keychain into which item(s) will be imported/exported.
                -t type         Specify the type of items to import/export.
    
                                Import types are: cert, pub, priv, session,
                                cert, and agg. Pub, priv, and session refer to keys; agg is one of the
                                aggregate types (pkcs12 and PEM sequence). The command can often figure out what
                                item_type an item contains based in the filename and/or item_format.
    
                                Export types are: certs, allKeys, pubKeys, privKeys, identities, and all.
                                The default is all. An identity consists of both
                                a certificate and the corresponding provate key.
    
                -f format       Specify the format of the exported data. Possible formats are openssl, bsafe,
                                raw, pkcs7, pkcs8, pkcs12, x509, openssh1, openssh2, and pemseq. The command can
                                often figure out what format an item is in based in the filename and/or
                                item_type.  The default is openssl if one key
                                is being exported. The default is x509 if one certificate is being exported.
    
                -w              Specify that private keys are wrapped and must be unwrapped on import/export.
                -x              Specify that private keys are non-extractable after being imported.
                -p              Specifies that PEM armour is to be applied to the exports output data.
                -P passphrase   Specify the unwrapping passphrase immediately. The default is to obtain a secure
                                passphrase via GUI.
                -o outfile      Write the output data to outfile. Default is to write data to stdout.
                -a attrName attrValue
                                Specify optional extended attribute name and value. Can be used multiple times.
                                This is only valid when importing keys.
                -A              Allow any application to access the imported key without warning (insecure, not
                                recommended!)
                -T appPath      Specify an application which may access the imported key (multiple -T options
                                are allowed)
    
       Examples
    
                security> import /tmp/certs.pem -k
    
                security> import /tmp/mycerts.p12 -t agg -k newcert.keychain
    
                security> import /tmp/mycerts.p12 -f pkcs12 -k newcert.keychain
    
                security> export -k login.keychain -t certs -o /tmp/certs.pem
    
                security> export -k newcert.keychain -t identities -f pkcs12 -o /tmp/mycerts.p12
  • 相关阅读:
    【Django Admin皮肤】 Simpleui 自定义常用 持续更新中...
    【webSokect】基于django Channels的简单实现
    【webSocket】实现原理
    【webSocket】长轮询
    【前端实时时间】JS原生代码
    【数据结构的补全整理】规定在周一到周五中,赛选出8点到18点中的计划安排,空计划时刻补全空值
    JS面试经典知识(一)
    Python中 zipfile 出现乱码
    Linux shell 对数据进行归档
    Linux 函数的使用
  • 原文地址:https://www.cnblogs.com/greywolf/p/3470405.html
Copyright © 2011-2022 走看看