GetLocalPublicKey gets local public key, if not set yet returns nil.
()
| 142 | |
| 143 | // GetLocalPublicKey gets local public key, if not set yet returns nil. |
| 144 | func GetLocalPublicKey() (public *asymmetric.PublicKey, err error) { |
| 145 | localKey.RLock() |
| 146 | public = localKey.public |
| 147 | if public == nil { |
| 148 | err = ErrNilField |
| 149 | } |
| 150 | localKey.RUnlock() |
| 151 | return |
| 152 | } |
| 153 | |
| 154 | // GetLocalPrivateKey gets local private key, if not set yet returns nil |
| 155 | // all call to this func will be logged. |
no outgoing calls