Revision b6267745 lib/utils/x509.py
b/lib/utils/x509.py | ||
---|---|---|
259 | 259 |
@param common_name: commonName value |
260 | 260 |
@type validity: int |
261 | 261 |
@param validity: Validity for certificate in seconds |
262 |
@return: a tuple of strings containing the PEM-encoded private key and |
|
263 |
certificate |
|
262 | 264 |
|
263 | 265 |
""" |
264 | 266 |
# Create private and public key |
... | ... | |
292 | 294 |
@param common_name: commonName value |
293 | 295 |
@type validity: int |
294 | 296 |
@param validity: validity of certificate in number of days |
297 |
@return: a tuple of strings containing the PEM-encoded private key and |
|
298 |
certificate |
|
295 | 299 |
|
296 | 300 |
""" |
297 | 301 |
# TODO: Investigate using the cluster name instead of X505_CERT_CN for |
... | ... | |
301 | 305 |
validity * 24 * 60 * 60) |
302 | 306 |
|
303 | 307 |
utils_io.WriteFile(filename, mode=0400, data=key_pem + cert_pem) |
308 |
return (key_pem, cert_pem) |
Also available in: Unified diff