小编Tre*_*ley的帖子

Fabric CA Server 中的 CA 证书和 TLS 证书有什么区别?

我在fabric-ca-server 二进制文件中看到有一些选项,包括,我不确定为什么需要两个证书文件。为什么我们不能只使用 tls.certfile?

--ca.certfile string  PEM-encoded CA certificate file (default "ca-cert.pem")

                                  
--tls.certfile string  PEM-encoded TLS certificate file for server's listening port (default "tls-cert.pem")
                        
Run Code Online (Sandbox Code Playgroud)

另外,我在以下文件列表中看到显示了两个证书文件。

-rw-r--r-- 1 root   root   61440 Aug  7 05:43 fabric-ca-server.db
-rw-r--r-- 1 root   root     932 Aug  7 05:43 tls-cert.pem
-rw-r--r-- 1 root   root     215 Aug  7 05:43 IssuerRevocationPublicKey
-rw-r--r-- 1 root   root     843 Aug  7 05:43 IssuerPublicKey
-rw-r--r-- 1 root   root     806 Aug  7 05:43 ca-cert.pem
drwxr-xr-x 6 root   root    4096 Jul 23 08:07 msp
-rwxrwxr-x 1 …
Run Code Online (Sandbox Code Playgroud)

hyperledger-fabric

6
推荐指数
1
解决办法
4409
查看次数

Why does this code overflow with Int -> Int?

I am using recursive calls to calc an exponent. It works to 2**63 and then zeros out. I assume I have some overflow. But I thought Haskell handled this.

I tried numbers until 64 and checked into Int.

power :: Int -> Int
power n = if n==0 then 1 else 2*power(n-1)
main = return()
Run Code Online (Sandbox Code Playgroud)

In GHCI

1152921504606846976
*Main> power 70
0
*Main> power 65
0
*Main> power 64
0
*Main> power 63
-9223372036854775808
*Main> power 62
4611686018427387904
Run Code Online (Sandbox Code Playgroud)

haskell

2
推荐指数
1
解决办法
67
查看次数

标签 统计

haskell ×1

hyperledger-fabric ×1