shithub: tlsclient

ref: fa83d0a67d9c796e60a13c5a7ce8e9d4d9e97871
dir: /libsec/rsaprivtopub.c/

View raw version
#include "os.h"
#include <mp.h>
#include <libsec.h>

RSApub*
rsaprivtopub(RSApriv *priv)
{
	RSApub *pub;

	pub = rsapuballoc();
	if(pub == nil)
		return nil;
	pub->n = mpcopy(priv->pub.n);
	pub->ek = mpcopy(priv->pub.ek);
	return pub;
}