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
  • 相关阅读:
    WEB前端第四十四课——jQuery框架(二)常用方法
    WEB前端第四十三课——jQuery框架(一)$()函数、添加事件监听
    WEB前端第四十二课——应用案例-瀑布流、递归、代理
    WEB前端第四十一课——简单算法与解析indexof、hash、冒泡排序、递归、JSON
    WEB前端第四十课——正则表达式-RegExp、高级
    WEB前端第三十九课——HTML正则表达式-基础、修饰符、检索模式
    SITE STRUCTURE
    CSS GRID ESSENTIALS
    CSS TYPOGRAPHY
    CSS COLOR
  • 原文地址:https://www.cnblogs.com/greywolf/p/3470405.html
Copyright © 2011-2022 走看看